Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbr 1.0 breaks pyrax #561

Closed
therealmarv opened this issue May 19, 2015 · 11 comments
Closed

pbr 1.0 breaks pyrax #561

therealmarv opened this issue May 19, 2015 · 11 comments

Comments

@therealmarv
Copy link

Yesterday (March 18) pbr 1.0 was released. When doing a normal pip install pyrax with latest pip 6.1.1 it installs 1.0 which is conflicting with pyrax underlying libraries like 'oslo.i18n', 'python-keystoneclient', 'oslo.serialization', 'oslo.utils'.

Full error log we got on our system with a new virtualenv today:

Traceback (most recent call last):
  File "app_context_rqworker.py", line 25, in <module>
    app = create_app(run_as_server=False)
  File "/home/pybossa/pybossa/pybossa/core.py", line 39, in create_app
    setup_uploader(app)
  File "/home/pybossa/pybossa/pybossa/core.py", line 109, in setup_uploader
    uploader.init_app(app)
  File "/home/pybossa/pybossa/pybossa/uploader/rackspace.py", line 49, in init_app
    region=app.config['RACKSPACE_REGION'])
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pyrax/__init__.py", line 438, in _wrapped
    return fnc(*args, **kwargs)
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pyrax/__init__.py", line 504, in set_credentials
    connect_to_services(region=region)
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pyrax/__init__.py", line 626, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pyrax/__init__.py", line 662, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/novaclient/auth_plugin.py", line 40, in discover_auth_systems
    auth_plugin = ep.load()
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2344, in load
    self.require(*args, **kwargs)
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in require
    items = working_set.resolve(reqs, env, installer)
  File "/home/pybossa/pybossa/env/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 838, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pbr 1.0.0 (/home/pybossa/pybossa/env/lib/python2.7/site-packages), Requirement.parse('pbr!=0.7,<1.0,>=0.6'), set(['oslo.i18n', 'python-keystoneclient', 'oslo.serialization', 'oslo.utils']))

We had to pin pbr to a version like 0.11 which is below <1.0 to keep pyrax running.

@sivel
Copy link
Contributor

sivel commented May 19, 2015

This is not pyrax itself, but several of its dependencies. The following outlines the version requirements and the packages that specify the version:

ContextualVersionConflict: (pbr 1.0.0 (/home/pybossa/pybossa/env/lib/python2.7/site-packages), Requirement.parse('pbr!=0.7,<1.0,>=0.6'), set(['oslo.i18n', 'python-keystoneclient', 'oslo.serialization', 'oslo.utils']))

@therealmarv
Copy link
Author

no but it is a serious problem for pyrax. I already tried to make a PR for a two line change in openstack/python-novaclient but they want me to sign a contributor agreement and get used to gerrit which is a littlebit much for a two lines change IMHO. Either you pin a version range in your library or somebody else may contribute that changes to python-novaclient or the oslo libraries. It's a shame that a simple 1.0 change can break so much stuff.

@petersanchez
Copy link

We have the same issue. Only now it's pbr 1.0.1. Things were fine for weeks. Deployed tonight, have this issue popping up.

Does pinning pbr to 0.11 actually provide a usable work-around here?

@therealmarv
Copy link
Author

@petersanchez yes pinning the pbr version to the last version 0.11.0 before 1.0 is exactly what we have done at PyBossa to keep pyrax working. Look here in our setup.py Scifabric/pybossa@73179e7

@sivel
Copy link
Contributor

sivel commented May 20, 2015

I've submitted a bug report upstream to python-novaclient at https://bugs.launchpad.net/python-novaclient/+bug/1457100

@EdLeafe
Copy link
Contributor

EdLeafe commented May 20, 2015

FWIW, there were several upstream issues with pbr 1.0, too: http://lists.openstack.org/pipermail/openstack-dev/2015-May/064362.html

@dandye
Copy link

dandye commented May 27, 2015

I was confounded by the OpenStack git repo until I found the GitHub mirror. Sharing my code snip for checkout and install of the 0.11.0 version:

$ git clone git@github.com:openstack-dev/pbr.git
$ cd pbr
$ git checkout tags/0.11.0
$ python2.7 setup.py install

@humantorch
Copy link

Thanks @dandye, the code snippet you shared sorted the problem for me perfectly!

@sivel
Copy link
Contributor

sivel commented May 27, 2015

An easy solution via pip is to just pip install -I pbr==0.11.0 Additionally, based on testing, something like the following works too: pip install -U oslo.utils as oslo.utils will cause pbr 0.11.0 to be installed.

I'm still following up with the python-novaclient project to see about getting this fixed. The error is actually triggered when you have a novaclient extension installed, causing pbr to trigger a dependency check.

@sivel sivel self-assigned this May 27, 2015
@sivel
Copy link
Contributor

sivel commented May 28, 2015

A commit[1] has just been merged into python-novaclient that addresses the issue. A release has not been cut yet. I will follow up once a new release of python-novaclient has been released with this fix.

[1] https://bugs.launchpad.net/python-novaclient/+bug/1457100/comments/9

@sivel
Copy link
Contributor

sivel commented Jun 3, 2015

As of about 30 minutes ago, python-novaclient 2.26.0 was released that includes the fix for this issue. As such I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants