keystonemiddleware/keystonemiddleware
Tim Burke 86904543eb Handle DiscoveryFailure errors
DiscoveryFailures can happen for a variety of reasons, ranging
from service misconfiguration to a keystone outage to a transient
network failure. If we don't catch and handle the failure here,
it will almost certainly cause something further up the WSGI stack
to send a 500 Internal Error (and likely log a traceback).

A log line like

    Unable to validate token: Could not find versioned identity
    endpoints when attempting to authenticate. Please check that
    your auth_url is correct. Unable to establish connection to
    http://keystone:35357: HTTPConnectionPool(host='keystone',
    port=35357): Max retries exceeded with url: / (Caused by
    NewConnectionError('<urllib3.connection.HTTPConnection
    object at 0x7fc53e22e050>: Failed to establish a new
    connection: [Errno 111] ECONNREFUSED',))

should be plenty enough for an operator to assess the situation;
I don't need a 29-frame traceback.

Change-Id: I946388c09b2ca0230d2cef009c679a7ac7c8398f
2018-08-01 23:26:13 +00:00
..
_common Replace six.iteritems() with .items() 2017-07-12 13:43:55 +07:00
audit Add option to disable using oslo_message notifier 2018-02-20 11:26:22 +01:00
auth_token Handle DiscoveryFailure errors 2018-08-01 23:26:13 +00:00
echo Replace six.iteritems() with .items() 2017-07-12 13:43:55 +07:00
locale Imported Translations from Zanata 2018-05-01 07:09:40 +00:00
tests Handle DiscoveryFailure errors 2018-08-01 23:26:13 +00:00
__init__.py Moving middleware to new location 2014-06-19 15:50:41 -07:00
ec2_token.py use oslo.log instead of logging 2017-01-13 03:24:18 +00:00
exceptions.py Create a Config object 2016-06-10 18:21:56 +00:00
fixture.py Remove use of positional decorator 2017-08-07 13:18:19 -07:00
i18n.py Update URLs in documentation 2017-07-20 16:38:16 +08:00
opts.py Move auth token opts calculation into auth_token 2016-06-13 14:03:23 -03:00
s3_token.py Rename auth_uri to www_authenticate_uri 2017-10-11 14:00:49 +02:00