Certain OpenStack returns HTTP status code 300 for v1 auth
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 @@
resp, body = self._time_
- 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:
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