分享

openstack 创建实例(VM),报错如下,求大神解决

bule_sky 发表于 2016-11-25 10:29:32 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 6783
ng method: <bound method Controller.create of <nova.api.openstack.compute.servers.Controller object at 0x4cebd10>>, body: {"server": {"name": "vm1", "imageRef": "216de679-e943-4767-a487-3ad0021edd3f", "availability_zone": "nova", "flavorRef": "f500231a-a5cf-4bef-8068-135c7b3556ef", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1, "networks": [{"uuid": "7dd6a3c0-78e1-45e9-a9f1-6986fafa3490"}]}} _process_stack /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:780
2011-01-03 02:06:14.997 6836 ERROR nova.api.openstack [req-712e64c9-18fa-4433-9f66-093b31419b13 7fd1a70bb63b48d999c84397a26d208f 71527ef39c2641d59601364bd23ab699 - - -] Caught error: id
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack Traceback (most recent call last):
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/__init__.py", line 125, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return req.get_response(self.application)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/request.py", line 1317, in send
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     application, catch_exc_info=False)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/request.py", line 1281, in call_application
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return resp(environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 634, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return self._call_app(env, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 554, in _call_app
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return self._app(env, _fake_start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return resp(environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return resp(environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     response = self.app(environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return resp(environ, start_response)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 756, in __call__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     content_type, body, accept)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 821, in _process_stack
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 911, in dispatch
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     return method(req=request, **action_args)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 636, in create
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     self._handle_create_exception(*sys.exc_info())
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 465, in _handle_create_exception
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     six.reraise(*exc_info)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 621, in create
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     check_server_group_quota=check_server_group_quota)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 149, in inner
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     rv = f(*args, **kwargs)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1543, in create
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     check_server_group_quota=check_server_group_quota)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1128, in _create_instance
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     image_id, boot_meta = self._get_image(context, image_href)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 818, in _get_image
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     image = self.image_api.get(context, image_href)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 93, in get
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     show_deleted=show_deleted)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 309, in show
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     include_locations=include_locations)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 483, in _translate_from_glance
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     include_locations=include_locations)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 545, in _extract_attributes
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     queued = getattr(image, 'status') == 'queued'
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glanceclient/openstack/common/apiclient/base.py", line 491, in __getattr__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     self.get()
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glanceclient/openstack/common/apiclient/base.py", line 509, in get
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     new = self.manager.get(self.id)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/glanceclient/openstack/common/apiclient/base.py", line 494, in __getattr__
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack     raise AttributeError(k)
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack AttributeError: id
2011-01-03 02:06:14.997 6836 TRACE nova.api.openstack
2011-01-03 02:06:14.999 6836 INFO nova.api.openstack [req-712e64c9-18fa-4433-9f66-093b31419b13 7fd1a70bb63b48d999c84397a26d208f 71527ef39c2641d59601364bd23ab699 - - -] http://controller:8774/v2/71527ef39c2641d59601364bd23ab699/servers returned with HTTP 500

已有(4)人评论

跳转到指定楼层
nextuser 发表于 2016-11-25 13:58:09
这个错误原因很多,可以升级下安装包
apt-get upgrade  glance python-glanceclient




如果还不能解决,还有可能就是bug的问题

https://bugs.launchpad.net/glance/+bug/1476770,原是glanceclient的一个bug。
你也可以再查看其他相关网址
https://bugs.launchpad.net/python-glanceclient/+bug/1479296
https://bugs.launchpad.net/python-glanceclient/+bug/1323660
按照网站上面给出的建议,似乎要升级glanceclient至0.17.3,好吧,从下面的网址git clone源码, 再安装替换。https://github.com/openstack/python-glanceclient/tree/stable/kilo
重启启动服务
systemctl restart openstack-glance-api.service openstack-glance-registry.service


~~~~~~~~~~~~~~~~~~~~~~~~~~

如果还是没有解决这个问题,我们还要再尝试其他办法。
https://review.openstack.org/#/c/244899/这个帖子里说要替换http.py和images.py两个文件。如果还是不行,可能要考虑重新安装组件了。




以上楼主可以一 一验证,肯定能解决上面问题
回复

使用道具 举报

bule_sky 发表于 2016-11-25 22:59:34
nextuser 发表于 2016-11-25 13:58
这个错误原因很多,可以升级下安装包
apt-get upgrade  glance python-glanceclient

是Centos7 kilo 版本的
回复

使用道具 举报

bule_sky 发表于 2016-11-26 16:09:14
这是Kilo 版本的Bug,安装了高版本python-glanceclient,可解决问题
回复

使用道具 举报

bule_sky 发表于 2016-11-26 16:37:36
弄好后,出现新的问题,求帮助
/var/log/nova/nova-api.log" 1551L, 332240C
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1543, in create
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     check_server_group_quota=check_server_group_quota)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1151, in _create_instance
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     auto_disk_config, reservation_id, max_count)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 904, in _validate_and_build_base_options
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     pci_request_info, requested_networks)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 894, in create_pci_requests_for_sriov_ports
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     neutron = get_client(context, admin=True)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 205, in get_client
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     auth_token = _ADMIN_AUTH.get_token(_SESSION)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 104, in get_token
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     return self.get_access(session).auth_token
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 144, in get_access
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     self.auth_ref = self.get_auth_ref(session)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.py", line 78, in get_auth_ref
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     authenticated=False, log=False)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 497, in post
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     return self.request(url, 'POST', **kwargs)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 318, in inner
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     return func(*args, **kwargs)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack   File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 397, in request
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack     raise exceptions.from_response(resp, method, url)
2011-01-04 19:46:42.226 26068 TRACE nova.api.openstack BadRequest: Expecting to find username or userId in passwordCredentials - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-d5164e44-d317-448f-b7db-5a159fa39d69)
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条