Ask Your Question
0

glance image-list is fine but, nova image-list error

asked 2015-12-14 02:02:26 -0500

recital gravatar image

updated 2015-12-14 18:22:48 -0500

I am installing liberty release on centos7 with one controller and one compute node. nova service-list and nova endpoints work fine. But, nova image-list returns the following error.

ERROR(ClientException) : Unexpected API Error. Please report this at http://bugs.launchpad.net/nova and attach the Nova API log if possible.
<class 'glanceclient.exc.HTTPInternalServerError'> (HTTP 500) (Request-ID: ...)

glance image-list works fine. Pls, help me out.

the nova-api.log is following.

2015-12-14 16:29:56.071 9986 INFO nova.osapi_compute.wsgi.server [req-496b5df0-e28f-486b-8386-96f704433daf 504f2af1b9044a3e97bc69e80daf5809 8de4c51458804564b79932efa364524b - - -] 192.168.219.11 "GET /v2/ HTTP/1.1" status: 200 len: 572 time: 0.0285130
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions [req-e65f8242-8d2c-43f1-af66-362f3161b655 504f2af1b9044a3e97bc69e80daf5809 8de4c51458804564b79932efa364524b - - -] Unexpected exception in API method
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 478, in wrapped
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/images.py", line 145, in detail
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     **page_params)
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 68, in get_all
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     return session.detail(context, **kwargs)
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 284, in detail
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     for image in images:
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 254, in list
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     for image in paginate(params, return_request_id):
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 238, in paginate
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     images, resp = self._list(url, "images")
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/glanceclient/v1/images.py", line 63, in _list
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     resp, body = self.client.get(url)
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 280, in get
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions     return self._request('GET', url, **kwargs)
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 272, in _request
2015-12-14 16:30:01.676 9986 ERROR nova.api.openstack.extensions ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-14 22:13:05 -0500

recital gravatar image

updated 2015-12-14 22:13:59 -0500

I solved this problem. It's because keystone version is set as v2.0. You should change it as v3.

In "openstack endpoint list", it should be like this.

public & internal : http://controller:5000/v2.0 --> http://controller:5000/v3
admin : http://controller:5000/v2.0 --> http://controller:35357/v3

I refered to this site to change keystone db.

http://www.cloudkb.net/how-to-change-keystone-api-v2-v3/

You don't have to change "policy.json" file as instructed in the above site. After change the db, reboot your system. And all the CLI commands work well.

Thanks. recital.

edit flag offensive delete link more

Comments

I have the same problem and they same set up like you, but changing version didn't do the trick for me

still got the error after I rebooted the box, is this a bug and is there already a bug report?

thrawn gravatar imagethrawn ( 2015-12-23 11:32:46 -0500 )edit

okay found my problem. Password was not the same in glance-registry.conf and glance-api.conf https://bugs.launchpad.net/nova/+bug/1514480 (https://bugs.launchpad.net/nova/+bug/...)

thrawn gravatar imagethrawn ( 2015-12-23 13:11:17 -0500 )edit
0

answered 2015-12-14 02:33:38 -0500

Prateek K gravatar image

You might have missed this configuration in nova.conf

[glance] api_servers = http:://<controllerip>:9292

edit flag offensive delete link more

Comments

I inserted "api_servers=http://controller:9292" in glance section on the controller node. After that, "su -s /bin/sh -c "nova-manage db sync" nova" and restart all the nova services. But, same problem happens when executing "nova image-list" on the controller node.

recital gravatar imagerecital ( 2015-12-14 03:13:40 -0500 )edit

OK ... try this and see if it works now:---

[glance] host = controller

Prateek K gravatar imagePrateek K ( 2015-12-14 03:52:31 -0500 )edit

I used the configuration at the first time. It didn't work...

recital gravatar imagerecital ( 2015-12-14 03:56:20 -0500 )edit

ok... now it is becoming interesting... can you run the following command and paste the output here :-

nova --debug image-list

Prateek K gravatar imagePrateek K ( 2015-12-14 04:03:24 -0500 )edit

I posted the logs for "nova --debug image-list" on the above.

recital gravatar imagerecital ( 2015-12-14 04:19:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-12-14 02:02:26 -0500

Seen: 4,366 times

Last updated: Dec 14 '15