pip fails to install heat requirements

Bug #1265807 reported by Jan Provaznik
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Confirmed
Critical
Jan Provaznik

Bug Description

Virtualenv newly installs pip 1.5 when installing openstack services in /opt/stack/venvs. Pip 1.5 by default ignores files that does not come from the primary index, then building an image which includes heat fails with this error:

Downloading/unpacking netaddr>=0.7.6 (from -r /opt/stack/heat/requirements.txt (line 10))
  Could not find a version that satisfies the requirement netaddr>=0.7.6 (from -r /opt/stack/heat/requirements.txt (line 10)) (from versions: 0.3.1, 0.3.1, 0.4, 0.4, 0.5.1, 0.5.1, 0.5.2, 0.5.2, 0.5, 0.5, 0.6.1, 0.6.1, 0.6.2, 0.6.2, 0.6.3, 0.6.3, 0.6.4, 0.6.4, 0.6, 0.6, 0.7.1, 0.7.1, 0.7.2, 0.7.2, 0.7.3, 0.7.3, 0.7, 0.7)
  Some externally hosted files were ignored (use --allow-external to allow).
  Some insecure and unverifiable files were ignored (use --allow-unverified netaddr to allow).
Cleaning up...
No distributions matching the version for netaddr>=0.7.6 (from -r /opt/stack/heat/requirements.txt (line 10))
Storing debug log for failure in /root/.pip/pip.log

Quickfix solution might be allow external source for netaddr package:
pip install --allow-unverified netaddr --allow-external netaddr

Revision history for this message
Jan Provaznik (jan-provaznik) wrote :

This hotfix worked for me:
diff --git a/elements/os-svc-install/bin/os-svc-install b/elements/os-svc-install/bin/os-svc-install
index 46e42e6..1a7e775 100755
--- a/elements/os-svc-install/bin/os-svc-install
+++ b/elements/os-svc-install/bin/os-svc-install
@@ -33,7 +33,11 @@ function python-install() {
   pip install -U 'setuptools>=1.0'

   if [ -n "$reqs" ] ; then
- pip install -r $reqs
+ pip install \
+ --allow-insecure netaddr --allow-external netaddr \
+ --allow-insecure netifaces --allow-external netifaces \
+ --allow-insecure psutil --allow-external psutil \
+ -r $reqs
        # FIXME: pip requires doesn't include MySQL-python
        pip install MySQL-python
   fi

Having whitelisted --allow-external params in os-svc-install script is far from ideal, any other ideas?

Changed in tripleo:
status: New → Confirmed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This is also mitigated by building with the pypi-openstack element included, which makes your build using the OpenStack pypi mirror.

Revision history for this message
Chris Jones (cmsj) wrote :

This relates to bug #1266513

Changed in tripleo:
assignee: nobody → Jan Provaznik (jan-provaznik)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Before we do anything else, let's see if we can just get upstream to conform:

https://github.com/drkjam/netaddr/issues/57

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

netaddr 0.7.10 is on pypi and pip 1.5 can install it. just 2 to go. :)

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.