yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04195
[Bug 1181356] Re: python-cinderclient does not authenticate using keystone v3 in OS_AUTH_URL
I'm setting this bug to invalid because the correct CLI that will
support keystone V3 is python-openstackclient.
** Changed in: python-cinderclient
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1181356
Title:
python-cinderclient does not authenticate using keystone v3 in
OS_AUTH_URL
Status in OpenStack Dashboard (Horizon):
Invalid
Status in Python client library for Cinder:
Invalid
Bug description:
When using keystone V3 on CINDER CLI, it's failing to authenticate
because python-cinderclient understand this is a V1 protocol and fail
to get token.
You can see below, it works using keystone v2:
$ export OS_AUTH_URL=http://127.0.0.1:5000/v2.0
$ export OS_REGION_NAME=RegionOne
$ export OS_USERNAME=admin
$ export OS_PASSWORD=secrete
$ export OS_TENANT_NAME=admin
$ cinder list
+----+--------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+----+--------+--------------+------+-------------+----------+-------------+
+----+--------+--------------+------+-------------+----------+-------------+
However, when define keystone v3, it fails:
$ export OS_AUTH_URL=http://127.0.0.1:5000/v3
$ cinder list
ERROR: 'NoneType' object has no attribute 'rstrip'
$ cinder --debug list
REQ: curl -i http://127.0.0.1:5000/v3 -X GET -H "X-Auth-Project-Id:
admin" -H "X-Auth-Key: secrete" -H "Accept: application/json" -H "X
-Auth-User: admin" -H "User-Agent: python-cinderclient"
RESP: [200] {'date': 'Fri, 17 May 2013 18:22:54 GMT', 'content-type': 'application/json', 'content-length': '331', 'vary': 'X-Auth-Token'}
RESP BODY: {"version": {"status": "stable", "updated": "2013-03-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v3+xml"}], "id": "v3.0", "links": [{"href": "http://localhost:35357/v3/", "rel": "self"}]}}
DEBUG (shell:506) 'NoneType' object has no attribute 'rstrip'
Traceback (most recent call last):
File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 501, in main
OpenStackCinderShell().main(map(strutils.safe_decode, sys.argv[1:]))
File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 445, in main
self.cs.authenticate()
File "/opt/stack/python-cinderclient/cinderclient/v1/client.py", line 81, in authenticate
self.client.authenticate()
File "/opt/stack/python-cinderclient/cinderclient/client.py", line 292, in authenticate
auth_url = self._v1_auth(auth_url)
File "/opt/stack/python-cinderclient/cinderclient/client.py", line 314, in _v1_auth
self.management_url = resp.headers[mgmt_header].rstrip('/')
AttributeError: 'NoneType' object has no attribute 'rstrip'
ERROR: 'NoneType' object has no attribute 'rstrip'
$
Using curl, I'm capable to authenticate using keystone V3 and request
to list volumes using the token received from keystone V3:
$ curl -X POST http://127.0.0.1:5000/v3/auth/tokens -H "accept: application/json" -H "Content-type: application/json" -d "{ \"auth\": { \"identity\": { \"methods\": [ \"password\" ], \"password\": { \"user\": { \"domain\": { \"name\": \"Default\" }, \"name\": \"admin\", \"password\": \"secrete\" } } }, \"scope\": { \"project\": { \"domain\":{ \"name\": \"Default\" }, \"name\": \"admin\" } } } }" -s -D - -o /dev/null
HTTP/1.1 201 Created
X-Subject-Token: MIIS2wYJKoZIh.......TMrckQVSDQ==
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 4513
Date: Fri, 17 May 2013 18:30:47 GMT
$ curl http://127.0.0.1:8776/v2/a7703321085a4e958f5863ddebf61b39/volumes -H "accept: application/json" -H "x-auth-token: MIIS2wYJKoZIh.......TMrckQVSDQ=="
{"volumes": []}
$
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1181356/+subscriptions