DiscoveryFailure: Could not determine a suitable URL for the plugin

此类错误是URL配置错误,配置文件的URL与数据库中的endpoint中URL不一致导致的。

例:

环境:openstack,控制节点、网络节点、计算节点部署在不同节点,

/etc/nova/nova.conf中[neutron]部分配置错误

错误配置:

url = http://network:9696
auth_url = http://network:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = password
service_metadata_proxy = true
metadata_proxy_shared_secret = password

创建VM报没有valid的host,查看计算节点的nova-compute,错误如下:

2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780] Traceback (most recent call last):
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2087, in _build_resources
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     yield resources
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1928, in _build_and_run_instance
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     block_device_info=block_device_info)
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2666, in spawn

......

2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     token = self.get_token(session)
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 90, in get_token
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     return self.get_access(session).auth_token
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 136, in get_access
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     self.auth_ref = self.get_auth_ref(session)
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 196, in get_auth_ref
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     self._plugin = self._do_create_plugin(session)
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]   File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 191, in _do_create_plugin
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]     raise exceptions.DiscoveryFailure('Could not determine a suitable URL '
2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780] DiscoveryFailure: Could not determine a suitable URL for the plugin

2018-01-10 09:03:45.737 3520 ERROR nova.compute.manager [instance: c3406eeb-fc84-4b9e-a2de-8d013d25f780]

由蓝色字体可知是计算节点创建neutron API plugin时从keystone获取token失败,原因neutron的auth_url是keystone,keystone部署在控制节点,因此修改/etc/nova/nova.conf中[neutron]部分auth_url为如下配置(nova节点和nova-api节点都需要改):

auth_url = http://controller:35357

重启所有nova服务,就能够正常创建VM

阅读更多
文章标签: openstack neutron nova
个人分类: openstack
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

DiscoveryFailure: Could not determine a suitable URL for the plugin

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭