stack.sh downgrades pbr if old dependencies are present

Bug #1468808 reported by Cyril Roelandt
92
This bug affects 16 people
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

I'm running Ubuntu 14.04.

$ pip list | grep -E "(pip|pbr|setuptools)"
pbr (1.2.0)
pip (7.0.3)
setuptools (18.0)

$ ./stack.sh
...
Collecting pbr!=0.7,<1.0,>=0.6 (from keystonemiddleware>=1.5.0)
  Using cached pbr-0.11.0-py2.py3-none-any.whl
...
Installing collected packages: pbr
  Found existing installation: pbr 1.2.0
    Uninstalling pbr-1.2.0:
      Successfully uninstalled pbr-1.2.0
Successfully installed pbr-0.11.0
...

$ pip list | grep -E "(pip|pbr|setuptools)"
pbr (0.11.0)
pip (7.0.3)
setuptools (18.0.1)

Downgrading pbr to 0.11.0 leads to the following well-known error:
    Complete output from command python setup.py egg_info:
    error in setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in python-ldap>=2.4;python_version=='2.7' at ;python_version=='2.7'

Workaround
==========

export PIP_UPGRADE=True before running stack.sh

Changed in devstack:
status: New → Confirmed
Revision history for this message
T C OKonski (tkonski) wrote :

This is causing our builds to fail, also.

Revision history for this message
Carlos Garza (carlos-garza) wrote :

at work I have pbr (0.11.0) installed and stack deploys just fine so I'm not convinced pbr downgrading alone is what triggered the error. But I agree my home machine I'm using pbr 0.11.0 but also getting the same error after cloning keystone. Something is mangling test-requirments.txt after cloning which injects ";python_version='2.7'.

I can confirm there is a bug that is preventing devstack from deploying but can't confirm pbr is the cause.

Revision history for this message
Robert Collins (lifeless) wrote :

Try exporting PIP_UPGRADE=True before running stack.sh

Revision history for this message
Robert Collins (lifeless) wrote :

It absolutely is the pbr downgrade that is the problem. http://lists.openstack.org/pipermail/openstack-dev/2015-June/067823.html

Revision history for this message
Paulo Ewerton (pauloewerton) wrote :

Robert's tip seems to work, thanks! Hope this is fixed soon.

Revision history for this message
Manjeet Singh Bhatia (manjeet-s-bhatia) wrote :

I also had this issue I tried updating setuptools. using

python ez_setup.py -U setuptools and it worked for me.

Revision history for this message
Manjeet Singh Bhatia (manjeet-s-bhatia) wrote :

I agree with Carlos-Garza. even i have pbr (0.11.0) right now on which it worked following steps i mentioned above.

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

Robert's tip seems to work indeed. I get other failures later in the process, but eh, that was expected.

Revision history for this message
Nikolay Fedotov (nfedotov) wrote :

I ran into it too. But after investigation it turned out this is not a bug in my opinion. It seems to me you are trying to install devstack to machine that already have keystonemiddleware==1.5.0 installed (it was in my case). This is not the latest version.
version 1.5.0 depends pbr>=0.6,!=0.7,<1.0
latest version depends on pbr<2.0,>=0.11

As a solution you need to uninstall keystonemiddleware manually or add "PIP_UPGRADE=True" to localrc

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

I do have this issue on a devstack VM where I pulled the latest commits from master today... since then, devstack will fail to start with this error message:

error in setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in

PIP_UPGRADE=True solves this issue.

Since it's a devstack box, all components are git pulled and keystonemiddleware was never installed.

description: updated
summary: - stack.sh downgrades pbr
+ stack.sh downgrades pbr if old dependencies are present
Revision history for this message
Dave McCowan (dave-mccowan) wrote :

I proposed this fix to global-requirements.txt, which should solve this problem, when the change trickles down to the affected components. https://review.openstack.org/198790

Revision history for this message
Chhavi Agarwal (chhagarw) wrote :

I am getting the same error while running the tox
error in setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in MySQL-python;python_version=='2.7' at ;python_version=='2.7'

I tried exporting PIP_UPGRADE=True as well export USE_CONSTRAINTS=True

Revision history for this message
Robert Collins (lifeless) wrote :

tox is not devstack - for tox make sure your virtualenv is up to date.

Revision history for this message
Martin Falatic (martinfalatic) wrote :

I came here because of the tox issue too, and while it's not a stack.sh thing, to close that loop, if you are getting tox problems of a similar sort, odds are your virtualenv package is outdated. More info here:
https://rbtcollins.wordpress.com/2015/07/12/bootstrapping-developer-environments-for-openstack/

Revision history for this message
Gavin (605661532-w) wrote :

I am getting the same error while running sudo pip install -e . for magnum

Revision history for this message
Sean Dague (sdague) wrote :

This devstack bug was last updated over 180 days ago, as devstack
is a fast moving project and we'd like to get the tracker down to
currently actionable bugs, this is getting marked as Invalid. If the
issue still exists, please feel free to reopen it.

Changed in devstack:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers