keystonemidleware dependency should be > 4.0.0

Bug #1623091 reported by Itxaka Serrano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Itxaka Serrano

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

tamil vanan (tamilhce)
Changed in keystone:
assignee: nobody → tamil vanan (tamilhce)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

tags: added: rc-potential
Revision history for this message
Steve Martinelli (stevemar) wrote :

Exactly what action was performed to generate this error?

Revision history for this message
Steve Martinelli (stevemar) wrote :

OK, I get it now. I opened https://review.openstack.org/#/c/369624/ for this change, but it'll tight as we're in requirements freeze right now.

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
Steve Martinelli (stevemar) wrote :

As stated by tonyb, this will have to wait until the next release -> http://lists.openstack.org/pipermail/openstack-dev/2016-September/103639.html

Removing the RC potential tag.

tags: removed: rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in keystone:
assignee: tamil vanan (tamilhce) → Itxaka Serrano (itxakaserrano)
Revision history for this message
Itxaka Serrano (itxaka) wrote :

As stated by both tonyb and stevemar, as now its too late to change the requirements, I did an alternate patch as a compatibility layer for 4.0.0 which we can remove afterwards.

Changed in keystone:
assignee: Itxaka Serrano (itxakaserrano) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Itxaka Serrano (itxakaserrano)
milestone: none → newton-rc1
Changed in keystone:
assignee: Itxaka Serrano (itxakaserrano) → Boris Bobrov (bbobrov)
Changed in keystone:
assignee: Boris Bobrov (bbobrov) → Itxaka Serrano (itxakaserrano)
tags: added: rc-potential
Changed in keystone:
assignee: Itxaka Serrano (itxakaserrano) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Itxaka Serrano (itxakaserrano)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/370011
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=9bbb0ce7a83e4af9f4ef04a35e6779dffaeb7e15
Submitter: Jenkins
Branch: master

commit 9bbb0ce7a83e4af9f4ef04a35e6779dffaeb7e15
Author: Itxaka <email address hidden>
Date: Wed Sep 14 12:19:45 2016 +0200

    Allow compatibility with keystonemiddleware 4.0.0

    On keystonemiddleware 4.0.0 the base class is called
    _BaseAuthProtocol, which was later changed to BaseAuthProtocol.
    Due to this change keystone would not work with the 4.0.0
    version, while it was still accepted in the requirements.
    This fixes it by providing a fallback to the old naming

    Change-Id: I859a2d15e63c8c857b0bcbb15c757b716c8c43ba
    Closes-Bug: 1623091

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 10.0.0.0rc1

This issue was fixed in the openstack/keystone 10.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Samuel de Medeiros Queiroz (<email address hidden>) on branch: master
Review: https://review.openstack.org/369598

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.