Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【openstack 使用中问题】nova中从镜像启动(创建一个新卷)失败 #4

Closed
meetbill opened this issue Jan 2, 2018 · 0 comments

Comments

@meetbill
Copy link
Owner

meetbill commented Jan 2, 2018

0 openstack 使用中issues

issues 汇总表

1 错误提示

界面提示如下

错误: 实例 "测试vm" 执行所请求操作失败,实例处于错误状态。: 请稍后再试 [错误: Build of instance fc5e4c94-ff40-440d-b55a-289344a6905f aborted: Block Device Mapping is Invalid.].

2 计算节点 compute 日志

/var/log/nova/nova-compute.log

2018-01-02 22:59:55.999 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Attempting claim: memory 2048 MB, disk 20 GB, vcpus 1 CPU
2018-01-02 22:59:55.999 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Total memory: 65503 MB, used: 37376.00 MB
2018-01-02 22:59:56.000 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] memory limit: 98254.50 MB, free: 60878.50 MB
2018-01-02 22:59:56.000 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Total disk: 29789 GB, used: 360.00 GB
2018-01-02 22:59:56.001 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] disk limit: 29789.00 GB, free: 29429.00 GB
2018-01-02 22:59:56.001 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Total vcpu: 24 VCPU, used: 18.00 VCPU
2018-01-02 22:59:56.002 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] vcpu limit not specified, defaulting to unlimited
2018-01-02 22:59:56.003 983 INFO nova.compute.claims [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Claim successful
2018-01-02 22:59:56.226 983 INFO nova.scheduler.client.report [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Submitted allocation for instance
2018-01-02 22:59:56.500 983 WARNING nova.virt.libvirt.driver [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Ignoring supplied device name: /dev/vda. Libvirt can't honour user-supplied dev names
2018-01-02 22:59:56.660 983 INFO nova.virt.block_device [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Booting with blank volume at /dev/vda
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Instance failed block device setup
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Traceback (most recent call last):
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1585, in _prep_block_device
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     wait_func=self._await_block_device_map_created)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 512, in attach_block_devices
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     _log_and_attach(device)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 509, in _log_and_attach
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     bdm.attach(*attach_args, **attach_kwargs)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 402, in attach
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     self._call_wait_func(context, wait_func, volume_api, vol['id'])
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 361, in _call_wait_func
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     {'volume_id': volume_id, 'exc': exc})
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     self.force_reraise()
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     six.reraise(self.type_, self.value, self.tb)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 351, in _call_wait_func
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     wait_func(context, volume_id)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1257, in _await_block_device_map_created
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     volume_status=volume_status)
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] VolumeNotCreated: Volume 219b20df-98aa-4323-b93d-79ade2ccf792 did not finish being created even after we waited 192 seconds or 61 attempts. And its status is creating.
2018-01-02 23:03:13.605 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] 
2018-01-02 23:03:13.620 983 WARNING nova.compute.manager [req-91ed0863-b90c-4b72-a369-5586ac77c4cf 928e94ad58544d2593fbeb2fe2b33399 7f85571e17e143caac52d3b2dd2426ad - - -] [instance: 5af7b694-737e-4dcb-b683-53672f2cac7f] Received unexpected event network-vif-plugged-af55152d-d385-4d75-bfb2-40da5c592ea3 for instance
2018-01-02 23:03:13.651 983 INFO nova.scheduler.client.report [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] Deleted allocation for instance fc5e4c94-ff40-440d-b55a-289344a6905f
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Build of instance fc5e4c94-ff40-440d-b55a-289344a6905f aborted: Block Device Mapping is Invalid.
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Traceback (most recent call last):
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1781, in _do_build_and_run_instance
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     filter_properties)
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1962, in _build_and_run_instance
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     phase=fields.NotificationPhase.ERROR, exception=e)
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     self.force_reraise()
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     six.reraise(self.type_, self.value, self.tb)
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1915, in _build_and_run_instance
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     block_device_mapping) as resources:
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     return self.gen.next()
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2113, in _build_resources
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f]     reason=e.format_message())
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] BuildAbortException: Build of instance fc5e4c94-ff40-440d-b55a-289344a6905f aborted: Block Device Mapping is Invalid.
2018-01-02 23:03:13.875 983 ERROR nova.compute.manager [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] 
2018-01-02 23:03:14.927 983 INFO nova.compute.manager [req-4b06ca16-2c34-4eef-835b-e9a64b24328f 4fbbc04387104728ace24fae7df970a1 367aa003a97349ba8fcd54de4a24185b - - -] [instance: fc5e4c94-ff40-440d-b55a-289344a6905f] Took 1.05 seconds to deallocate network for instance.

3 分析问题及解决方法

问题是因为从镜像并创建新卷方式启动时,创建新卷需要在【控制节点上cinder 的临时转换目录】中,将镜像转换为卷失败,分析及解决方法详见issues 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant