auth_token's _cache_store() passes unexpected kwarg 'timeout'

Bug #1102520 reported by Dolph Mathews
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-keystoneclient
New
Undecided
Unassigned

Bug Description

keystone's unit tests are failing for me due to a recent change to the auth_token middleware.

======================================================================
ERROR: test_memcache_set_expired (test_auth_token_middleware.AuthTokenMiddlewareTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dolph/Projects/keystone/tests/test_auth_token_middleware.py", line 636, in test_memcache_set_expired
    self.middleware(req.environ, self.start_fake_response)
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 344, in __call__
    token_info = self._validate_user_token(user_token)
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 579, in _validate_user_token
    self._cache_store_invalid(user_token)
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 794, in _cache_store_invalid
    self._cache_store(token, 'invalid')
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 771, in _cache_store
    timeout=self.token_cache_time)
TypeError: set() got an unexpected keyword argument 'timeout'
-------------------- >> begin captured logging << --------------------
keystoneclient.middleware.auth_token: INFO: Starting keystone auth_token middleware
keystoneclient.middleware.auth_token: INFO: Using /Users/dolph/Projects/keystone/examples/pki/certs as cache directory for signing certificate
keystoneclient.middleware.auth_token: DEBUG: Authenticating user token
keystoneclient.middleware.auth_token: DEBUG: Removing headers from request environment: X-Identity-Status,X-Tenant-Id,X-Tenant-Name,X-User-Id,X-User-Name,X-Roles,X-Service-Catalog,X-User,X-Tenant,X-Role
keystoneclient.middleware.auth_token: DEBUG: Cached Token f86032107074597fd03ad639b968bf6a seems expired
keystoneclient.middleware.auth_token: DEBUG: Storing f86032107074597fd03ad639b968bf6a token in memcache
keystoneclient.middleware.auth_token: DEBUG: Token validation failure.
Traceback (most recent call last):
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 575, in _validate_user_token
    self._cache_put(token_id, data)
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 787, in _cache_put
    self._cache_store(token, data, expires)
  File "/Users/dolph/Projects/keystone/vendor/python-keystoneclient-master/keystoneclient/middleware/auth_token.py", line 771, in _cache_store
    timeout=self.token_cache_time)
TypeError: set() got an unexpected keyword argument 'timeout'
keystoneclient.middleware.auth_token: DEBUG: Marking token [removed] as unauthorized in memcache
--------------------- >> end captured logging << ---------------------

Dolph Mathews (dolph)
Changed in python-keystoneclient:
assignee: nobody → Guang Yee (guang-yee)
Revision history for this message
Dolph Mathews (dolph) wrote :

Undoing this commit seemed to fix the above error: https://review.openstack.org/#/c/18909/

Dolph Mathews (dolph)
Changed in python-keystoneclient:
assignee: Guang Yee (guang-yee) → nobody
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.