Merge "Log an actual error message when failed to load new style credentials"
This commit is contained in:
commit
42da97575d
@ -17,8 +17,10 @@ import copy
|
|||||||
from keystoneauth1 import exceptions as kaexception
|
from keystoneauth1 import exceptions as kaexception
|
||||||
from keystoneauth1 import loading as kaloading
|
from keystoneauth1 import loading as kaloading
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import log
|
||||||
|
|
||||||
|
|
||||||
|
LOG = log.getLogger(__name__)
|
||||||
LEGACY_SECTION = 'keystone_authtoken'
|
LEGACY_SECTION = 'keystone_authtoken'
|
||||||
OLD_SESSION_OPTS = {
|
OLD_SESSION_OPTS = {
|
||||||
'certfile': [cfg.DeprecatedOpt('certfile', LEGACY_SECTION)],
|
'certfile': [cfg.DeprecatedOpt('certfile', LEGACY_SECTION)],
|
||||||
@ -35,7 +37,9 @@ cfg.CONF.import_group(LEGACY_SECTION, 'keystonemiddleware.auth_token')
|
|||||||
def load_auth(conf, group):
|
def load_auth(conf, group):
|
||||||
try:
|
try:
|
||||||
auth = kaloading.load_auth_from_conf_options(conf, group)
|
auth = kaloading.load_auth_from_conf_options(conf, group)
|
||||||
except kaexception.MissingRequiredOptions:
|
except kaexception.MissingRequiredOptions as exc:
|
||||||
|
LOG.debug('Failed to load credentials from group %(grp)s: %(err)s',
|
||||||
|
{'grp': group, 'err': exc})
|
||||||
auth = None
|
auth = None
|
||||||
return auth
|
return auth
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user