undercloud vm build fails during pip install os-apply-config

Bug #1201253 reported by Divakar Padiyar Nandavar
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
python-setuptools
New
Undecided
Unassigned
tripleo
Fix Released
High
Unassigned

Bug Description

undercloud vm build fails during pip install os-apply-config

While trying to setup TripleO using the available documentation (https://github.com/tripleo/incubator/blob/master/devtest.md) getting stuck at the step of creating undercloud image.

Step #21: (When reporting this bug)
$TRIPLEO_ROOT/diskimage-builder/bin/disk-image-create ubuntu \
    -a i386 -o undercloud boot-stack nova-baremetal heat-localip \
    heat-cfntools stackuser

I see the following error message:

-----------------------------------------------------------------------------------

+ pip install -U os-apply-config

Downloading/unpacking os-apply-config

  Downloading os-apply-config-0.0.1.tar.gz

  Running setup.py egg_info for package os-apply-config

    Download error on
https://pypi.python.org/simple/pbr/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!

    Couldn't find index page for 'pbr' (maybe misspelled?)

    Download error on
https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!

No local packages or download links found for pbr

-----------------------------------------------------------------------------------

Note: I have the set the http_proxy and https_proxy in my system.

One observation from the logs is that every time it tries for a module in pypi.python.org in all the instances it tries with http://pypi.python.org/simple and only in case of installing the dependencies for os-apply-config it tries with https://pypi.python.org/simple/ (HTTPS url) and fails.

However there are instances of other HTTPS urls which goes through fine

Downloading/unpacking distribute from https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a
    Downloading https://pypi.python.org/packages/source/d/d2to1/d2to1-0.2.10.tar.gz#md5=be97f5330bae3206e1555b58dae23848
    Downloading https://pypi.python.org/packages/source/s/setuptools-git/setuptools-git-1.0.tar.gz#md5=de63b541a10c2b83caa478c687458b16
    Downloading https://pypi.python.org/packages/source/d/d2to1/d2to1-0.2.10.tar.gz#md5=be97f5330bae3206e1555b58dae23848
    Downloading https://pypi.python.org/packages/source/s/setuptools-git/setuptools-git-1.0.tar.gz#md5=de63b541a10c2b83caa478c687458b16
    Downloading https://pypi.python.org/packages/source/d/d2to1/d2to1-0.2.10.tar.gz#md5=be97f5330bae3206e1555b58dae23848
    Downloading https://pypi.python.org/packages/source/s/setuptools-git/setuptools-git-1.0.tar.gz#md5=de63b541a10c2b83caa478c687458b16
    Download error on https://pypi.python.org/simple/pbr/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
    Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
    Download error on https://pypi.python.org/simple/pbr/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!

Tags: tripleo
Revision history for this message
Divakar Padiyar Nandavar (divakar-padiyar-nandavar) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :

We're going to get a local pip cache in place to mitigate this, but the underlying issue is probably a pip client glitch of some sort

Changed in tripleo:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
jan grant (jan-grant) wrote :

Python tools' handling of proxy settings is pretty variable. In particular, check that you're using HTTP_PROXY - my copy of pip, at least, is case-sensitive about this.

Revision history for this message
Divakar Padiyar Nandavar (divakar-padiyar-nandavar) wrote :

Jan, I have tried with setting both http_proxy and HTTP_PROXY. Result is still same. I have also set https_proxy and HTTPS_PROXY.

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

I have tracked this down to Python setuptools.

The reason that it fails inside the chroot and not outside, is that inside the chroot we end up installing a newer, local version of setuptools, vs the one in Ubuntu Quantal.

The failure can be reproduced entirely independently of d-i-b, in any host system, with:

pip install -U setuptools
easy_install install os-apply-config

Revision history for this message
Chris Jones (cmsj) wrote :
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Setuptools is now 1.0 on Pypi, which resolves bug #52.
https://pypi.python.org/pypi/setuptools/1.0#id1

I ended up modifying os-svc-install by adding "pip install -U setuptools>=1.0" right before the venv creation, but do you have any plans to upstream it ?

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Actually, the issue is related to virtualenv-1.10.1 which bundles natively setuptools-0.9.8

Each time a new venv is created, we should make sure to upgrade setuptools to 1.0 or more, or wait for a next release of virtualenv.

Do you want me to push upstream the changes I did to support setuptools-1.0, or do you want to wait for a new virtualenv release ?

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

I pushed the review https://review.openstack.org/#/c/42851/ for raising up the changes.

Up to you to vote for the change.

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-image-elements (master)

Fix proposed to branch: master
Review: https://review.openstack.org/67159

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/67688

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-image-elements (master)

Reviewed: https://review.openstack.org/67159
Committed: https://git.openstack.org/cgit/openstack/tripleo-image-elements/commit/?id=43cfbfd677ca529f36dd416ee2614204f6eb7687
Submitter: Jenkins
Branch: master

commit 43cfbfd677ca529f36dd416ee2614204f6eb7687
Author: Tom Hancock <email address hidden>
Date: Thu Jan 16 13:27:50 2014 +0000

    Fixes for use behind proxy

    Need to use setuptools>=1.0 in order to get fixes which
    allow fetches of dependencies from pypi to work correctly
    when operating behind a proxy.
    Ref: https://bitbucket.org/pypa/setuptools/issue/52/ssl-errors-with-https-proxy
    and also some prior fixes to bug #1201253 in change id
    I7cca000857f7691d4cb723d0a0c22a202da703f8

    Change-Id: I3f11b4b9b8d2bd59f32c5d4de5ee58f1423287f5
    Fixes: bug #1201253

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-incubator (master)

Reviewed: https://review.openstack.org/67688
Committed: https://git.openstack.org/cgit/openstack/tripleo-incubator/commit/?id=b0e19aaa949d009abb253c35ea12f6443bc8d158
Submitter: Jenkins
Branch: master

commit b0e19aaa949d009abb253c35ea12f6443bc8d158
Author: Derek Higgins <email address hidden>
Date: Sat Jan 18 22:51:14 2014 +0000

    Upgrade setuptools to >=1 in a newly created virtualenv

    The latest version of setuptools contains fixes for fetching
    dependencies from behind a proxy. For now we have to upgrade to it.
    See related fixes in tripleo-image-builder
    I7cca000857f7691d4cb723d0a0c22a202da703f8
    I3f11b4b9b8d2bd59f32c5d4de5ee58f1423287f5
    These were for virtual environments inside the d-i-b chroot, I have seen
    the similar problems on ubuntu precise while running setup-clienttools.

    Change-Id: I4bfd81f4e4f0a98d28544a50b05bee1fa1f24c1a
    Fixes: bug #1201253

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.