分享

openstack 创建VM失败no vaild host was found

nanjing312 发表于 2016-8-7 16:48:38 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 10467
controller:100.1.1.5 (虚拟机)computer:100.1.1.6(物理机)
有neutron,官方采用的是3台设备,由于设备限制只能1台物理机,1台VM。compute2原来存在,搭建过程中被挪走了。
创建vm的时候报错,排查了2天了,实在不懂,还请大神帮忙。neutron用的ml2的plugin插件调用h3c的sdn控制器vcfc。
====================================================================================
controller节点的nova-conductor.log
2016-08-07 16:10:56.770 26506 WARNING nova.scheduler.utils [req-97bbeec0-1df2-4dd1-bb10-f92846c507ca edcac8965a964db6997f9b71198bc53d 9607a4fed7f749d0836460013c41c399 - - -] [instance: 7174e5ed-c688-4bf3-846a-1e6f8762559b] Setting instance to ERROR state.
2016-08-07 16:22:18.022 26505 ERROR nova.scheduler.utils [req-1cb42087-39dd-4eca-b70f-6a7c06d97cac edcac8965a964db6997f9b71198bc53d 9607a4fed7f749d0836460013c41c399 - - -] [instance: 57e56516-456b-4093-b355-7f6be25add79] Error from last host: compute1 (node compute1): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2248, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2393, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u"RescheduledException: Build of instance 57e56516-456b-4093-b355-7f6be25add79 was re-scheduled: Connection to glance host 100.1.1.6:9292 failed: Error finding address for http://100.1.1.6:9292/v1/images/ ... -942b-a8a1112fa5b7: ('Connection aborted.', error(111, 'ECONNREFUSED'))\n"]
2016-08-07 16:22:18.096 26505 WARNING nova.scheduler.utils [req-1cb42087-39dd-4eca-b70f-6a7c06d97cac edcac8965a964db6997f9b71198bc53d 9607a4fed7f749d0836460013c41c399 - - -] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 142, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 86, in select_destinations
    filter_properties)

  File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 80, in select_destinations
    raise exception.NoValidHost(reason=reason)

NoValidHost: No valid host was found. There are not enough hosts available.

2016-08-07 16:22:18.097 26505 WARNING nova.scheduler.utils [req-1cb42087-39dd-4eca-b70f-6a7c06d97cac edcac8965a964db6997f9b71198bc53d 9607a4fed7f749d0836460013c41c399 - - -] [instance: 57e56516-456b-4093-b355-7f6be25add79] Setting instance to ERROR state.

==================================================================================

[root@controller nova]# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-conductor   | controller | internal | enabled | up    | 2016-08-07T08:39:52.000000 | -               |
| 2  | nova-scheduler   | controller | internal | enabled | up    | 2016-08-07T08:39:56.000000 | -               |
| 3  | nova-compute     | compute1   | nova     | enabled | up    | 2016-08-07T08:39:56.000000 | -               |
| 4  | nova-compute     | compute2   | nova     | enabled | down  | 2016-08-05T10:01:25.000000 | -               |
| 5  | nova-cert        | controller | internal | enabled | up    | 2016-08-07T08:39:52.000000 | -               |
| 6  | nova-consoleauth | controller | internal | enabled | up    | 2016-08-07T08:39:51.000000 | -               |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

==================================================================================


[root@controller nova]# neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id                                   | agent_type         | host     | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 0e4a100d-b70f-42d3-a7d8-bebf26ce25bf | Open vSwitch agent | compute1 | :-)   | True           | neutron-openvswitch-agent |
| dd7cc4e1-9e16-4879-81fb-c87d17e7fc1a | Open vSwitch agent | compute2 | xxx   | True           | neutron-openvswitch-agent |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+

==================================================================================


计算节点nova配置
[root@controller nova]# cat /etc/nova/nova.conf |grep -v \# |grep -v ^$
[DEFAULT]
security_group_api = neutron
firewall_driver = nova.virt.firewall.NoopFirewallDriver
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
network_api_class = nova.network.neutronv2.api.API
auth_strategy = keystone
vncserver_proxyclient_address = 100.1.1.5
vncserver_listen = 100.1.1.5
my_ip = 100.1.1.5
rpc_backend = rabbit
[api_database]
[barbican]
[cells]
[cinder]
[conductor]
[database]
connection = mysql://nova:123456@controller/nova
[ephemeral_storage_encryption]
[glance]
host = controller
[guestfs]
[hyperv]
[image_file_url]
[ironic]
[keymgr]
[keystone_authtoken]
password = 123456
username = nova
project_name = service
user_domain_id = default
project_domain_id = default
auth_plugin = password
auth_url = http://controller:35357
auth_uri = http://controller:5000
[libvirt]
[metrics]
[neutron]
admin_auth_url = http://controller:35357/v2.0
admin_password = 123456
admin_username = neutron
admin_tenant_name = service
auth_strategy = keystone
url = http://controller:9696
[osapi_v3]
[rdp]
[serial_console]
[spice]
[ssl]
[trusted_computing]
[upgrade_levels]
[vmware]
[workarounds]
[xenserver]
[zookeeper]
[matchmaker_redis]
[matchmaker_ring]
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
rabbit_password = 123456
rabbit_userid = openstack
rabbit_host = controller

==================================================================================
[root@controller nova]# cat /etc/neutron/neutron.conf |grep -v \# |grep -v ^$
[DEFAULT]
notify_nova_on_port_data_changes = True
notify_nova_on_port_status_changes = True
nova_url = http://controller:8774/v2
service_plugins = h3c_vcfplugin.l3_router.h3c_l3_router_plugin.H3CL3RouterPlugin,firewall,lbaas,vpnaas
core_plugin = ml2
allow_overlapping_ips = True
auth_strategy = keystone
rpc_backend = rabbit
[matchmaker_redis]
[matchmaker_ring]
[quotas]
[agent]
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
admin_tenant_name = service
admin_user = neutron
admin_password = 123456
[database]
connection = mysql://neutron:123456@controller/neutron
[nova]
password = 123456
username = nova
project_name = service
region_name = RegionOne
user_domain_id = default
project_domain_id = default
auth_plugin = password
auth_url = http://controller:35357
[oslo_concurrency]
lock_path = $state_path/lock
[oslo_policy]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
rabbit_userid = openstack
rabbit_password = 123456
rabbit_host = controller
[service_providers]
service_provider = VPN:H3C:h3c_vcfplugin.vpn.h3c_vpnplugin_driver.H3CVpnPluginDriver:default
service_provider = LOADBALANCER:H3C:h3c_vcfplugin.lb.h3c_lbplugin_driver.H3CLbaasPluginDriver:default
service_provider = FIREWALL:H3C:h3c_vcfplugin.fw.h3c_fwplugin_driver.H3CFwaasDriver:default

==================================================================================
计算节点nova nova-compute.log
2016-08-07 16:22:16.298 3579 TRACE nova.image.glance
2016-08-07 16:22:16.300 3579 ERROR nova.compute.manager [req-1cb42087-39dd-4eca-b70f-6a7c06d97cac edcac8965a964db6997f9b71198bc53d 9607a4fed7f749d0836460013c41c399 - - -] [instance: 57e56516-456b-4093-b355-7f6be25add79] Instance failed to spawn
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79] Traceback (most recent call last):
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2473, in _build_resources
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     yield resources
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2345, in _build_and_run_instance
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     block_device_info=block_device_info)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2362, in spawn
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     admin_pass=admin_password)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2760, in _create_image
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     instance, size, fallback_from_host)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5890, in _try_fetch_image_cache
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     size=size)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 231, in cache
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     *args, **kwargs)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 480, in create_image
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     prepare_template(target=base, max_size=size, *args, **kwargs)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 445, in inner
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     return f(*args, **kwargs)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 221, in fetch_func_sync
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     fetch_func(target=target, *args, **kwargs)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/utils.py", line 507, in fetch_image
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     max_size=max_size)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 87, in fetch_to_raw
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     max_size=max_size)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 77, in fetch
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     IMAGE_API.download(context, image_href, dest_path=path)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/image/api.py", line 182, in download
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     dst_path=dest_path)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 351, in download
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     _reraise_translated_image_exception(image_id)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 349, in download
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     image_chunks = self._client.call(context, 1, 'data', image_id)
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]   File "/usr/lib/python2.7/site-packages/nova/image/glance.py", line 236, in call
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]     host=host, port=port, reason=six.text_type(e))
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79] GlanceConnectionFailed: Connection to glance host 100.1.1.6:9292 failed: Error finding address for http://100.1.1.6:9292/v1/images/ ... -942b-a8a1112fa5b7: ('Connection aborted.', error(111, 'ECONNREFUSED'))
2016-08-07 16:22:16.300 3579 TRACE nova.compute.manager [instance: 57e56516-456b-4093-b355-7f6be25add79]
2016-08-07 16:28:53.721 3579 WARNING nova.compute.manager [req-3cc4af2f-83bb-44f0-9855-c47bbddd6930 - - - - -] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.
2016-08-07 16:39:13.720 3579 WARNING nova.compute.manager [req-3cc4af2f-83bb-44f0-9855-c47bbddd6930 - - - - -] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.

==================================================================================














已有(1)人评论

跳转到指定楼层
langke93 发表于 2016-8-8 16:35:29
很可能是资源不够了,比如硬盘不足或则内存,还有当前租户具有实例的权限
还有确保compute2的nova-compute是正常运行的
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条