keystone tenant-list fails w/ API version mismatch
Running keystone tenant-list
fails with The resource could not be found. (HTTP 404)
.
After running the same command with --debug
, I've found out that the following curl
command is being called:
curl -i -X GET http://<ip>:35357/v3/tenants -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: <token>"
When I directly run the same curl command with /v3/tenants
changed to v2.0/tenants
I seem to get a correct response:
HTTP/1.1 200 OK
Date: Fri, 02 Dec 2016 19:39:52 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-6ed58a46-49a0-4e4a-8790-dd254985b7d2
Content-Length: 275
Content-Type: application/json
{"tenants_links": [], "tenants": [{"description": "Bootstrap project for initializing the cloud.", "enabled": true, "id": "ee92b7f988134221afd8cd1e8ea16322", "name": "admin"}, {"description": "", "enabled": true, "id": "2238f8fc20f44f59b2e100de3d7b429c", "name": "service"}]}
I've also tried to run the same curl command with v3/projects
, getting a correct response as well:
HTTP/1.1 200 OK
Date: Fri, 02 Dec 2016 19:41:28 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-954c15ff-7aa7-4e85-8f59-a9aa2b178010
Content-Length: 669
Content-Type: application/json
{"links": {"self": "http://192.168.8.99:35357/v3/projects", "previous": null, "next": null}, "projects": [{"is_domain": false, "description": "", "links": {"self": "http://192.168.8.99:35357/v3/projects/2238f8fc20f44f59b2e100de3d7b429c"}, "enabled": true, "id": "2238f8fc20f44f59b2e100de3d7b429c", "parent_id": "default", "domain_id": "default", "name": "service"}, {"is_domain": false, "description": "Bootstrap project for initializing the cloud.", "links": {"self": "http://192.168.8.99:35357/v3/projects/ee92b7f988134221afd8cd1e8ea16322"}, "enabled": true, "id": "ee92b7f988134221afd8cd1e8ea16322", "parent_id": "default", "domain_id": "default", "name": "admin"}]}
My questions are:
- Why isn't
keystone
using the correct version? - How do I make keystone use the correct version number?
Other info:
- Keystone client version: 0.7.1
- Keystone version: 9.2.1
If it's not the correct version, something wasn't done correctly during installation or upgrade. In any case, the keystone client has been deprecated for a few releases and is obsolete in Newton. Have you tried
openstack project list
?In case you are running Mitaka, the keystone client should be version2.1.0 or higher. See releasenotes: http://docs.openstack.org/releasenote...
Thank you Bernd,
Using 'openstack project list' solved the issue.
Also, I realized I was using a really old version for the keystone client, as you suggested in your second comment (it should have been obvious to me, but, oh well...).
Thank you!