nova image-list could not find any suitable endpoint [closed]
I just installed openstack folsom and verified that keystone and glance installations. However, verification of installation of compute node failed when running:
nova image-list
but when I run the glance image-list, I got back all images correctly. What is possibly wrong with my installation of the compute node?
Here is the output from the --debug:
REQ: curl -i http://10.0.0.2:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "openstackDemo", "passwordCredentials": {"username": "admin", "password": "changeit123"}}}'
RESP:{'date': 'Fri, 19 Apr 2013 18:27:50 GMT', 'vary': 'X-Auth-Token', 'content-length': '2161', 'status': '200', 'content-type': 'application/json'} {"access": {"token": {"expires": "2013-04-20T18:27:50Z", "id": "4a823a9aa7f249f1ae37b50afcc0d984", "tenant": {"enabled": true, "description": "Default OpenStack Demo Tenant", "name": "openstackDemo", "id": "93d99faec60246899e1f4ae20b00c504"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.0.0.2:8776/v1/93d99faec60246899e1f4ae20b00c504", "region": "Region1", "internalURL": "http://10.0.0.2:8776/v1/93d99faec60246899e1f4ae20b00c504", "id": "d966ffae069b4d5d91d95a04964e1cce", "publicURL": "http://10.0.0.2:8776/v1/93d99faec60246899e1f4ae20b00c504"}], "endpoints_links": [], "type": "volume", "name": "volume"}, {"endpoints": [{"adminURL": "http://10.0.0.2:9292/v1", "region": "Region1", "internalURL": "http://10.0.0.2:9292/v1", "id": "856ed8ad17bd48a49ad5d6771cfc97ea", "publicURL": "http://10.0.0.2:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://10.0.0.2:8774/v2/93d99faec60246899e1f4ae20b00c504", "region": "Region1", "internalURL": "http://10.0.0.2:8774/v2/93d99faec60246899e1f4ae20b00c504", "id": "adf550c7fd834608827edf0aec80c40f", "publicURL": "http://10.0.0.2:8774/v2/93d99faec60246899e1f4ae20b00c504"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.0.0.2:8773/services/Admin", "region": "Region1", "internalURL": "http://10.0.0.2:8773/services/Cloud", "id": "18e873b8f1b6444385a1f85531ba068c", "publicURL": "http://10.0.0.2:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://10.0.0.2:35357/v2.0", "region": "Region1", "internalURL": "http://10.0.0.2:5000/v2.0", "id": "52d09c74c0a0464386ceca8c8bbcf76c", "publicURL": "http://10.0.0.2:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "82e5f815c6d64a47916be10aae890926", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["e1892593af7d414c8062c27f8e72b7e3"]}}}
REQ: curl -i http://10.0.0.2:8774/v2/93d99faec60246899e1f4ae20b00c504/images/detail -X GET -H "X-Auth-Project-Id: openstackDemo" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 4a823a9aa7f249f1ae37b50afcc0d984"
RESP:{'date': 'Fri, 19 Apr 2013 18:27:50 GMT', 'status': '400', 'content-length': '65', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-5f11353f-1edb-4934-bd4e-f5f359165d98'} {"badRequest": {"message": "Malformed request url", "code": 400}}
DEBUG (shell:543) Malformed request url (HTTP 400) (Request-ID: req-5f11353f-1edb-4934-bd4e-f5f359165d98)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 540, in main
OpenStackComputeShell().main(sys.argv[1:])
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 476, in main
args.func(self.cs, args)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 517, in do_image_list
image_list = cs.images.list()
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/images.py", line 47, in list
return self._list("/images/detail", "images")
File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 62, in _list
_resp, body = self.api.client.get(url)
File "/usr/lib/python2.6/site-packages/novaclient/client ...
Please give us more info, you can run command in debug mode: nova --debug image-list This will show detailed output and you will see which endpoint is using.
I have traced the problem to $PYTHONSITEINSTALLEDDIR/nova/api/openstack/wsgi.py (line 932) and found that wsgi raised the exception of {"badRequest": {"message": "Malformed request url", "code": 400}} due to context.projectid != projectid. When I printed the values of these variable, context.projectid is the auth tokenid (4a823a9aa7f249f1ae37b50afcc0d984)that was returned from keystone while the projectid is actually the tenant_id of openstackDemo(id=93d99faec60246899e1f4ae20b00c504)
But I run the the command "keystone token-get" successfully, which mean the userid=admin and adminpassword=xxxxx must be authenticated successfully with keystone. What is going on?
Can someone help?
The problem might be in your keystone endpoints. Other modules use keystone as a "library" of endpoints to reach each other. Could you send us the result of
$keystone service-list
and#keystone endpoint-list
?Please see top of the thread for output from nova --debug image-list.
Please see the output of nova --debug image-list on top.
tracing the file nova/api/openstack/wsgi.py leads me to the method call getbody. Since there is no content-type in the request, the function getbody returns empty content.
How does wsgi server intercept the request http://10.0.0.2:8774/v2/93d99faec60246899e1f4ae20b00c504/images/detail and route the request to the right service?