Cannot encode revokeTree object when mongo is configured as cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.cache |
Expired
|
Medium
|
Unassigned |
Bug Description
When you configure mongo as the cache subsystem for keystone, it fails to store the revoke tree in the cache. This is due that the basetransform only expects single types or dictionaries.
def transform_
"""Used while saving data to MongoDB."""
for (key, value) in list(son.items()):
if isinstance(value, api.CachedValue):
elif isinstance(value, dict): # Make sure we recurse into sub-docs
return son
In mitaka this code has been sent to oslo_cache.mongo but the issue is still there
As a result there is a 500 error on the response for validating a token.
This is the exception I am getting
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
2016-06-23 06:42:13.248 30288 ERROR keystone.
I am opening this here, because with the change from revoketree to revokeevents, maybe there is something to be checked here as well.
Changed in keystone: | |
importance: | Undecided → Medium |
status: | New → Triaged |
affects: | keystone → oslo.cache |
Moved this to oslo.cache, since keystone. common. cache.backends. mongo:MongoCach eBackend moved to oslo_cache. backends. mongo:MongoCach eBackend. I'm guessing we need to add a third case to that method to attempt to pickle complex objects?