Reviewed: https://review.openstack.org/330707 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d034532d376b6ca2309d20f59ccc060a762ff12c Submitter: Jenkins Branch: master
commit d034532d376b6ca2309d20f59ccc060a762ff12c Author: Ihar Hrachyshka <[email protected]> Date: Thu Jun 16 18:40:08 2016 +0200 cache_utils: fixed cache misses for the new (oslo.cache) configuration When the new (oslo.cache) way of configuring the cache is used, cache is never hit, because self._cache.get() consistently raises exceptions: TypeError: 'sha1() argument 1 must be string or buffer, not tuple' It occurs because the key passed into the oslo.cache region does not conform to oslo.cache requirements. The library enforces the key to be compatible with sha1_mangle_key() function: http://git.openstack.org/cgit/openstack/oslo.cache/tree/oslo_cache/core.py?id=8b8a718507b30a4a2fd36e6c14d1071bd6cca878#n140 With this patch, we transform the key to a string, to conform to the requirements. The bug sneaked into the tree unnoticed because of two reasons: - there were no unit tests to validate the new way of cache configuration. - the 'legacy' code path was configuring the cache in a slightly different way, omitting some oslo.cache code. For the former, new unit tests were introduced that cover the cache on par with the legacy mode. For the latter, the legacy code path was modified to rely on the same configuration path as for the new way. Closes-Bug: #1593342 Change-Id: I2724aa21f66f0fb69147407bfcf3184585d7d5cd ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1593342 Title: metadata agent does not cache results if cache is configured using oslo.cache options Status in neutron: Fix Released Bug description: When the new configuration options from oslo.cache ([cache]enabled, [cache]backend, [cache]expiration_time, etc.) are used to configure the cache instead of the legacy cache_url option, the metadata cache is never hit. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1593342/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

