cfg.CONF must not be used directly
cfg.CONF must not be used directly, Config().oslo_conf_obj must be used instead. Closes-bug: #1737119 Change-Id: I58ec9e25c7f04a8352535d8861e09c7e4c4c0a9d
This commit is contained in:
parent
a08bc44e04
commit
4531809d60
@ -559,6 +559,8 @@ class AuthProtocol(BaseAuthProtocol):
|
||||
_base.AUTHTOKEN_GROUP,
|
||||
list_opts(),
|
||||
conf)
|
||||
if self._conf.oslo_conf_obj != cfg.CONF:
|
||||
oslo_cache.configure(self._conf.oslo_conf_obj)
|
||||
|
||||
token_roles_required = self._conf.get('service_token_roles_required')
|
||||
|
||||
@ -957,9 +959,8 @@ class AuthProtocol(BaseAuthProtocol):
|
||||
|
||||
def _create_oslo_cache(self):
|
||||
# having this as a function makes test mocking easier
|
||||
conf = cfg.CONF
|
||||
region = oslo_cache.create_region()
|
||||
oslo_cache.configure_cache_region(conf, region)
|
||||
oslo_cache.configure_cache_region(self._conf.oslo_conf_obj, region)
|
||||
return region
|
||||
|
||||
def _token_cache_factory(self):
|
||||
|
6
releasenotes/notes/bug-1737119-4afe548d28fbf8bb.yaml
Normal file
6
releasenotes/notes/bug-1737119-4afe548d28fbf8bb.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- >
|
||||
[`bug 1737119 <https://bugs.launchpad.net/keystonemiddleware/+bug/1737119>`_]
|
||||
If the application was not using the global cfg.CONF object, the configuration
|
||||
was not read from the configuration file. This have been fixed.
|
Loading…
Reference in New Issue
Block a user