我正在写一个新手司机。驱动程序只包含了我们服务的一些REST API。
创建计算节点时,"权限被拒绝"错误被抛出 amqpdriver.py:341。
我整个下午都在调试,但没有运气。 我认为该错误可能是由有关消息传递服务器的某些权限设置引起的。而且我认为这与我们的司机没什么关系。 有人可以帮忙吗?
日志:
2015-10-12 23:08:25.447 4654 INFO oslo_messaging._drivers.impl_rabbit [-] Connecting to AMQP server on os-svr:5672
2015-10-12 23:08:25.458 4654 INFO oslo_messaging._drivers.impl_rabbit [-] Connected to AMQP server on os-svr:5672
2015-10-12 23:08:25.671 4654 INFO nova.virt.bluecube.driver [req-503143f9-ff96-4779-806a-4cb6c5f6b0e9 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] ..........
2015-10-12 23:08:25.671 4654 INFO nova.virt.bluecube.driver [req-503143f9-ff96-4779-806a-4cb6c5f6b0e9 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] {u'status': u'active', u'deleted': False, u'container_format': u'bare', u'min_ram': 0, u'updated_at': u'2015-10-12T10:50:41.000000', u'min_disk': 0, u'owner': u'9700d79ee83b4522b6bc7edfb135f967', u'is_public': True, u'deleted_at': None, u'properties': {}, u'size': 13287936, u'name': u'cirros-0.3.4-x86_64', u'checksum': u'ee1eca47dc88f4879d8a229cc70a07c6', u'created_at': u'2015-10-12T10:50:41.000000', u'disk_format': u'qcow2', u'id': u'a67d9dd0-c69f-4083-b92b-8c5d8be5887a'}
2015-10-12 23:08:25.672 4654 INFO nova.virt.bluecube.vmops [req-503143f9-ff96-4779-806a-4cb6c5f6b0e9 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] [instance: 255ce379-7a74-4d5f-8382-aa3b507bb9fc] Spawning new instance
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager [-] Instance failed network setup after 1 attempt(s)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager Traceback (most recent call last):
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1783, in _allocate_network_async
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager dhcp_options=dhcp_options)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/api.py", line 49, in wrapped
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager return func(self, context, *args, **kwargs)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/base_api.py", line 64, in wrapper
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager res = f(self, context, *args, **kwargs)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/api.py", line 281, in allocate_for_instance
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager nw_info = self.network_rpcapi.allocate_for_instance(context, **args)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/network/rpcapi.py", line 152, in allocate_for_instance
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager macs=jsonutils.to_primitive(macs))
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 156, in call
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager retry=self.retry)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 90, in _send
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager timeout=timeout, retry=retry)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 350, in send
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager retry=retry)
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 341, in _send
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager raise result
2015-10-12 23:08:26.551 4654 ERROR nova.compute.manager OSError: [Errno 13] Permission deined
答案 0 :(得分:0)
root错误发生在nova-network.log。
根据日志,某些文件操作会引发权限错误。
我专注于nova-compute,所以只需跳过操作而无需任何修复。 在nova.conf中,添加该选项,可以跳过大部分网络操作。
fake_network=True
以下是nova-compute.log中的错误
2015-10-13 17:13:41.150 814 ERROR oslo_messaging.rpc.dispatcher [req-1ab6c333-c5ab-4906-94aa-820dc2de1d14 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] Exception during message handling: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/networks'
2015-10-13 17:13:41.150 814 ERROR oslo_messaging.rpc.dispatcher OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/networks'
2015-10-13 17:13:41.153 814 ERROR oslo_messaging._drivers.common [req-1ab6c333-c5ab-4906-94aa-820dc2de1d14 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] Returning exception [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/networks' to caller
2015-10-13 17:13:41.153 814 ERROR oslo_messaging._drivers.common [req-1ab6c333-c5ab-4906-94aa-820dc2de1d14 60e5627c9c8f4eea9e8af0dbc3dedfb4 9700d79ee83b4522b6bc7edfb135f967 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/floating_ips.py", line 113, in allocate_for_instance\n **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 500, in allocate_for_instance\n requested_networks=requested_networks)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 194, in _allocate_fixed_ips\n vpn=vpn, address=address)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 971, in allocate_fixed_ip\n \'be required.\'), exc_info=True)\n', ' File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 947, in allocate_fixed_ip\n self._setup_network_on_host(context, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/manager.py", line 1855, in _setup_network_on_host\n self.driver.update_dhcp(elevated, dev, network)\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1042, in update_dhcp\n conffile = _dhcp_file(dev, \'conf\')\n', ' File "/usr/lib/python2.7/site-packages/nova/network/linux_net.py", line 1276, in _dhcp_file\n fileutils.ensure_tree(CONF.networks_path)\n', ' File "/usr/lib/python2.7/site-packages/nova/openstack/common/fileutils.py", line 38, in ensure_tree\n os.makedirs(path, mode)\n', ' File "/usr/lib64/python2.7/os.py", line 157, in makedirs\n mkdir(name, mode)\n', "OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/networks'\n"]