概括

概括

概括

我有一个相当小的 Openstack 集群,包含 2 个可用区:AZ-GOLD-6248R 有 3 个计算节点,AZ-E5-2630 有 1 个计算节点(两个可用区的规格不同)

  1. 我可以使用 Horizo​​n 或 openstack CLI 创建 AZ-E5-2630 实例
  2. 我无法使用 Horizo​​n 或 openstack CLI 以及 --availability-zone 参数创建 AZ-GOLD-6248R 实例,错误No Valid Host was Found
  3. 但是我可以使用 openstack CLI 上的 --host 参数创建 AZ-GOLD-6248R 实例
  4. 所有项目和用户账户都会发生这种情况
  5. 所有虚拟机管理程序都已启动,并且拥有大量可用资源

我的集群规范

  • 3 个控制节点、AZ-GOLD-6248R 上的 1 个计算节点、AZ-E5-2630 上的 3 个计算节点
  • 使用不同集群上的 NFS 存储在虚拟机、卷和图像(cinder、glance)上进行后端存储
  • 使用 Kolla Ansible、openstack ver. Yoga 进行 Openstack 部署
  • 操作系统 Ubuntu 22.04 LTS

我做了什么

  1. 在控制器上重新启动 Neutron 和 OVN 服务(neutron_server neutron_ovn_metadata_agent openvswitch_db ovn_northd ovn_nb_db ovn_sb_db ovn_controller)
  2. 在控制器上重新启动 Nova 服务(nova_conductor nova_scheduler)
  3. 在计算节点上重新启动 Neutron 和 OVN 服务(openvswitch_db ovn_controller neutron_ovn_metadata_agent)
  4. 在计算节点上重新启动 Nova 服务(nova_compute nova_api)
  5. 在控制器上重新启动 Placement API 服务 (placement_api)

日志

错误时的截图

计算服务和网络服务状态

创建实例失败时记录:

| fault                               | {'code': 500, 'created': '2023-04-16T23:57:35Z', 'message': 'No valid host was found. ', 'details': 'Traceback (most recent call last):\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/conductor/manager.py", line 1548, in schedule_and_build_instances\n    host_lists = self._schedule_instances(context, request_specs[0],\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/conductor/manager.py", line 908, in _schedule_instances\n    host_lists = self.query_client.select_destinations(\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/client/query.py", line 41, in select_destinations\n    return self.scheduler_rpcapi.select_destinations(context, spec_obj,\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/rpcapi.py", line 160, in select_destinations\n    return cctxt.call(ctxt, \'select_destinations\', **msg_args)\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/rpc/client.py", line 189, in call\n    result = self.transport._send(\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/tran
sport.py", line 123, in _send\n    return self._driver.send(target, ctxt, message,\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 689, in send\n    return self._send(target, 
ctxt, message, wait_for_reply, timeout,\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 681, in _send\n    raise result\nnova.exception_Remote.NoValidHost_Remote: No valid host was found. \nTraceback (most recent call last):\n\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/rpc/server.py", line 241, in inner\n    return func(*args, **kwargs)\n\n  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/manager.py", line 209, in select_destinations\n    raise exception.NoValidHost(reason="")\n\nnova.exception.NoValidHost: No valid host was found. \n\n'} |

虚拟机管理程序在 AZ-GOLD-6248R 上显示计算节点

+----+---------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP      | State | vCPUs Used | vCPUs | Memory MB Used | Memory MB |
+----+---------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
|  6 | cmpt01              | QEMU            | 172.16.231.4 | up    |         24 |    48 |          44544 |    128472 |
+----+---------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+

日志 nova-scheduler

2023-04-17 06:57:35.038 667 INFO nova.scheduler.manager [req-f50022f7-d4bb-4f43-994b-2331643b64f7 cd7057b2314642c1a9174692a07a3e67 cc6ab975695b44418e88082cc693be36 - default default] Got no allocation candidates from the Placement API. This could be due to insufficient resources or a temporary occurrence as compute nodes start up.
2023-04-17 07:07:03.173 668 INFO nova.scheduler.manager [req-cabaf533-78ac-41d6-b052-0751b0cbad94 cd7057b2314642c1a9174692a07a3e67 cc6ab975695b44418e88082cc693be36 - default default] Got no allocation candidates from the Placement API. This could be due to insufficient resources or a temporary occurrence as compute nodes start up.

日志 nova-conductor

nova.exception.NoValidHost: No valid host was found.
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager Traceback (most recent call last):
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/conductor/manager.py", line 1548, in schedule_and_build_instances
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     host_lists = self._schedule_instances(context, request_specs[0],
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/conductor/manager.py", line 908, in _schedule_instances
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     host_lists = self.query_client.select_destinations(
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/client/query.py", line 41, in select_destinations
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     return self.scheduler_rpcapi.select_destinations(context, spec_obj,
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/rpcapi.py", line 160, in select_destinations
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     return cctxt.call(ctxt, 'select_destinations', **msg_args)
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/rpc/client.py", line 189, in call
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     result = self.transport._send(
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/transport.py", line 123, in _send
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     return self._driver.send(target, ctxt, message,
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 689, in send
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     return self._send(target, ctxt, message, wait_for_reply, timeout,
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 681, in _send
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     raise result
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager nova.exception_Remote.NoValidHost_Remote: No valid host was found. 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager Traceback (most recent call last):
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/rpc/server.py", line 241, in inner
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     return func(*args, **kwargs)
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager   File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/manager.py", line 209, in select_destinations
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager     raise exception.NoValidHost(reason="")
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager nova.exception.NoValidHost: No valid host was found. 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager 
2023-04-17 06:57:35.043 669 ERROR nova.conductor.manager 
2023-04-17 06:57:35.232 669 WARNING nova.scheduler.utils [req-f50022f7-d4bb-4f43-994b-2331643b64f7 cd7057b2314642c1a9174692a07a3e67 cc6ab975695b44418e88082cc693be36 - default default] Failed to compute_task_build_instances: No valid host was found. 
Traceback (most recent call last):

  File "/var/lib/kolla/venv/lib/python3.8/site-packages/oslo_messaging/rpc/server.py", line 241, in inner
    return func(*args, **kwargs)

  File "/var/lib/kolla/venv/lib/python3.8/site-packages/nova/scheduler/manager.py", line 209, in select_destinations
    raise exception.NoValidHost(reason="")

nova.exception.NoValidHost: No valid host was found. 
: nova.exception_Remote.NoValidHost_Remote: No valid host was found. 
2023-04-17 06:57:35.233 669 WARNING nova.scheduler.utils [req-f50022f7-d4bb-4f43-994b-2331643b64f7 cd7057b2314642c1a9174692a07a3e67 cc6ab975695b44418e88082cc693be36 - default default] [instance: 60c10cff-183d-46ed-8dd4-a5f713510661] Setting instance to ERROR state.: nova.exception_Remote.NoValidHost_Remote: No valid host was found.

尝试分配资源时,将显示所有计算节点。节点号 3 是出现“未找到有效主机”错误的节点

openstack allocation candidate list --resource VCPU=20

openstack 分配候选列表

提前感谢你的帮助

相关内容