问题描述:
出现这个500错误的原因是python-glanceclient版本过高。当我执行glance image-list glance image-show f114bed4-2116-4943-92c8-092842370b01 nova image-list的时候都不报错,但是执行nova image-show f114bed4-2116-4943-92c8-092842370b01的时候会返回以下错误:
nova image-show f114bed4-2116-4943-92c8-092842370b01
ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-5b3caf5c-7806-4623-a1f8-f3ae448c0599)
[root@controller ~]# nova --debug image-show f114bed4-2116-4943-92c8-092842370b01
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:393) "GET /v3 HTTP/1.1" 200 250
DEBUG (session:224) RESP: [200] Content-Length: 250 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Connection: Keep-Alive Date: Fri, 17 Jun 2016 17:14:58 GMT Content-Type: application/json x-openstack-request-id: req-b756936d-6a91-46a7-8ee0-44f3c7d4592e
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}
DEBUG (base:171) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool:393) "POST /v3/auth/tokens HTTP/1.1" 201 2257
DEBUG (session:195) REQ: curl -g -i -X GET http://controller:8774/v2/dbf7d4ba55aa4f1fa11978c99e11c890/images/f114bed4-2116-4943-92c8-092842370b01 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}2f6da6c3efa76a2a376cc42d478c06e96686a3f9"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:393) "GET /v2/dbf7d4ba55aa4f1fa11978c99e11c890/images/f114bed4-2116-4943-92c8-092842370b01 HTTP/1.1" 500 128
DEBUG (session:224) RESP:
DEBUG (shell:914) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-af38eba4-0ce0-4d65-bfc2-589d1a9916e0)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 911, in main
OpenStackComputeShell().main(argv)
File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 838, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1186, in do_image_show
image = _find_image(cs, args.image)
File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1894, in _find_image
return utils.find_resource(cs.images, image)
File "/usr/lib/python2.7/site-packages/novaclient/utils.py", line 206, in find_resource
return manager.get(tmp_id)
File "/usr/lib/python2.7/site-packages/novaclient/v2/images.py", line 53, in get
return self._get("/images/%s" % base.getid(image), "image")
File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 156, in _get
_resp, body = self.api.client.get(url)
File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 170, in get
return self.request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 96, in request
raise exceptions.from_response(resp, body, url, method)
ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-af38eba4-0ce0-4d65-bfc2-589d1a9916e0)
ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-af38eba4-0ce0-4d65-bfc2-589d1a9916e0)
解决方法:升级一下python-glanceclient的版本,然后重启服务器就可以解决了。。。 |