StackTrace on 2012.1.4 middleware when storing token in memcache with SWIFT 1.7.4

Bug #1115284 reported by Alejandro Comisario
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned
Essex
Invalid
Undecided
Unassigned
Folsom
Invalid
Undecided
Unassigned

Bug Description

when integrating Keystone 2012.1.4 with SWIFT, and swift-proxy is configured to cache tokens in memcache, we get a response "500 internal server error" from swift because keystone.middleware.auth_token stacktraces with :
"TypeError: %d format: a number is required, not str" in two situations.

#1 when a new token wants to be cached
#2 when an invalid ( non existent or expired ) token is cached

For the #1 & #2 cases, we patched /usr/local/lib/python2.7/dist-packages/keystone-2012.1.[VERS]-py2.7.egg/keystone/middleware/auth_token.py in the line 151 and replaced :

self.token_cache_time = conf.get('token_cache_time', 300)
with
self.token_cache_time = int(conf.get('token_cache_time', 300))

We think its a big and anoying bug when you need this feature from keystone ( most of serious SWIFT implementations )
Thanks !!

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Revision history for this message
Dolph Mathews (dolph) wrote :

Installing the latest version of python-keystoneclient and using keystoneclient.middleware.auth_token instead of keystone.middleware.auth_token from essex or folsom should be a viable workaround.

Dolph Mathews (dolph)
Changed in keystone:
status: New → Invalid
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.