Bug 807869

Summary: Keystone egg has bad requires
Product: [Fedora] Fedora Reporter: Pete Zaitcev <zaitcev>
Component: openstack-keystoneAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: apevec, apevec, bfilippov, breu, jonathansteffan, markmc, matt_domsch, p, rbryant
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-keystone-2012.2-0.2.f2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-12 23:01:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Zaitcev 2012-03-29 00:58:31 UTC
Description of problem:

Traceback (most recent call last):
  File "/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 122, in run_wsgi
    loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
.............
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (WebOb 1.1.1 (/usr/lib/python2.7/site-packages), Requirement.parse('WebOb==1.0.8'))

Version-Release number of selected component (if applicable):

openstack-keystone-2012.1-0.12.rc1.fc18.noarch

How reproducible:

packaging

Steps to Reproduce:
1. Configure Swift with keystone middleware ("authtoken") in pipeline
2. swift-init main start
  
Actual results:

Traceback

Expected results:

Working like before

Additional info:

The crash happens becasue egg requires, literally, "WebOb==1.0.8".
I have no clue how this leaks into egg, seems happening even when
built on Rawhide with python-webob-1.1.1-2.fc17.

Comment 1 Pete Zaitcev 2012-03-29 01:46:59 UTC
It also requires pam==0.1.4. What in the world is that? Anything to add
to Requires:?

Comment 2 Alan Pevec 2012-03-29 08:40:10 UTC
Those egg requires are from tools/pip-requires
https://github.com/openstack/keystone/blob/master/setup.py#L53
https://github.com/openstack/keystone/blob/master/keystone/openstack/common/setup.py#L57

Interesting that those bad egg requires don't affect authtoken middleware when running in nova and glance pipelines.

Comment 3 Alan Pevec 2012-03-29 08:44:31 UTC
Pete, could you please attach your proxy-server.conf?
Looking at devstack's swift config I see middleware is not specified as an egg:
https://github.com/openstack-dev/devstack/blob/master/files/swift/proxy-server.conf#L34

Comment 4 Russell Bryant 2012-03-29 13:44:24 UTC
(In reply to comment #1)
> It also requires pam==0.1.4. What in the world is that? Anything to add
> to Requires:?

Keystone has an optional pam identity backend.  'pam' isn't in Fedora.  Fedora has PyPAM, which as of fairly recently, is supported by Keystone as well.  It's pretty small so we could add it to Requires for Keystone.

Comment 5 Alan Pevec 2012-03-29 22:41:33 UTC
Using middleware Python class directly instead of egg works, and bad egg requires should be discussed upstream.

Comment 6 Alan Pevec 2012-04-03 19:37:50 UTC
> middleware Python class directly instead of egg

This was just proposed upstream: https://review.openstack.org/#patch,unified,6182,1,keystone/middleware/swift_auth.py

Comment 7 Fedora Admin XMLRPC Client 2012-05-22 17:33:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Alan Pevec 2012-06-26 17:43:20 UTC
Diablo had entry_points, but Keystone >= Essex doesn't have any entry_points in setup.py so use = egg:keystone#... is not valid.

Comment 9 Alan Pevec 2012-06-27 11:04:43 UTC
Even if not used, egg-info in python-* RPMs should be compatible with the system Python libraries:
http://pkgs.fedoraproject.org/gitweb/?p=openstack-keystone.git;a=commitdiff;h=177a2cd37d72337592e462894b5c3f66022bd32c

Comment 10 Fedora End Of Life 2013-04-03 20:22:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 11 Alan Pevec 2013-09-12 23:00:29 UTC
Re. comment 9 - the final solution was to remove[1] all deps from egg-info and let RPM handle dependencies.

[1] http://pkgs.fedoraproject.org/cgit/openstack-keystone.git/tree/openstack-keystone.spec#n107