Charmed Openstack error There are not enough hosts available.

Hi, my openstack charmed installation has 4 compute/ceph-osd nodes all identical.

Each node has 512 GB of RAM and 2 x Intel Xeon Gold 5118 Skylake-SP 12 Cores 24 Threads. In nova cloud controller i have cpu-allocation ratio of 16:1.

Now i am trying to deploy a new instance i get the following error: “nova.exception.NoValidHost: No valid host was found. There are not enough hosts available.”

When i run openstack hypervisor stats show

the result is :

+----------------------+---------+
| Field                | Value   |
+----------------------+---------+
| count                | 4       |
| current_workload     | 0       |
| disk_available_least | 1538    |
| free_disk_gb         | 1740    |
| free_ram_mb          | 1464415 |
| local_gb             | 1828    |
| local_gb_used        | 88      |
| memory_mb            | 1995871 |
| memory_mb_used       | 531456  |
| running_vms          | 52      |
| vcpus                | 192     |
| vcpus_used           | 202     |
+----------------------+---------+

how come it only says vcpus 192 whic means 48 vcpu per host (all of them identical)? since my cpu_allocation_ratio is 16 ?

I appreciate any help on this ! Thx

1 Like

Hi, @ronyzd,

I had the same problem. When deploying the 4 Ceph-Osd Machines, following what determines this installation Openstack, I used --constraints tags=compute, and used the same Tag on the 4 different machines that I wanted to deploy Ceph. For some reason I still can’t explain, Juju debug-log returned the same error you reported. So I deleted the Tag, in this command >

juju deploy -n 4 --channel quincy/stable --config ceph-osd.yaml --constraints tags=compute ceph-osd

And then, Juju randomly chose where there was an evaluable host and deployed the 4 machines. In this case, it chose 3 hosts randomly, leaving 2 machines on a single host and the other two on two other different hosts.

Therefore, perhaps, the solution is to let Juju free the hosts, without using tags.

I hope it helps, and I wish you success.

Greetings.

Hi @penacleiton, Thank you for your reply . The error i am facing is in Openstack itsefl (nova-conductor.log) i don’t think it is “aware” of the undelaying juju deployment when provissing an instance on a project in Openstack.

I tried your solution but it did not solve my issue.

I think it is related to the number of vCPU openstack is calculating. The weird part is that i am using the Prometheus Exporter Charm which is showing in grafana the number of free vcpus to be 2870. The math to get to this number is = (4 x 48 x 16) - 202 = 2870

16 being the ratio

48 the number of vcpu per host

4 the number of hosts

202 the number of used vcpus

Thank you so much.

Any other suggestion will be great :slight_smile:

1 Like