diff options
| author | Oleg Bondarev <obondarev@mirantis.com> | 2013-03-26 16:37:28 +0400 |
|---|---|---|
| committer | Oleg Bondarev <obondarev@mirantis.com> | 2013-03-26 19:31:45 +0400 |
| commit | 2e30d22ad8b6e35cfffed6a883bf959009707d73 (patch) | |
| tree | 46b252225ed266a4c2dc7e7e60e79c518ce7d395 | |
| parent | 5b075b0a364dc1f9259ded105e08e1982e0fee08 (diff) | |
| download | nova-2e30d22ad8b6e35cfffed6a883bf959009707d73.tar.gz nova-2e30d22ad8b6e35cfffed6a883bf959009707d73.tar.xz nova-2e30d22ad8b6e35cfffed6a883bf959009707d73.zip | |
Make more readable error msg on quantum client authentication failure
Fixes bug 1052495
Change-Id: Ia53d1f1db2b2b720509f29ae70b419f6cfabae17
| -rw-r--r-- | nova/network/quantumv2/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/network/quantumv2/__init__.py b/nova/network/quantumv2/__init__.py index bda0392a9..6d6e7c7bc 100644 --- a/nova/network/quantumv2/__init__.py +++ b/nova/network/quantumv2/__init__.py @@ -17,6 +17,7 @@ from oslo.config import cfg from quantumclient import client +from quantumclient.common import exceptions from quantumclient.v2_0 import client as clientv20 from nova.openstack.common import excutils @@ -38,10 +39,10 @@ def _get_auth_token(): auth_strategy=CONF.quantum_auth_strategy, insecure=CONF.quantum_api_insecure) httpclient.authenticate() - except Exception: + return httpclient.auth_token + except exceptions.QuantumClientException as e: with excutils.save_and_reraise_exception(): - LOG.exception(_("_get_auth_token() failed")) - return httpclient.auth_token + LOG.error(_('Quantum client authentication failed: %s'), e) def _get_client(token=None): |
