简体   繁体   English

Openstack Compute 无法根据类型和实例数量运行实例

[英]Openstack Compute fails to run instances based on flavor and number of instances

I am attempting to create various instances and Compute is failing to spawn some of them.我正在尝试创建各种实例,而 Compute 未能生成其中的一些实例。

My instance has the following characteristics:我的实例具有以下特点:

Name: ThirdInstance Created from image: CentOS-7-x86_64 Flavor: m1.medium (2 VCPU, 4GB RAM, 40GB Disk)名称:ThirdInstance 从镜像创建:CentOS-7-x86_64 风格:m1.medium(2 VCPU,4GB RAM,40GB 磁盘)

I have two other instances running.我还有另外两个实例正在运行。 I was unable to spawn these instances unless I used the flavor m1.small (1VCPU, 2GB RAM, 20GB Disk).除非我使用了 m1.small(1VCPU、2GB RAM、20GB 磁盘),否则我无法生成这些实例。 Any deviation from that flavor and the instance spawning failed.与该风格的任何偏差和实例生成都失败了。

Unfortunately, my ThirdInstance fails to spawn regardless of the flavor used.不幸的是,无论使用哪种口味,我的 ThirdInstance 都无法生成。 I have tried creating it with m1.small and it fails consistently.我尝试用 m1.small 创建它,但它始终失败。

I looked at the Nova logs, and am noting that when I attempt to create this instance I am consistently getting the following message in the nova-conductor.log file:我查看了 Nova 日志,并注意到当我尝试创建此实例时,我始终在 nova-conductor.log 文件中收到以下消息:

2020-08-29 13:21:09.637 98391 ERROR nova.conductor.manager
2020-08-29 13:21:09.637 98391 ERROR nova.conductor.manager
2020-08-29 13:21:09.890 98391 WARNING nova.scheduler.utils [req-30539015-22f1-4d46-b8b7-63f9c679eed1 4c4c7de6dd134250972958ce260530f2 166dc91ccec24f21963c71a437380ee9 - default default] Failed to compute_task_build_instances: No valid host was found.
Traceback (most recent call last):

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

  File "/usr/lib/python3.6/site-packages/nova/scheduler/manager.py", line 200, 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.
2020-08-29 13:21:09.891 98391 WARNING nova.scheduler.utils [req-30539015-22f1-4d46-b8b7-63f9c679eed1 4c4c7de6dd134250972958ce260530f2 166dc91ccec24f21963c71a437380ee9 - default default] [instance: fe54feaf-ecb6-4725-97e9-7d208066ddb0] Setting instance to ERROR state.: nova.exception_Remote.NoValidHost_Remote: No valid host was found.

What am I missing here?我在这里缺少什么? What causes these No Host Found failures when I attempt to use flavors other than m1.small, and why does a third instance fail to spawn regardless of the flavor used???当我尝试使用 m1.small 以外的风格时,是什么导致了这些 No Host Found 失败,为什么不管使用的风格如何,第三个实例都无法生成??? How (if possible) can I get these instances to run properly?我如何(如果可能)让这些实例正常运行?

NOTE: I am using an installation created from Packstack on CentOS 8. My machine is a 2- core with 32G of RAM and 3 Terabytes of disk space.注意:我在 CentOS 8 上使用从 Packstack 创建的安装。我的机器是 2 核,具有 32G 的 RAM 和 3 TB 的磁盘空间。 The Openstack version is Ussuri. Openstack 版本是 Ussuri。

Seems to me like you have not enough resources, especially CPU-cores.在我看来,您没有足够的资源,尤其是 CPU 内核。 You have written, that your node has only two cores and you had already spawned 2 VMs with small flavor, which requires 1 core each.您已经写过,您的节点只有两个内核,并且您已经生成了 2 个小型虚拟机,每个虚拟机需要 1 个内核。 This No valid host was found -error comes also, when no compute-host was found with enough resources for the selected flavor.当没有找到具有足够资源用于所选风格的计算主机时,此No valid host was found - 也会出现错误。

You can check this by yourself:你可以自己检查一下:

Run openstack hypervisor list to list your hypervisor and then openstack hypervisor show <ID> with the id of your hypervisor.运行openstack hypervisor list列出您的 hypervisor,然后openstack hypervisor show <ID>和您的 hypervisor 的 id。 In the output you find vcpus and vcpus_used .在输出你找到vcpusvcpus_used vcpus is the maximum available number of cpu-cores on the selected compute-host. vcpus是所选计算主机上的最大可用 CPU 核数。 Based on the information of your question, I think both of these values are 2 in your case and that would show you, that you have not enough resources for your third VM.根据您问题的信息,我认为这两个值在您的情况下都是2 ,这表明您没有足够的资源用于第三个 VM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM