openstack创建云主机问题

创建云主机一直失败,查了日志只有nova-conductor.log出现error如下
ERROR nova.scheduler.utils [req-17e50154-2c8b-48b3-8788-0000051bc45e bef013ac1ed5430ead16590618821576 597b213656ff43889490bd26dfc8a238 - default default] [instance: 0ed1f071-e851-464d-9971-ffb333deb277] Error from last host: compute04 (node compute04): [u’Traceback (most recent call last):\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 1828, in _do_build_and_run_instance\n filter_properties, request_spec)\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 2108, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n’, u’RescheduledException: Build of instance 0ed1f071-e851-464d-9971-ffb333deb277 was re-scheduled: Binding failed for port e06ebeea-b444-4e16-a7e4-46fd7146f529, please check neutron logs for more information.\n’]
2019-09-20 15:45:16.409 17424 ERROR nova.scheduler.utils [req-17e50154-2c8b-48b3-8788-0000051bc45e bef013ac1ed5430ead16590618821576 597b213656ff43889490bd26dfc8a238 - default default] [instance: 0ed1f071-e851-464d-9971-ffb333deb277] Error from last host: compute07 (node compute07): [u’Traceback (most recent call last):\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 1828, in _do_build_and_run_instance\n filter_properties, request_spec)\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 2108, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n’, u"RescheduledException: Build of instance 0ed1f071-e851-464d-9971-ffb333deb277 was re-scheduled: [Errno 13] Permission denied: ‘/var/lib/nova/instances/0ed1f071-e851-464d-9971-ffb333deb277’\n"]
2019-09-20 15:47:19.905 17448 ERROR nova.scheduler.utils [req-17e50154-2c8b-48b3-8788-0000051bc45e bef013ac1ed5430ead16590618821576 597b213656ff43889490bd26dfc8a238 - default default] [instance: 0ed1f071-e851-464d-9971-ffb333deb277] Error from last host: compute05 (node compute05): [u’Traceback (most recent call last):\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 1828, in _do_build_and_run_instance\n filter_properties, request_spec)\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 2108, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n’, u’RescheduledException: Build of instance 0ed1f071-e851-464d-9971-ffb333deb277 was re-scheduled: Binding failed for port 2d30c079-bbab-437b-a734-8e03595c5897, please check neutron logs for more information.\n’]
2019-09-20 15:47:19.906 17448 WARNING nova.scheduler.utils [req-17e50154-2c8b-48b3-8788-0000051bc45e bef013ac1ed5430ead16590618821576 597b213656ff43889490bd26dfc8a238 - default default] Failed to compute_task_build_instances: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 0ed1f071-e851-464d-9971-ffb333deb277. Last exception: Binding failed for port 2d30c079-bbab-437b-a734-8e03595c5897, please check neutron logs for more information.: MaxRetriesExceeded: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 0ed1f071-e851-464d-9971-ffb333deb277. Last exception: Binding failed for port 2d30c079-bbab-437b-a734-8e03595c5897, please check neutron logs for more information.
2019-09-20 15:47:19.906 17448 WARNING nova.scheduler.utils [req-17e50154-2c8b-48b3-8788-0000051bc45e bef013ac1ed5430ead16590618821576 597b213656ff43889490bd26dfc8a238 - default default] [instance: 0ed1f071-e851-464d-9971-ffb333deb277] Setting instance to ERROR state.: MaxRetriesExceeded: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 0ed1f071-e851-464d-9971-ffb333deb277. Last exception: Binding failed for port 2d30c079-bbab-437b-a734-8e03595c5897, please check neutron logs for more information.

最后找到标黑部分错误原因
Nova将创建磁盘并将其他必要的VM文件存储到/ var / lib / nova,显然,/ var / lib / nova的所有者应该是“nova”而不是“root”。
如下所示更改所有者:

cd /var/lib/

chown -R nova:nova nova

把所有节点的权限改了一下终于创建成功啦

你可能感兴趣的:(OpenStack)