Include the auth_url in the discovery failure message
The failed to discover message pops up a lot because it means that we didn't get a sensible response to the version list request a plugin makes. Debugging this can be a pain, but it's easier if we at least know the URL that failed to be called. Change-Id: Ibaa89b43b23ebacb72f441fde01dfd79b927f977
This commit is contained in:
parent
02745f0c8d
commit
3364703d3b
@ -136,9 +136,9 @@ class BaseGenericPlugin(base.BaseIdentityPlugin):
|
||||
except (exceptions.DiscoveryFailure,
|
||||
exceptions.HttpError,
|
||||
exceptions.ConnectionError):
|
||||
LOG.warning('Discovering versions from the identity service '
|
||||
'failed when creating the password plugin. '
|
||||
'Attempting to determine version from URL.')
|
||||
LOG.warning('Failed to discover available identity versions when '
|
||||
'contacting %s. Attempting to parse version from URL.',
|
||||
self.auth_url)
|
||||
|
||||
url_parts = urlparse.urlparse(self.auth_url)
|
||||
path = url_parts.path.lower()
|
||||
|
@ -121,6 +121,7 @@ class GenericPluginTestCase(utils.TestCase):
|
||||
def test_disc_error_for_failure(self):
|
||||
self.stub_url('GET', [], status_code=403)
|
||||
self.assertDiscoveryFailure()
|
||||
self.assertIn(self.TEST_URL, self.logger.output)
|
||||
|
||||
def test_v3_plugin_from_failure(self):
|
||||
url = self.TEST_URL + 'v3'
|
||||
|
Loading…
Reference in New Issue
Block a user