← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1623091] [NEW] keystonemidleware dependency should be > 4.0.0

 

Public bug reported:

Right now keystonemiddleware requirement is as follows:

keystonemiddleware!=4.1.0,!=4.5.0,>=4.0.0 # Apache-2.0


Unfortunately, 4.0.0 (which is the minimum) wont work due to a breaking change that changes the _BaseAuthProtocol class to BaseAuthProtocol[0] and that class is used at keystone/middleware/auth.py [1]

This was done in the change from 4.0.0 to 4.1.0 but the requirements
were never bumped. Thus using latest keystone from master and
keystonemiddleware == 4.0.0 results in failure:


2016-09-13 17:06:05.465591 Traceback (most recent call last):
2016-09-13 17:06:05.465603   File "/usr/bin/keystone-wsgi-admin", line 51, in <module>
2016-09-13 17:06:05.465619     application = initialize_admin_application()
2016-09-13 17:06:05.465624   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 132, in initialize_admin_application
2016-09-13 17:06:05.465632     config_files=_get_config_files())
2016-09-13 17:06:05.465636   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 69, in initialize_application
2016-09-13 17:06:05.465641     startup_application_fn=loadapp)
2016-09-13 17:06:05.465645   File "/usr/lib/python2.7/site-packages/keystone/server/common.py", line 50, in setup_backends
2016-09-13 17:06:05.465651     res = startup_application_fn()
2016-09-13 17:06:05.465654   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 66, in loadapp
2016-09-13 17:06:05.465659     'config:%s' % find_paste_config(), name)
2016-09-13 17:06:05.465663   File "/usr/lib/python2.7/site-packages/keystone/version/service.py", line 53, in loadapp
2016-09-13 17:06:05.465702     controllers.latest_app = deploy.loadapp(conf, name=name)
2016-09-13 17:06:05.465709   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2016-09-13 17:06:05.465841     return loadobj(APP, uri, name=name, **kw)
2016-09-13 17:06:05.465853   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2016-09-13 17:06:05.465868     return context.create()
2016-09-13 17:06:05.465876   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
2016-09-13 17:06:05.465897     return self.object_type.invoke(self)
2016-09-13 17:06:05.465903   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
2016-09-13 17:06:05.465909     **context.local_conf)
2016-09-13 17:06:05.465921   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
2016-09-13 17:06:05.465969     val = callable(*args, **kw)
2016-09-13 17:06:05.465980   File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 31, in urlmap_factory
2016-09-13 17:06:05.466084     app = loader.get_app(app_name, global_conf=global_conf)
2016-09-13 17:06:05.466101   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
2016-09-13 17:06:05.466124     name=name, global_conf=global_conf).create()
2016-09-13 17:06:05.466138   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 362, in app_context
2016-09-13 17:06:05.466146     APP, name=name, global_conf=global_conf)
2016-09-13 17:06:05.466152   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context
2016-09-13 17:06:05.466171     global_additions=global_additions)
2016-09-13 17:06:05.466177   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
2016-09-13 17:06:05.466192     for name in pipeline[:-1]]
2016-09-13 17:06:05.466197   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
2016-09-13 17:06:05.466217     section)
2016-09-13 17:06:05.466243   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
2016-09-13 17:06:05.466265     object_type, name=use, global_conf=global_conf)
2016-09-13 17:06:05.466272   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
2016-09-13 17:06:05.466289     global_conf=global_conf)
2016-09-13 17:06:05.466294   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
2016-09-13 17:06:05.466320     global_conf=global_conf)
2016-09-13 17:06:05.466337   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
2016-09-13 17:06:05.466344     return loader.get_context(object_type, name, global_conf)
2016-09-13 17:06:05.466350   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
2016-09-13 17:06:05.466369     object_type, name=name)
2016-09-13 17:06:05.466375   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
2016-09-13 17:06:05.466393     possible.append((entry.load(), protocol, entry.name))
2016-09-13 17:06:05.466404   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
2016-09-13 17:06:05.466735     return self.resolve()
2016-09-13 17:06:05.466750   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
2016-09-13 17:06:05.466772     module = __import__(self.module_name, fromlist=['__name__'], level=0)
2016-09-13 17:06:05.466779   File "/usr/lib/python2.7/site-packages/keystone/middleware/__init__.py", line 15, in <module>
2016-09-13 17:06:05.466835     from keystone.middleware.auth import *  # noqa
2016-09-13 17:06:05.466857   File "/usr/lib/python2.7/site-packages/keystone/middleware/auth.py", line 38, in <module>
2016-09-13 17:06:05.466952     class AuthContextMiddleware(auth_token.BaseAuthProtocol):
2016-09-13 17:06:05.466971 AttributeError: 'module' object has no attribute 'BaseAuthProtocol'


A simple fix would be to change the requirement to blacklist 4.0.0

[0] https://review.openstack.org/#/c/255691/
[1] https://github.com/openstack/keystone/blob/master/keystone/middleware/auth.py#L38

** Affects: keystone
     Importance: Undecided
         Status: New


** Tags: low-hanging-fruit

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1623091

Title:
  keystonemidleware dependency should be > 4.0.0

Status in OpenStack Identity (keystone):
  New

Bug description:
  Right now keystonemiddleware requirement is as follows:

  keystonemiddleware!=4.1.0,!=4.5.0,>=4.0.0 # Apache-2.0

  
  Unfortunately, 4.0.0 (which is the minimum) wont work due to a breaking change that changes the _BaseAuthProtocol class to BaseAuthProtocol[0] and that class is used at keystone/middleware/auth.py [1]

  This was done in the change from 4.0.0 to 4.1.0 but the requirements
  were never bumped. Thus using latest keystone from master and
  keystonemiddleware == 4.0.0 results in failure:

  
  2016-09-13 17:06:05.465591 Traceback (most recent call last):
  2016-09-13 17:06:05.465603   File "/usr/bin/keystone-wsgi-admin", line 51, in <module>
  2016-09-13 17:06:05.465619     application = initialize_admin_application()
  2016-09-13 17:06:05.465624   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 132, in initialize_admin_application
  2016-09-13 17:06:05.465632     config_files=_get_config_files())
  2016-09-13 17:06:05.465636   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 69, in initialize_application
  2016-09-13 17:06:05.465641     startup_application_fn=loadapp)
  2016-09-13 17:06:05.465645   File "/usr/lib/python2.7/site-packages/keystone/server/common.py", line 50, in setup_backends
  2016-09-13 17:06:05.465651     res = startup_application_fn()
  2016-09-13 17:06:05.465654   File "/usr/lib/python2.7/site-packages/keystone/server/wsgi.py", line 66, in loadapp
  2016-09-13 17:06:05.465659     'config:%s' % find_paste_config(), name)
  2016-09-13 17:06:05.465663   File "/usr/lib/python2.7/site-packages/keystone/version/service.py", line 53, in loadapp
  2016-09-13 17:06:05.465702     controllers.latest_app = deploy.loadapp(conf, name=name)
  2016-09-13 17:06:05.465709   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
  2016-09-13 17:06:05.465841     return loadobj(APP, uri, name=name, **kw)
  2016-09-13 17:06:05.465853   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
  2016-09-13 17:06:05.465868     return context.create()
  2016-09-13 17:06:05.465876   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
  2016-09-13 17:06:05.465897     return self.object_type.invoke(self)
  2016-09-13 17:06:05.465903   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 144, in invoke
  2016-09-13 17:06:05.465909     **context.local_conf)
  2016-09-13 17:06:05.465921   File "/usr/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
  2016-09-13 17:06:05.465969     val = callable(*args, **kw)
  2016-09-13 17:06:05.465980   File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 31, in urlmap_factory
  2016-09-13 17:06:05.466084     app = loader.get_app(app_name, global_conf=global_conf)
  2016-09-13 17:06:05.466101   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 350, in get_app
  2016-09-13 17:06:05.466124     name=name, global_conf=global_conf).create()
  2016-09-13 17:06:05.466138   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 362, in app_context
  2016-09-13 17:06:05.466146     APP, name=name, global_conf=global_conf)
  2016-09-13 17:06:05.466152   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context
  2016-09-13 17:06:05.466171     global_additions=global_additions)
  2016-09-13 17:06:05.466177   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
  2016-09-13 17:06:05.466192     for name in pipeline[:-1]]
  2016-09-13 17:06:05.466197   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
  2016-09-13 17:06:05.466217     section)
  2016-09-13 17:06:05.466243   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
  2016-09-13 17:06:05.466265     object_type, name=use, global_conf=global_conf)
  2016-09-13 17:06:05.466272   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
  2016-09-13 17:06:05.466289     global_conf=global_conf)
  2016-09-13 17:06:05.466294   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
  2016-09-13 17:06:05.466320     global_conf=global_conf)
  2016-09-13 17:06:05.466337   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
  2016-09-13 17:06:05.466344     return loader.get_context(object_type, name, global_conf)
  2016-09-13 17:06:05.466350   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
  2016-09-13 17:06:05.466369     object_type, name=name)
  2016-09-13 17:06:05.466375   File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
  2016-09-13 17:06:05.466393     possible.append((entry.load(), protocol, entry.name))
  2016-09-13 17:06:05.466404   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
  2016-09-13 17:06:05.466735     return self.resolve()
  2016-09-13 17:06:05.466750   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
  2016-09-13 17:06:05.466772     module = __import__(self.module_name, fromlist=['__name__'], level=0)
  2016-09-13 17:06:05.466779   File "/usr/lib/python2.7/site-packages/keystone/middleware/__init__.py", line 15, in <module>
  2016-09-13 17:06:05.466835     from keystone.middleware.auth import *  # noqa
  2016-09-13 17:06:05.466857   File "/usr/lib/python2.7/site-packages/keystone/middleware/auth.py", line 38, in <module>
  2016-09-13 17:06:05.466952     class AuthContextMiddleware(auth_token.BaseAuthProtocol):
  2016-09-13 17:06:05.466971 AttributeError: 'module' object has no attribute 'BaseAuthProtocol'


  A simple fix would be to change the requirement to blacklist 4.0.0

  [0] https://review.openstack.org/#/c/255691/
  [1] https://github.com/openstack/keystone/blob/master/keystone/middleware/auth.py#L38

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1623091/+subscriptions


Follow ups