[Bug 1034837] Re: authentication token expiry with openstack provider

Jim Baker 1034837 at bugs.launchpad.net
Sat Sep 22 04:42:18 UTC 2012


According to http://docs.openstack.org/api/quick-
start/content/index.html#Getting-Credentials-a00665, code using the
OpenStack REST API should request a new token upon receiving a 401
status code, then retry.

In the OpenStack provider, for every client request, the
`_OpenStackClient.is_authenticated` method is checked to see if a token
needs to be first requested. However, as currently implemented, this
method will never reset to being False. So solving this bug simply
requires ensuring that any 401 status code does in fact do that;
something as simple as setting `self.token = None` in the `_empty` and
`_json` result processing methods should suffice. (We can also return a
better exception too, so as to improve the logging in the provisioning
agent, just to indicate this expiration is to be occasionally expected.)

With that change, the provisioning agent will retry as it always does
when it encounters provider errors, thus fufilling the requirements of
the above link, and thereby fixing this bug.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to juju in Ubuntu.
https://bugs.launchpad.net/bugs/1034837

Title:
  authentication token expiry with openstack provider

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju/+bug/1034837/+subscriptions



More information about the Ubuntu-server-bugs mailing list