Multipip failure?

Bug #1186440 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
anvil
Fix Released
Undecided
Alexej Ababilov

Bug Description

When running multipip to build the openstack dependencies + openstack packages it seems like the permission problem is occuring. Note that this should not be happening since this was not ran as sudo? Also note the "Full known Python dependency list:" doesn't seem to be the right thing that is output there.

-bash-4.1$ ./smithy -a prepare
  ___ ____ _____ _ _ ____ _____ _ ____ _ __
 / _ \| _ \| ____| \ | / ___|_ _|/ \ / ___| |/ /
| | | | |_) | _| | \| \___ \ | | / _ \| | | ' /
| |_| | __/| |___| |\ |___) || |/ ___ \ |___| . \
 \___/|_| |_____|_| \_|____/ |_/_/ \_\____|_|\_\
               Anvil: | 2013.1-dev |
    And now for something completely different!
-------------------Action Runner--------------------
INFO: @anvil.distro : Matched distro rhel for platform Linux-2.6.32-220.23.1.el6.YAHOO.20120713.x86_64-x86_64-with-redhat-6.2-Santiago
WARNING: @anvil.shell : Cannot escalate permissions to (uid=0, gid=0): [Errno 1] Operation not permitted
WARNING: @anvil.shell : Can not switch to user mode, no suid user id or suid group id
INFO: @anvil : Starting action prepare on 2013-05-31T22:56:13.737019 for distro: rhel
INFO: @anvil : Using persona: conf/personas/in-a-box/basic.yaml
INFO: @anvil : In root directory: /home/harlowja/openstack
INFO: @anvil.actions.base : Processing components for action prepare.
INFO: @anvil.actions.base : Activating in the following order:
INFO: @anvil.actions.base : |-- general
INFO: @anvil.actions.base : |-- db
INFO: @anvil.actions.base : |-- rabbit-mq
INFO: @anvil.actions.base : |-- oslo-config
INFO: @anvil.actions.base : |-- keystone
INFO: @anvil.actions.base : |-- keystone-client
INFO: @anvil.actions.base : |-- glance
INFO: @anvil.actions.base : |-- glance-client
INFO: @anvil.actions.base : |-- cinder-client
INFO: @anvil.actions.base : |-- quantum-client
INFO: @anvil.actions.base : |-- nova
INFO: @anvil.actions.base : |-- nova-client
INFO: @anvil.actions.base : Booting up your components.
INFO: @anvil.actions.base : Reading passwords using a unencrypted keyring @ /etc/anvil/passwords.cfg
Enter a secret to use for the service authentication password [or press enter to get a generated one]:
Enter a secret to use for the rabbit user [or press enter to get a generated one]:
Enter a secret to use for the keystone admin user [or press enter to get a generated one]:
Enter a secret to use for the service admin token [or press enter to get a generated one]:
Enter a secret to use for the database user [or press enter to get a generated one]:
INFO: @anvil.actions.base : Saving 5 passwords using a unencrypted keyring @ /etc/anvil/passwords.cfg
INFO: @anvil.actions.base : Verifying that the components are ready to rock-n-roll.
INFO: @anvil.actions.base : Warming up component configurations.
INFO: @anvil.actions.prepare : Downloading general.
INFO: @anvil.actions.prepare : Performed 0 downloads.
INFO: @anvil.actions.prepare : Downloading db.
INFO: @anvil.actions.prepare : Performed 0 downloads.
INFO: @anvil.actions.prepare : Downloading rabbit-mq.
INFO: @anvil.actions.prepare : Performed 0 downloads.
INFO: @anvil.actions.prepare : Downloading oslo-config.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/oslo.config.git?tag=1.1.0b1
INFO: @anvil.downloader : Downloading git://github.com/openstack/oslo.config.git (master) to /home/harlowja/openstack/oslo-config/app.
INFO: @anvil.downloader : Adjusting to tag 1.1.0b1.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading keystone.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/keystone.git?tag=2013.1
INFO: @anvil.downloader : Downloading git://github.com/openstack/keystone.git (master) to /home/harlowja/openstack/keystone/app.
INFO: @anvil.downloader : Adjusting to tag 2013.1.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading keystone-client.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/python-keystoneclient.git?tag=0.2.3
INFO: @anvil.downloader : Downloading git://github.com/openstack/python-keystoneclient.git (master) to /home/harlowja/openstack/keystone-client/app.
INFO: @anvil.downloader : Adjusting to tag 0.2.3.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading glance.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/glance.git?tag=2013.1
INFO: @anvil.downloader : Downloading git://github.com/openstack/glance.git (master) to /home/harlowja/openstack/glance/app.
INFO: @anvil.downloader : Adjusting to tag 2013.1.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading glance-client.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/python-glanceclient.git?tag=0.9.0
INFO: @anvil.downloader : Downloading git://github.com/openstack/python-glanceclient.git (master) to /home/harlowja/openstack/glance-client/app.
INFO: @anvil.downloader : Adjusting to tag 0.9.0.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading cinder-client.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/python-cinderclient.git?tag=1.0.3
INFO: @anvil.downloader : Downloading git://github.com/openstack/python-cinderclient.git (master) to /home/harlowja/openstack/cinder-client/app.
INFO: @anvil.downloader : Adjusting to tag 1.0.3.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading quantum-client.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/python-quantumclient.git?tag=2.2.1
INFO: @anvil.downloader : Downloading git://github.com/openstack/python-quantumclient.git (master) to /home/harlowja/openstack/quantum-client/app.
INFO: @anvil.downloader : Adjusting to tag 2.2.1.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading nova.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/nova.git?tag=2013.1
INFO: @anvil.downloader : Downloading git://github.com/openstack/nova.git (master) to /home/harlowja/openstack/nova/app.
INFO: @anvil.downloader : Adjusting to tag 2013.1.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Downloading nova-client.
INFO: @anvil.components.base_install : Downloading from 1 uris:
INFO: @anvil.components.base_install : |-- git://github.com/openstack/python-novaclient.git?tag=2.13.0
INFO: @anvil.downloader : Downloading git://github.com/openstack/python-novaclient.git (master) to /home/harlowja/openstack/nova-client/app.
INFO: @anvil.downloader : Adjusting to tag 2.13.0.
INFO: @anvil.actions.prepare : Performed 1 downloads.
INFO: @anvil.actions.prepare : Post-download patching general.
INFO: @anvil.actions.prepare : Post-download patching db.
INFO: @anvil.actions.prepare : Post-download patching rabbit-mq.
INFO: @anvil.actions.prepare : Post-download patching oslo-config.
INFO: @anvil.actions.prepare : Post-download patching keystone.
INFO: @anvil.actions.prepare : Post-download patching keystone-client.
INFO: @anvil.actions.prepare : Post-download patching glance.
INFO: @anvil.actions.prepare : Post-download patching glance-client.
INFO: @anvil.actions.prepare : Post-download patching cinder-client.
INFO: @anvil.actions.prepare : Post-download patching quantum-client.
INFO: @anvil.actions.prepare : Post-download patching nova.
INFO: @anvil.actions.prepare : Post-download patching nova-client.
INFO: @anvil.actions.prepare : Preparing general.
INFO: @anvil.actions.prepare : Preparing db.
INFO: @anvil.actions.prepare : Preparing rabbit-mq.
INFO: @anvil.actions.prepare : Preparing oslo-config.
INFO: @anvil.actions.prepare : Preparing keystone.
INFO: @anvil.actions.prepare : Preparing keystone-client.
INFO: @anvil.actions.prepare : Preparing glance.
INFO: @anvil.actions.prepare : Preparing glance-client.
INFO: @anvil.actions.prepare : Preparing cinder-client.
INFO: @anvil.actions.prepare : Preparing quantum-client.
INFO: @anvil.actions.prepare : Preparing nova.
INFO: @anvil.actions.prepare : Preparing nova-client.
INFO: @anvil.actions.prepare : Packing OpenStack and its dependencies
WARNING: @anvil.packaging.base : Traceback (most recent call last):
WARNING: @anvil.packaging.base : File "/home/harlowja/anvil/multipip/multipip", line 10, in <module>
WARNING: @anvil.packaging.base : import pip.index
WARNING: @anvil.packaging.base : File "/usr/lib/python2.6/site-packages/pip/__init__.py", line 9, in <module>
WARNING: @anvil.packaging.base : from pip.util import get_installed_distributions, get_prog
WARNING: @anvil.packaging.base : File "/usr/lib/python2.6/site-packages/pip/util.py", line 15, in <module>
WARNING: @anvil.packaging.base : from pip.locations import site_packages, running_under_virtualenv, virtualenv_no_global
WARNING: @anvil.packaging.base : File "/usr/lib/python2.6/site-packages/pip/locations.py", line 64, in <module>
WARNING: @anvil.packaging.base : build_prefix = _get_build_prefix()
WARNING: @anvil.packaging.base : File "/usr/lib/python2.6/site-packages/pip/locations.py", line 54, in _get_build_prefix
WARNING: @anvil.packaging.base : raise pip.exceptions.InstallationError(msg)
WARNING: @anvil.packaging.base : pip.exceptions.InstallationError: The temporary folder for building (/tmp/pip-build-harlowja) is not owned by your user!
INFO: @anvil.packaging.base : Full known Python dependency list:
INFO: @anvil.packaging.base : |-- The temporary folder for building (/tmp/pip-build-harlowja) is not owned by your user!
INFO: @anvil.packaging.base : |-- pip will not work until the temporary folder is either deleted or owned by your user account.
 ______________________
/ Spam spam spam spam \
\ baked beans and spam /
 ----------------------
  \ || ||
    \ __ ||-----mm||
      \ ( )/_________)//
        (oo)/
        v--v
ValueError: ('Expected version spec in', 'The temporary folder for building (/tmp/pip-build-harlowja) is not owned by your user!', 'at', ' temporary folder for building (/tmp/pip-build-harlowja) is not owned by your user!')

Revision history for this message
Joshua Harlow (harlowja) wrote :

Can fix by removing that /tmp dir, but likely the bootstrap phase is causing that problem (since it pip installs stuff)?

Revision history for this message
Alexej Ababilov (aababilov) wrote :

This bug occurs on the same reason as https://bugs.launchpad.net/anvil/+bug/1179747. This is fixed in https://review.openstack.org/#/c/31225/2

BTW, it will be better to give an explicit --build argument to pip and provide it an empty directory. Pip is buggy. It is known to forget to save some required archives when doing install --download

Changed in anvil:
assignee: nobody → Alessio Ababilov (aababilov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to anvil (stable/grizzly)

Reviewed: https://review.openstack.org/31225
Committed: http://github.com/stackforge/anvil/commit/df60b50f33e63880b3b84a4bf74fc71d24bbace9
Submitter: Jenkins
Branch: stable/grizzly

commit df60b50f33e63880b3b84a4bf74fc71d24bbace9
Author: Alessio Ababilov <email address hidden>
Date: Fri May 31 11:09:37 2013 +0400

    Do not change process UID

    When run with sudo, Anvil changed process real UID
    to SUDO_UID thus easily creating files with different owners.
    This mechanism can confuse some tools (like pip)
    Now, we can almost safely stop changing real UID and run
    prepare as non-root and bootstrap, install, start, status,
    and stop as root.

    Also, this removes dependency on sudo.

    Implements: blueprint no-uid-tricks
    Fixes: bug #1179747
    Fixes: bug #1186440
    Fixes: bug #1186448

    Change-Id: I7ae293aad7f0a5ba08962e6b6b709fe49b8b81ec

tags: added: in-stable-grizzly
Changed in anvil:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to anvil (master)

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

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

Reviewed: https://review.openstack.org/31537
Committed: http://github.com/stackforge/anvil/commit/0ba7f0e03b6300650d561364448bd6bbdc78ac0a
Submitter: Jenkins
Branch: master

commit 0ba7f0e03b6300650d561364448bd6bbdc78ac0a
Author: Alessio Ababilov <email address hidden>
Date: Fri May 31 11:09:37 2013 +0400

    Do not change process UID

    When run with sudo, Anvil changed process real UID
    to SUDO_UID thus easily creating files with different owners.
    This mechanism can confuse some tools (like pip)
    Now, we can almost safely stop changing real UID and run
    prepare as non-root and bootstrap, install, start, status,
    and stop as root.

    Also, this removes dependency on sudo.

    Implements: blueprint no-uid-tricks
    Fixes: bug #1179747
    Fixes: bug #1186440
    Fixes: bug #1186448

    Change-Id: I7ae293aad7f0a5ba08962e6b6b709fe49b8b81ec

Joshua Harlow (harlowja)
Changed in anvil:
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.