Certain OpenStack returns HTTP status code 300 for v1 auth

Bug #1570783 reported by Aki Tuomi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Expired
Undecided
Unassigned

Bug Description

It seems that openstack returns status code 300 for v1_auth in some cases. This is considered as error by novaclient, proposing following patch

diff -uN a/client.py b/client.py
--- a/client.py 2016-04-15 13:11:15.436000000 +0300
+++ b/client.py 2016-04-15 13:11:08.436000000 +0300
@@ -624,7 +624,7 @@
             headers['X-Auth-Project-Id'] = self.projectid

         resp, body = self._time_request(url, 'GET', headers=headers)
- if resp.status_code in (200, 204): # in some cases we get No Content
+ if resp.status_code in (200, 204, 300): # in some cases we get No Content
             try:
                 mgmt_header = 'x-server-management-url'
                 self.management_url = resp.headers[mgmt_header].rstrip('/')

Revision history for this message
melanie witt (melwitt) wrote :

It looks like the 300 response is what comes back from keystone v3 when unversioned endpoints are in the service catalog [1]. And the keystone client code is able to use that response to discover available versions.

From what you describe, you client is falling back to old code that only handles keystone v1 and v2 -- not v3. That code should consider 300 response to be an error.

However, there is new code based upon the keystoneclient Session that can properly handle keystone v3 and when that path is taken, things should work for you.

Can you provide more detail about the novaclient command you are running, including options like --os-cache and --bypass-url?

Please see https://bugs.launchpad.net/python-novaclient/+bug/1522402 and maybe comments #11 and #12 will help.

[1] http://docs.openstack.org/developer/keystone/http-api.html#how-do-i-migrate-from-v2-0-to-v3

Changed in python-novaclient:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-novaclient because there has been no activity for 60 days.]

Changed in python-novaclient:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.