[openstack-dev] nova cli commands fail with 404. devstack installation from today
Bob Hansen
hansenb at us.ibm.com
Thu Jan 21 19:48:08 UTC 2016
Found it. The contents of the admin file
(e.g. ../devstack/accrc/admin/admin) that I sourced for the admin
credentials do not work with the nova cli. This combination of OS_*
variables produced the error.
export OS_PROJECT_NAME="admin"
export OS_AUTH_URL="http://127.0.0.1:35357"
export OS_CACERT=""
export OS_AUTH_TYPE=v2password
export OS_PASSWORD="secretadmin"
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
this combination works with nova, glance and neutron.
export OS_PROJECT_NAME=admin
export OS_PASSWORD=secretadmin
export OS_AUTH_URL=http://127.0.0.1:35357
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_CACERT=
To be honest, I've seen so many examples of the 'correct' set of
environment variables with different AUTH_TYPES, it's very hard to tell
which variable 'set' is appropriate for which AUTH_TYPE and version of the
keystone API.
A pointer to this sort of information is appreciated.
Bob Hansen
z/VM OpenStack Enablement
From: Bob Hansen/Endicott/IBM at IBMUS
To: "OpenStack Development Mailing List \(not for usage questions
\)" <openstack-dev at lists.openstack.org>
Date: 01/21/2016 10:46 AM
Subject: Re: [openstack-dev] nova cli commands fail with 404. devstack
installation from today
Yes, it is image-list not image list. I don't seem to be able to find any
other hints in any of the nova logs.
nova --debug image-list shows this:
DEBUG (extension:157) found extension EntryPoint.parse('token =
keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:157) found extension EntryPoint.parse('v3token =
keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:157) found extension EntryPoint.parse('password =
keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (v2:62) Making authentication request to
http://127.0.0.1:35357/tokens
INFO (connectionpool:207) Starting new HTTP connection (1): 127.0.0.1
DEBUG (connectionpool:387) "POST /tokens HTTP/1.1" 404 93
DEBUG (session:439) Request returned failure status: 404
DEBUG (shell:894) The resource could not be found. (HTTP 404)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line
892, in main
OpenStackComputeShell().main(argv)
File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line
726, in main
api_version = api_versions.discover_version(self.cs, api_version)
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py",
line 267, in discover_version
client)
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py",
line 248, in _get_server_version_range
version = client.versions.get_current()
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/versions.py",
line 83, in get_current
return self._get_current()
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/versions.py",
line 56, in _get_current
url = "%s" % self.api.client.get_endpoint()
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py",
line 132, in get_endpoint
return self.session.get_endpoint(auth or self.auth, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py",
line 634, in get_endpoint
return auth.get_endpoint(self, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py",
line 209, in get_endpoint
service_catalog = self.get_access(session).service_catalog
File
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/base.py",
line 135, in get_access
self.auth_ref = self.get_auth_ref(session)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/identity/v2.py",
line 64, in get_auth_ref
authenticated=False, log=False)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py",
line 545, in post
return self.request(url, 'POST', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/_utils.py", line
180, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py",
line 440, in request
raise exceptions.from_response(resp, method, url)
NotFound: The resource could not be found. (HTTP 404)
Bob Hansen
z/VM OpenStack Enablement
Inactive hide details for "Chen CH Ji" ---01/21/2016 04:25:28 AM---Guess
it's image-list instead of image list,right? maybe yo"Chen CH Ji"
---01/21/2016 04:25:28 AM---Guess it's image-list instead of image
list,right? maybe you can check with nova --debug image-list
From: "Chen CH Ji" <jichenjc at cn.ibm.com>
To: "OpenStack Development Mailing List \(not for usage questions\)"
<openstack-dev at lists.openstack.org>
Date: 01/21/2016 04:25 AM
Subject: Re: [openstack-dev] nova cli commands fail with 404. devstack
installation from today
Guess it's image-list instead of image list,right? maybe you can check with
nova --debug image-list and see the API which was
send to nova-api server then analyze the nova api log to know what's
exactly the error?
-----"Bob Hansen" <hansenb at us.ibm.com> wrote: -----
To: openstack-dev at lists.openstack.org
From: "Bob Hansen" <hansenb at us.ibm.com>
Date: 01/20/2016 10:31PM
Subject: [openstack-dev] nova cli commands fail with 404. devstack
installation from today
Installed devstack today, this morning actually, and most everything
works.... except simple nova cli commands, nova image list, list,
flavor-list all fail).... glance ok, nuetron ok,
As an example, nova image list returns:
devstack$ nova image list
ERROR (NotFound): The resource could not be found. (HTTP 404)
However the command; openstack image list returns the correct list of
cirros images, plus one I have already imported.
key.log has:
127.0.0.1 - - [20/Jan/2016:21:10:49 +0000] "POST /tokens HTTP/1.1" 404 93
"-" "keystoneauth1/2.2.0 python-requests/2.9.1 CPython/2.7.6" 2270(us)
Clearly an authentication thing. Since other commands work, e.g. neutorn
subnet-list, I concluded keystone auth is just fine.
I suspect it is something in nova.conf. [keystone_auth] has this in it,
which stack.sh built
[keystone_authtoken]
signing_dir = /var/cache/nova
cafile = /opt/stack/data/ca-bundle.pem
auth_uri = http://127.0.0.1:5000
project_domain_id = default
project_name = service
user_domain_id = default
password = secretservice
username = nova
auth_url = http://127.0.0.1:35357
auth_type = password
Any suggestions on where else to look?
Bob Hansen
z/VM OpenStack Enablement
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160121/de7fe3e5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160121/de7fe3e5/attachment.gif>
More information about the OpenStack-dev
mailing list