pbr version conflict

Bug #1457100 reported by sivel
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Designate
Won't Fix
Undecided
Unassigned
python-designateclient
Won't Fix
Undecided
Unassigned
python-novaclient
Fix Released
High
Doug Hellmann

Bug Description

The current version of python-novaclient has a dependency on pbr specified by pbr>=0.11,<2.0. Unfortunately with the release of pbr 1.0.0 the requirement pulls in 1.0.0 (or 1.0.1) which is incompatible with the pbr version required for:

oslo.i18n
python-keystoneclient
oslo.serialization
oslo.utils

This results in the following error:

ERROR (ContextualVersionConflict): (pbr 1.0.1 (/Users/matt/python_venvs/tmp-33f824993191418f/lib/python2.7/site-packages), Requirement.parse('pbr!=0.7,<1.0,>=0.6'), set(['oslo.i18n', 'python-keystoneclient', 'oslo.serialization', 'oslo.utils']))

Downgrading to pbr==0.11.0 resolves the problem.

sivel (sivel)
description: updated
Revision history for this message
melanie witt (melwitt) wrote :

I'm not able to reproduce the problem when I 'pip install python-novaclient' (version 2.25.0). Could you please describe how you encountered this?

Changed in python-novaclient:
status: New → Incomplete
Revision history for this message
sivel (sivel) wrote :

That is odd. I was able to get it to happen reliably yesterday while using a temporary virtual environment with only installing python-novaclient. Unfortunately I deactivated it and it was deleted.

However, under a slightly new scenario I can still get it to happen.

If I have an auth_plugin that registers itself via the openstack.client.auth_plugin entrypoint. The moment that ep.load() is called from novaclient.auth_plugin.discover_auth_systems I get the above message.

Even if the class that the entry point references does nothing such as:

class TestAuthPlugin(object):
    pass

Revision history for this message
sivel (sivel) wrote :

The origination of this report is initially from https://github.com/rackspace/pyrax/issues/561

With 'rackspace-auth-openstack' installed is when I was able to reproduce it today. Removing it indicated that being the issue. But I have replicated it with the above sample that performs no function.

melanie witt (melwitt)
Changed in python-novaclient:
status: Incomplete → New
Revision history for this message
melanie witt (melwitt) wrote :

Thanks for that info. How are you installing the rackspace plugin? So far, my concern is whoever is packaging the auth plugin -- it sounds like maybe they need to release a new version that meshes with the current novaclient version.

Revision history for this message
Nicolas Bär (nicolas-baer) wrote :

I encountered this problem as well. It installs novaclient without any issue, but then when you use it, it will throw the above error message.

For the following requirements pip will install pbr 1.0.1
novaclient requirements [1]: pbr>=0.11,<2.0
oslo.config requirements [2]: pbr>=0.6,!=0.7,<1.0

[1]: https://github.com/openstack/python-novaclient/blob/2.25.0/requirements.txt
[2]: https://github.com/openstack/oslo.config/blob/1.11.0/requirements.txt

Revision history for this message
sivel (sivel) wrote :

As previously mentioned, I can cause this bug to happen with a auth plugin that actually does nothing:

https://gist.github.com/sivel/4eab70746b747affa9b3

In fact, if I comment out the line using setuptools.find_packages in setup.py and install no python file at all, the entry point will still cause this error to happen. Such as installing using a setup.py that looks like:

https://gist.github.com/sivel/cb98f8d98849a030e970

As long as you have an entrypoint for openstack.client.auth_plugin or novaclient.extension it will cause this error as soon as ep.load() is called.

Revision history for this message
Bob Ball (bob-ball) wrote :

Confirmed that it happens with me too:
"virtualenv /tmp/env; . /tmp/env/bin/activate/; pip install rackspace-novaclient; nova list"

The error I Get is http://paste.openstack.org/show/239540/

Changed in python-novaclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
assignee: nobody → Doug Hellmann (doug-hellmann)
status: Confirmed → In Progress
melanie witt (melwitt)
Changed in python-novaclient:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/186111
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=e649cea843b8453d268da8ea74ea180f513d5ea3
Submitter: Jenkins
Branch: master

commit e649cea843b8453d268da8ea74ea180f513d5ea3
Author: Doug Hellmann <email address hidden>
Date: Wed May 27 18:08:02 2015 +0000

    Do not check requirements when loading entry points

    Update the calls to pkg_resources to avoid forcing a requirements check
    when the plugins are being loaded.

    There are 2 versions of the entry point API in different releases of
    setuptools. In one version, the require keyword argument can be passed
    to load(). In the other, separate methods resolve() and require() need
    to be used. This change updates the mock and fake objects to support
    either, since the fakes are subclasses of the EntryPoint class in
    pkg_resources.

    It would be better to replace the calls to pkg_resources with stevedore,
    which provides a more stable API, abstracts away this difference, and
    provides an API for creating test managers directly. That change would
    have required more extensive updates to the test suite, though, and
    since I'm not as familiar with this code base as others will be, I will
    leave those changes for someone else.

    Change-Id: I2a9aeb53ccad04c7fa687f25340306b84218f9ff
    Partial-bug: #1457100

Revision history for this message
melanie witt (melwitt) wrote :

Marking as Fix Committed because it solves the problem. There's some desire to keep novaclient's dependencies to a minimum, but either way, I think changing to use stevedore can be considered a future improvement.

Changed in python-novaclient:
status: In Progress → Fix Committed
Revision history for this message
Keisuke Yamamoto (keisuk-yamamoto) wrote :

pbr 1.0.1 conflict occurred by designate install.

# python setup.py develop
...
Installed /var/lib/designate
Processing dependencies for designate==2015.2.0.dev83
error: Installed distribution pbr 1.0.1 conflicts with requirement pbr>=0.6,!=0.7,<1.0

Install pbr v0.11 in advance.
Designate installing is Finished.

# pip install pbr==0.11
# python setup.py develop
...
Using /var/lib/designate/.venv/lib/python2.7/site-packages
Finished processing dependencies for designate==2015.2.0.dev83

Matt Riedemann (mriedem)
Changed in python-novaclient:
milestone: none → 2.26.0
Matt Riedemann (mriedem)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Tim Simmons (timsim)
Changed in python-designateclient:
status: New → Confirmed
Changed in designate:
status: New → Confirmed
sonu (sonu-bhumca11)
Changed in python-designateclient:
assignee: nobody → sonu (sonu-bhumca11)
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)
sonu (sonu-bhumca11)
Changed in designate:
assignee: sonu (sonu-bhumca11) → nobody
Changed in python-designateclient:
assignee: sonu (sonu-bhumca11) → nobody
Changed in designate:
status: Confirmed → Won't Fix
Changed in python-designateclient:
status: Confirmed → Won't Fix
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.