Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057615 - neutron-server won't start with missing dependencies due to egg-info/requires.txt
Summary: neutron-server won't start with missing dependencies due to egg-info/requires...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openstack-neutron
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Terry Wilson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-24 13:29 UTC by James Slagle
Modified: 2014-04-07 17:26 UTC (History)
5 users (show)

Fixed In Version: openstack-neutron-2013.2.1-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-07 17:26:32 UTC


Attachments (Terms of Use)

Description James Slagle 2014-01-24 13:29:25 UTC
Description of problem:
neutron-server fails to start with:


Version-Release number of selected component (if applicable):
new Fedora 20 install, all updates applied

neutron packages versions:
[root@localhost ~]# rpm -qa | grep neutron
python-neutron-2013.2.1-1.fc20.noarch
openstack-neutron-ml2-2013.2.1-1.fc20.noarch
python-neutronclient-2.3.1-2.fc20.noarch
openstack-neutron-2013.2.1-1.fc20.noarch
openstack-neutron-openvswitch-2013.2.1-1.fc20.noarch

How reproducible:
always


Steps to Reproduce:
1. Install Fedora 20 
2. yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch
3. ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
4. systemctl start neutron-server

Actual results:
neutron-server fails to start with:

Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 ERROR stevedore.extension [-] Could not load 'vxlan': (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 ERROR stevedore.extension [-] (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension Traceback (most recent call last):
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 89, in _load_plugins
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     invoke_kwds,
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     ep, invoke_on_load, invoke_args, invoke_kwds,
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     plugin = ep.load()
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2107, in load
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     if require: self.require(env, installer)
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2120, in require
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     working_set.resolve(self.dist.requires(self.extras),env,installer)))
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 580, in resolve
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension     raise VersionConflict(dist,req) # XXX put more info here
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension VersionConflict: (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))
Jan 20 13:47:42 localhost.localdomain neutron-server[25874]: 2014-01-20 13:47:42.134 25874 TRACE stevedore.extension


Expected results:

neutron-server should start. I know there's additional configuration that still needs to be done per http://openstack.redhat.com/ML2_plugin, but I can't get past this error.

Additional info:
Probably seems to be the existence of:
/usr/lib/python2.7/site-packages/neutron-2013.2.1-py2.7.egg-info/requires.txt
Which should probably not be packaged.

Our other openstack packages have the following in their %prep of their spec files that present this file from being included:
# Remove the requirements file so that pbr hooks don't add it 
# to distutils requiers_dist config
rm -rf {test-,}requirements.txt tools/{pip,test}-requires

However, even adding that to the neutron spec file doesn't seem to be sufficient because there is a neutron specific setuptools hook in setup.cfg that seems to be causing the requires.txt to always be included.

Comment 1 James Slagle 2014-01-24 13:30:49 UTC
Sorry, slightly better view of that traceback:

[-] Could not load 'vxlan': (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))
[-] (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))
Traceback (most recent call last): 
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 89, in _load_plugins
    invoke_kwds,
  File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
    ep, invoke_on_load, invoke_args, invoke_kwds,
  File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin 
    plugin = ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2107, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2120, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer)))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 580, in resolve
    raise VersionConflict(dist,req) # XXX put more info here 
VersionConflict: (SQLAlchemy 0.8.4 (/usr/lib64/python2.7/site-packages), Requirement.parse('SQLAlchemy>=0.7.8,<=0.7.99'))


That SQLAlchemy requirement is coming directly from the requires.txt

Comment 2 James Slagle 2014-01-24 13:44:39 UTC
If I delete that requires.txt, I can proceed with the neutron-server configuration and it starts fine

Comment 3 James Slagle 2014-01-24 18:50:16 UTC
I don't think this is fixed with just rm'ing requirements.txt.

I looked at the build from http://koji.fedoraproject.org/koji/buildinfo?buildID=493635

and am still seeing:
[jslagle@teletran-1 rpmbuild]$ rpm -qlp python-neutron-2013.2.1-3.fc20.noarch.rpm | grep requires
/usr/lib/python2.7/site-packages/neutron-2013.2.1-py2.7.egg-info/requires.txt

I had also tried something similar with a local build. I think the issue might be that there is a neutron specific setuptools hook in setup.cfg that seems to be causing the requires.txt to always be re-added.

Comment 4 Terry Wilson 2014-01-24 19:02:17 UTC
James, try looking at the contents of the requires.txt file. It shouldn't contain any references to sqlalchemy. Can you run through your test with the new package and see if it fixes for you?

Comment 5 James Slagle 2014-01-24 19:29:12 UTC
Ah, ok, I didn't think to check that.

requires.txt just has pyudev now, which is what gets added by the setuptools hook.

So now you get this trace:
sion [-] Could not load 'vxlan': pyudev
sion [-] pyudev
sion Traceback (most recent call last):
sion   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 89, in _load_plugins
sion     invoke_kwds,
sion   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 57, in _load_one_plugin
sion     ep, invoke_on_load, invoke_args, invoke_kwds,
sion   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 101, in _load_one_plugin
sion     plugin = ep.load()
sion   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2107, in load
sion     if require: self.require(env, installer)
sion   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2120, in require
sion     working_set.resolve(self.dist.requires(self.extras),env,installer)))
sion   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 576, in resolve
sion     raise DistributionNotFound(req)
sion DistributionNotFound: pyudev

Installing python-pyudev fixes that and then neutron-server starts.  So perhaps add a Requires on python-pyudev?

Comment 6 Terry Wilson 2014-01-24 19:45:04 UTC
Looks like the pyudev dependency is being removed upstream: https://review.openstack.org/#/c/66609/ and we have a bug https://bugzilla.redhat.com/show_bug.cgi?id=1053001 to backport that fix. Looks like the patch got hung up in the upstream gate, but since things seem better with the gate now, should be able to fix that.

Comment 7 Dan Prince 2014-02-20 22:02:29 UTC
Almost all the other OpenStack packages remove the requires.txt file. Why not remove it in the Neutron packages too?

Especially since it is proving to be problematic (and may likely be a maintenance problem in the future as well).

Aren't the RPM version checks good enough?

Comment 8 Terry Wilson 2014-02-20 22:35:12 UTC
Dan: We do remove requirements.txt


Note You need to log in before you can comment on or make changes to this bug.