分享

安装OpenStack kilo版本启动实例报500错误

现象是执行nova image-list可以 但是执行nova image-show就报500错误,镜像的详情也查看不了。
有个帖子说升级下glanceclient,但是安装已经是最新的,不知道怎么升级?centos7.2 上安装openstack kilo版,按照官方文档进行安装,一切正常,但在最后启动实例时报以下错误:

ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-a944f919-0630-4174-adc5-eb7984c2e815)

启动命令:

nova --debug boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=7d579a8a-ffe3-4740-9231-16ae4e565add \
--security-group default --key-name demo-key  demo-instance1

nova boot debug显示信息如下:

INFO (connectionpool:213) Starting new HTTP connection (1): controller

DEBUG (connectionpool:393) "GET /v2/92f6f28f68bf40faa99a43b06a667db2/images HTTP/1.1" 200 508

DEBUG (session:224) RESP: [200] Date: Thu, 26 May 2016 03:59:10 GMT Connection: keep-alive Content-Type: application/json Content-Length: 508 X-Compute-Request-Id: req-4905c092-c7d3-4770-a237-783f94c76be5

RESP BODY: {"images": [{"id": "2b901e0b-188b-4691-878b-0028a71c89f7", "links": [{"href": "http://controller:8774/v2/92f6f28f68bf40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7", "rel": "self"}, {"href": "http://controller:8774/92f6f28f68bf40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7", "rel": "bookmark"}, {"href": "http://controller:9292/images/2b901e0b-188b-4691-878b-0028a71c89f7", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "cirros-0.3.4-x86_64"}]}

DEBUG (session:195) REQ: curl -g -i -X GET http://controller:8774/v2/92f6f28f68bf40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}be88412ac3e991cd09dbfebf93058d727dccd321"

DEBUG (connectionpool:393) "GET /v2/92f6f28f68bf40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7 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-366efc36-e3a6-43f7-94d5-fe14d35f9077)

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 495, in do_boot

    boot_args, boot_kwargs = _boot(cs, args)

  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 142, in _boot

    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 216, in find_resource

    return manager.find(**kwargs)

  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 196, in find

    matches = self.findall(**kwargs)

  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 258, in findall

    found.append(self.get(obj.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-366efc36-e3a6-43f7-94d5-fe14d35f9077)

ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-366efc36-e3a6-43f7-94d5-fe14d35f9077)

nova-api.log日志为:

2016-05-26 11:59:10.958 5083 INFO nova.osapi_compute.wsgi.server [req-4905c092-c7d3-4770-a237-783f94c76

be5 2bcd9ac10a4c4013ac0d10c8bc686151 92f6f28f68bf40faa99a43b06a667db2 - - -] 127.0.0.1 "GET /v2/92f6f28

f68bf40faa99a43b06a667db2/images HTTP/1.1" status: 200 len: 705 time: 0.1446760

2016-05-26 11:59:11.319 5083 ERROR nova.api.openstack [req-366efc36-e3a6-43f7-94d5-fe14d35f9077 2bcd9ac

10a4c4013ac0d10c8bc686151 92f6f28f68bf40faa99a43b06a667db2 - - -] Caught error: id

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack Traceback (most recent call last):

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api

/openstack/__init__.py", line 125, in __call__

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     return req.get_response(self.application)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/re

quest.py", line 1317, in send

.............


2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api

/openstack/wsgi.py", line 821, in _process_stack

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     action_result = self.dispatch(meth, request,

action_args)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api

/openstack/wsgi.py", line 911, in dispatch

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     return method(req=request, **action_args)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api

/openstack/compute/images.py", line 83, in show

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     image = self._image_api.get(context, id)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/ima

ge/api.py", line 93, in get

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     show_deleted=show_deleted)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/ima

ge/glance.py", line 309, in show

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     include_locations=include_locations)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/ima

ge/glance.py", line 483, in _translate_from_glance

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     include_locations=include_locations)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/ima

ge/glance.py", line 545, in _extract_attributes

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     queued = getattr(image, 'status') == 'queued'

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glancecl

ient/openstack/common/apiclient/base.py", line 491, in __getattr__

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     self.get()

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glancecl

ient/openstack/common/apiclient/base.py", line 509, in get

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     new = self.manager.get(self.id)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glancecl

ient/openstack/common/apiclient/base.py", line 494, in __getattr__

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack     raise AttributeError(k)

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack AttributeError: id

2016-05-26 11:59:11.319 5083 TRACE nova.api.openstack

2016-05-26 11:59:11.324 5083 INFO nova.api.openstack [req-366efc36-e3a6-43f7-94d5-fe14d35f9077 2bcd9ac1

0a4c4013ac0d10c8bc686151 92f6f28f68bf40faa99a43b06a667db2 - - -] http://controller:8774/v2/92f6f28f68bf

40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7 returned with HTTP 500

2016-05-26 11:59:11.325 5083 INFO nova.osapi_compute.wsgi.server [req-366efc36-e3a6-43f7-94d5-fe14d35f9

077 2bcd9ac10a4c4013ac0d10c8bc686151 92f6f28f68bf40faa99a43b06a667db2 - - -] 127.0.0.1 "GET /v2/92f6f28

f68bf40faa99a43b06a667db2/images/2b901e0b-188b-4691-878b-0028a71c89f7 HTTP/1.1" status: 500 len: 359 ti

me: 0.3621490

2016-05-26 12:05:42.784 5075 INFO nova.osapi_compute.wsgi.server [req-c575436d-23e4-4d81-8cce-688a82be2

789 2bcd9ac10a4c4013ac0d10c8bc686151 92f6f28f68bf40faa99a43b06a667db2 - - -] 127.0.0.1 "GET /v2/92f6f28

f68bf40faa99a43b06a667db2/images/detail HTTP/1.1" status: 200 len: 889 time: 0.9702380


194610oq3xaf033mz7qzt1.png

已有(2)人评论

跳转到指定楼层
einhep 发表于 2016-9-16 15:47:35


这里面的两个文件你覆盖下试试
https://review.openstack.org/#/c/244899/

1.png
回复

使用道具 举报

liuyb2016 发表于 2016-9-18 14:27:57
einhep 发表于 2016-9-16 15:47
这里面的两个文件你覆盖下试试
https://review.openstack.org/#/c/244899/

解决了~大神啊~~万分感谢,终于可以好好睡觉了~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条