summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Wiegley <doug@parksidesoftware.com>2015-12-31 12:32:37 -0700
committerDoug Wiegley <dougw@a10networks.com>2015-12-31 12:33:25 -0700
commitc514b855d1faed8947ace885bb4656da541d4d2b (patch)
treef25534d7a0dbee73e467bcfcb9b415660f034e8c
parentf3678f03deac0230e1265a8a516a8eea11d301cf (diff)
downloados-client-config-c514b855d1faed8947ace885bb4656da541d4d2b.tar.gz
Debug log a deferred keystone exception, else we mask some useful diag
Change-Id: Ib1921698bb61f44193034065749b4e246a6258db
-rw-r--r--os_client_config/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index b572645..d490006 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -26,6 +26,7 @@ from keystoneauth1 import adapter
from keystoneauth1 import loading
import yaml
+from os_client_config import _log
from os_client_config import cloud_config
from os_client_config import defaults
from os_client_config import exceptions
@@ -170,6 +171,8 @@ class OpenStackConfig(object):
def __init__(self, config_files=None, vendor_files=None,
override_defaults=None, force_ipv4=None,
envvar_prefix=None, secure_files=None):
+ self.log = _log.setup_logging(__name__)
+
self._config_files = config_files or CONFIG_FILES
self._secure_files = secure_files or SECURE_FILES
self._vendor_files = vendor_files or VENDOR_FILES
@@ -920,6 +923,7 @@ class OpenStackConfig(object):
# but OSC can't handle it right now, so we try deferring
# to ksc. If that ALSO fails, it means there is likely
# a deeper issue, so we assume the ksa error was correct
+ self.log.debug("Deferring keystone exception: {e}".format(e=e))
auth_plugin = None
try:
config = self._validate_auth_ksc(config)