← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1452955] Re: Client does not catch exceptions when making a token authentication request

 

python-keystoneclient do raise a ConnectionRefused exception if it could
not connect to the Keystone endpoint.

The horizon component that invokes keystone do actually catch this error and log a debug msg. I can see this message in the log:
"Unable to establish connection to http://<some_bad_url>:5000/v3/auth/tokens"

Horizon code that handles the exception from python-keystoneclient:

        except (keystone_exceptions.ClientException,
                keystone_exceptions.AuthorizationFailure) as exc:
            msg = _("An error occurred authenticating. "
                    "Please try again later.")
            LOG.debug(str(exc))
            raise exceptions.KeystoneAuthException(msg)

I think horizon should perform a LOG.error() for connection refused,
since it is configuration error instead of LOG.debug().


** Also affects: django-openstack-auth
   Importance: Undecided
       Status: New

** Changed in: python-keystoneclient
       Status: New => Invalid

** Changed in: django-openstack-auth
     Assignee: (unassigned) => Lin Hua Cheng (lin-hua-cheng)

** Tags added: kilo-backport-potential

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1452955

Title:
  Client does not catch exceptions when making a token authentication
  request

Status in Django OpenStack Auth:
  New
Status in OpenStack Identity (Keystone):
  Invalid
Status in Python client library for Keystone:
  Invalid

Bug description:
  keystoneclient.auth.identity.v3.token.TokenMethod does a
  session.post() without catching exceptions.

  In my case, I had a misconfigured DNS which meant that this post()
  never succeeded, however the error that ends up going back to Horizon
  is a simplified:

  "Login failed: An error occurred authenticating. Please try again
  later."

  which makes no mention of the underlying cause, nor do the keystone
  logs. This caused me an enormous amount of wasted time debugging, the
  error could certainly be improved here!

To manage notifications about this bug go to:
https://bugs.launchpad.net/django-openstack-auth/+bug/1452955/+subscriptions


References