yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #19421
[Bug 1315049] Re: 'Provider' object has no attribute 'revoke_api'
Fix proposed to branch: master
Review: https://review.openstack.org/116374
** Changed in: keystone
Status: Invalid => In Progress
** Changed in: keystone
Assignee: (unassigned) => werner mendizabal (nonameentername)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1315049
Title:
'Provider' object has no attribute 'revoke_api'
Status in OpenStack Identity (Keystone):
In Progress
Status in Keystone icehouse series:
Confirmed
Bug description:
In token/provider.py, the following triggers an exception if
revoke_api is not loaded
if self.revoke_api is not None:
....
The fix is to set self.revoke_api to None in the init:
def __init__(self):
super(Manager, self).__init__(self.get_token_provider())
self.revoke_api = None
To recreate this, run the test_auth.py unit test:
nosetests test_auth.py
======================================================================
ERROR: keystone.tests.test_auth.TokenExpirationTest.test_maintain_uuid_token_expiration
----------------------------------------------------------------------
_StringException: pythonlogging:'': {{{
Adding cache-proxy 'keystone.tests.test_cache.CacheIsolatingProxy' to backend.
KVS region configuration for token-driver: {'keystone.kvs.arguments.distributed_lock': True, 'keystone.kvs.backend': 'openstack.kvs.Memory', 'keystone.kvs.arguments.lock_timeout': 6}
Using default dogpile sha1_mangle_key as KVS region token-driver key_mangler
It is recommended to only use the base key-value-store implementation for the token driver for testing purposes. Please use keystone.token.backends.memcache.Token or keystone.token.backends.sql.Token instead.
found extension EntryPoint.parse('qpid = oslo.messaging._drivers.impl_qpid:QpidDriver')
found extension EntryPoint.parse('zmq = oslo.messaging._drivers.impl_zmq:ZmqDriver')
found extension EntryPoint.parse('kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('rabbit = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('fake = oslo.messaging._drivers.impl_fake:FakeDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
found extension EntryPoint.parse('nova.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('nova.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
found extension EntryPoint.parse('nova.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('log = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('messagingv2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('noop = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('routing = oslo.messaging.notify._impl_routing:RoutingDriver')
found extension EntryPoint.parse('test = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('messaging = oslo.messaging.notify._impl_messaging:MessagingDriver')
CADF Event: {'typeURI': 'http://schemas.dmtf.org/cloud/audit/1.0/event', 'initiator': {'typeURI': 'service/security/account/user', 'host': {}, 'id': 'openstack:01fefc8a-3fe9-4c44-b862-43d6f6ca171a', 'name': 'foo'}, 'target': {'typeURI': 'service/security/account/user', 'id': 'openstack:35588d31-1d48-467c-86fc-e9c5e5d360c3'}, 'observer': {'typeURI': 'service/security', 'id': 'openstack:fb2003ab-096c-4314-bb01-abb51acd5220'}, 'eventType': 'activity', 'eventTime': '2014-05-01T12:00:06.363039+0000', 'action': 'authenticate', 'outcome': 'pending', 'id': 'openstack:097f6616-4e38-486c-a39e-2f5c071c9b34'}
CADF Event: {'typeURI': 'http://schemas.dmtf.org/cloud/audit/1.0/event', 'initiator': {'typeURI': 'service/security/account/user', 'host': {}, 'id': 'openstack:01fefc8a-3fe9-4c44-b862-43d6f6ca171a', 'name': 'foo'}, 'target': {'typeURI': 'service/security/account/user', 'id': 'openstack:0ce4487f-dbcb-447c-9dd4-d3f364fb4244'}, 'observer': {'typeURI': 'service/security', 'id': 'openstack:53821d40-623d-4500-9552-09e6d87b0b4c'}, 'eventType': 'activity', 'eventTime': '2014-05-01T12:00:06.401262+0000', 'action': 'authenticate', 'outcome': 'success', 'id': 'openstack:9082f9a5-4e84-466c-a50f-a46a8230be09'}
Parsed 2014-05-01T13:00:06Z into {'tz_sign': None, 'second_fraction': None, 'hour': '13', 'daydash': '01', 'tz_hour': None, 'month': None, 'timezone': 'Z', 'second': '06', 'tz_minute': None, 'year': '2014', 'separator': 'T', 'monthdash': '05', 'day': None, 'minute': '00'} with default timezone <iso8601.iso8601.Utc object at 0x1b53590>
Got '2014' for 'year' with default None
Got '05' for 'monthdash' with default 1
Got 5 for 'month' with default 5
Got '01' for 'daydash' with default 1
Got 1 for 'day' with default 1
Got '13' for 'hour' with default None
Got '00' for 'minute' with default None
Got '06' for 'second' with default None
KVS lock acquired for: usertokens-foo
KVS lock released for: usertokens-foo
RBAC: Bypassing authorization
NeedRegenerationException
no value, waiting for create lock
value creation lock <dogpile.cache.region._LockWrapper object at 0x3ad3ed0> acquired
Calling creation function
Released creation lock
}}}
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/keystone/tests/test_auth.py", line 974, in test_maintain_uuid_token_expiration
self._maintain_token_expiration()
File "/usr/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/usr/lib/python2.7/site-packages/keystone/tests/test_auth.py", line 949, in _maintain_token_expiration
token_id=unscoped_token_id)
File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 152, in inner
return f(self, context, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/keystone/token/controllers.py", line 412, in validate_token
return self.token_provider_api.validate_v2_token(token_id, belongs_to)
File "/usr/lib/python2.7/site-packages/keystone/token/provider.py", line 137, in validate_v2_token
self.check_revocation_v2(token)
File "/usr/lib/python2.7/site-packages/keystone/token/provider.py", line 127, in check_revocation_v2
if self.revoke_api is not None:
File "/usr/lib/python2.7/site-packages/keystone/common/manager.py", line 74, in __getattr__
f = getattr(self.driver, name)
AttributeError: 'Provider' object has no attribute 'revoke_api'
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1315049/+subscriptions
References