openstack.common.setup should not talk to github

Bug #1057560 reported by Brian Waldon
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
High
Monty Taylor
Grizzly
Fix Released
High
Monty Taylor

Bug Description

The function _get_git_next_version_suffix calls 'git fetch origin +refs/meta/*:refs/remotes/meta/*'. If one of your origin remote is unreachable, you're going to see a failure when you try to use a project's setup.py script. We shouldn't try to pull from external resources to build a tarball from a local checkout. We also can't guarantee 'origin' is what we expect it to be.

David Ripton (dripton)
Changed in openstack-common:
assignee: nobody → David Ripton (dripton)
Mark McLoughlin (markmc)
affects: openstack-common → oslo
Revision history for this message
Mark McLoughlin (markmc) wrote :

This review is related, but not a complete solution I think : https://review.openstack.org/16547

Changed in oslo:
status: New → Confirmed
importance: Undecided → High
assignee: David Ripton (dripton) → nobody
Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi,

Indeed, we also have the problem when doing the Debian (eg: not Ubuntu, really Debian) packaging of Openstack. We aren't using release tarballs and bzr, but git and git-buildpackage. As a result, oslo / openstack assuming that if there's a ".git" file, it's fine to do git calls is a very wrong assumption. Here's the result of git-buildpackage with an up-to-date setup.py from Oslo:

<email address hidden> ~/openstack-auto-builder/sources/ceilometer/ceilometer$ git-buildpackage
debian/rules:30: warning: overriding commands for target `override_dh_gencontrol'
/usr/share/openstack-pkg-tools/pkgos.make:62: warning: ignoring old commands for target `override_dh_gencontrol'
dh clean --with python2
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/zigo/openstack-auto-builder/sources/ceilometer/ceilometer'
debian/rules:30: warning: overriding commands for target `override_dh_gencontrol'
/usr/share/openstack-pkg-tools/pkgos.make:62: warning: ignoring old commands for target `override_dh_gencontrol'
dh_auto_clean
Could not create directory '/root/.ssh'.
The authenticity of host 'git.debian.org (217.196.43.140)' can't be established.
RSA key fingerprint is 8c:c0:b8:9f:0a:79:ee:1c:77:c4:b8:a1:70:55:b7:31.
Are you sure you want to continue connecting (yes/no)?

because of the use of fakeroot, and the fact that there's a .git folder (as I'm building with git-buildpackage), ceilometer/openstack/common/setup.py clean target tries to do "git fetch" thinking it's root.

That wouldn't be too much of a problem if this wasn't in the clean target. The problem is that git-buildpackage calls clean *before* applying any patches in debian/patches. So the result is that we have no choice but to patch upstream branch, which of course, we do not want to do.

Julien Danjou's patch here: https://review.openstack.org/#/c/16547/

fixes the problem, and I would really much like to have it applied.

Also, as a general rule, *please* do not do network access or git calls in Olso, *even* if we are running in a git checkout. I would also much much love to have the MANIFEST.py and the upstream ChangeLog file to be in a good condition after a "git pull". I can live with the ChangeLog thing, but the MANIFEST.py generated with git ls-files has annoyed us really a lot when doing the Debian packaging over Git. We currently carry a patch in debian/patches to have a correct MANIFEST.py, which we need to refresh when packaging a new version. It'd be great to stop using this dangerous hack where files might be forgotten.

I hope this will helps to have things to move in the correct direction,

Thomas Goirand (zigo)

Revision history for this message
Mark McLoughlin (markmc) wrote :

Pretty confident this is fixed by https://review.openstack.org/18897

Changed in oslo:
status: Confirmed → Fix Committed
assignee: nobody → Monty Taylor (mordred)
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.