<div dir="ltr">I recently noticed that available vpcu usage is "used 49 of 30" [1] but I have a total of 128 vcpus [2] and allocated only 126 for applications.<div>Is this due to misconfiguration in my environment?</div><div><br><div>[1] <a href="https://pasteboard.co/TI0WbbyZiXsn.png" target="_blank">https://pasteboard.co/TI0WbbyZiXsn.png</a><br></div></div><div>[2] <a href="https://paste.opendev.org/show/811910/">https://paste.opendev.org/show/811910/</a></div><div><br></div><div>Regards,</div><div>Danishka</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 8, 2021 at 10:04 PM open infra <<a href="mailto:openinfradn@gmail.com" target="_blank">openinfradn@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Managed to set cpu_dedicated_setin nova.</div><div>Thanks, Sean!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 2, 2021 at 9:16 PM Sean Mooney <<a href="mailto:smooney@redhat.com" target="_blank">smooney@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2021-12-02 at 08:58 +0530, open infra wrote:<br>
> Hi,<br>
> <br>
> I have created a flavor with following properties and created an instance.<br>
> Instance failed with the error "No valid host was found. There are not<br>
> enough hosts available."<br>
> When I set the cpu policy as 'shared' I can create the instance. The host<br>
> machine has two numa nodes and a total of 128 vcpu.<br>
> I can not figure out what's missing here.<br>
i suspect the issue is not with the flavor but with yoru host configurtion.<br>
<br>
you likely need to defience cpu_dedicated_set and cpu_shared_set in the nova.conf<br>
<br>
we do not support mixing pinned and floating cpus on the same host unless you partion the cpu pool<br>
using cpu_dedicated_set and cpu_shared_set.<br>
<br>
as of train cpu_dedicated_set replaced vcpu_pin_set as the supported way to report the pool of cpus to be<br>
used for pinned vms to placment.<br>
<br>
if you do "openstack resource provider inventory show <compute node uuid>" it should detail the avaiabel pcpu and vcpu inventories.<br>
when you use hw:cpu_policy='dedicated' it will claim PCPUs not VCPUs in placment.<br>
That is likely the issue you are encountering.<br>
<br>
by default we have a fallback query to make this work while you are upgrading<br>
<br>
<a href="https://docs.openstack.org/nova/latest/configuration/config.html#workarounds.disable_fallback_pcpu_query" rel="noreferrer" target="_blank">https://docs.openstack.org/nova/latest/configuration/config.html#workarounds.disable_fallback_pcpu_query</a><br>
<br>
which we should be disabling by default soon.<br>
<br>
but i suspect that is likely why you are getting the no valid host.<br>
<br>
to debug this properly you should enable debug logging on the nova schduler and then confirm if you got<br>
host back form placment and then if the numa toplogy filter is rejectign the host or not.<br>
<br>
without the schduler debug logs for the instance creation we cannt really help more then this since we do not have the info required.<br>
> <br>
> controller-1:~$ openstack flavor show dn.large -c properties<br>
> <br>
> +------------+--------------------------------------------------------------------------------------------------------+<br>
> <br>
> > Field | Value<br>
> |<br>
> <br>
> +------------+--------------------------------------------------------------------------------------------------------+<br>
> <br>
> > properties | hw:cpu_cores='2', hw:cpu_policy='dedicated',<br>
> hw:cpu_sockets='1', hw:cpu_threads='2', hw:numa_nodes='1' |<br>
> <br>
> +------------+--------------------------------------------------------------------------------------------------------+<br>
> <br>
> controller-1:~$ openstack hypervisor stats show<br>
> <br>
> +----------------------+--------+<br>
> <br>
> > Field | Value |<br>
> <br>
> +----------------------+--------+<br>
> <br>
> > count | 1 |<br>
> <br>
> > current_workload | 0 |<br>
> <br>
> > disk_available_least | 187 |<br>
> <br>
> > free_disk_gb | 199 |<br>
> <br>
> > free_ram_mb | 308787 |<br>
> <br>
> > local_gb | 219 |<br>
> <br>
> > local_gb_used | 20 |<br>
> <br>
> > memory_mb | 515443 |<br>
> <br>
> > memory_mb_used | 206656 |<br>
> <br>
> > running_vms | 7 |<br>
> <br>
> > vcpus | 126 |<br>
> <br>
> > vcpus_used | 49 |<br>
> <br>
> +----------------------+--------+<br>
> <br>
> <br>
> <br>
> Regards,<br>
> <br>
> Danishka<br>
<br>
</blockquote></div>
</blockquote></div>