No valid host was found
I am using OpenStack Mitaka and trying to create a stack through heat consisting only one VM. In my setup, I have 2 compute nodes with 4 physical cores each.
The flavor of the Vm is as follows -
Memory Size: 1024 MB
Disk Size: 10 GB
Number Of CPU: 8
The stack creation fails with error -
No valid host was found. There are not enough hosts available
The nova logs indicates a CoreFilter
failure. The logs looks like this -
<182>Jul 31 06:07:27 node-63 nova-scheduler: 2017-07-31 06:07:27.139 12099 INFO nova.filters [req-ef103670-3aa6-4373-8918-a57dbc6703f4 43ae940aea77409eb40014fa24f663b2 22ece5e4daef4489934e3ce3ee282b41 - - -] Filter CoreFilter returned 0 hosts
<182>Jul 31 06:07:27 node-63 nova-scheduler: 2017-07-31 06:07:27.139 12099 INFO nova.filters [req-ef103670-3aa6-4373-8918-a57dbc6703f4 43ae940aea77409eb40014fa24f663b2 22ece5e4daef4489934e3ce3ee282b41 - - -] Filtering removed all hosts for the request with instance ID 'fd547faa-9390-42fc-8bbe-1d461c8c8ab2'. Filter results: ['RetryFilter: (start: 2, end: 2)', 'AvailabilityZoneFilter: (start: 2, end: 2)', 'RamFilter: (start: 2, end: 2)', 'CoreFilter: (start: 2, end: 0)']
<180>Jul 31 06:07:27 node-63 nova-conductor: 2017-07-31 06:07:27.144 13289 WARNING nova.scheduler.utils [req-ef103670-3aa6-4373-8918-a57dbc6703f4 43ae940aea77409eb40014fa24f663b2 22ece5e4daef4489934e3ce3ee282b41 - - -] 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/dist-packages/oslo_messaging/rpc/server.py", line 150, in inner
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 104, in select_destinations
dests = self.driver.select_destinations(ctxt, spec_obj)
File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 74, in select_destinations
raise exception.NoValidHost(reason=reason)
NoValidHost: No valid host was found. There are not enough hosts available.
<180>Jul 31 06:07:27 node-63 nova-conductor: 2017-07-31 06:07:27.144 13289 WARNING nova.scheduler.utils [req-ef103670-3aa6-4373-8918-a57dbc6703f4 43ae940aea77409eb40014fa24f663b2 22ece5e4daef4489934e3ce3ee282b41 - - -] [instance: fd547faa-9390-42fc-8bbe-1d461c8c8ab2] Setting instance to ERROR state.
But the cpu_allocation_ratio
is set in nova.conf to 8.0. The nova.conf file have following lines -
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
cpu_allocation_ratio=8.0
But interesting thing is if I create say 16 VMs with core 2, it doesn't fail, even if the total physical core is 8. It only fails to create VM with 8 core, even if there are no VMs present in cloud.
Hi Please share your yaml file ( HOT template) used to create stack.
@PraveenN, I don't think this is a Heat issue as VM creation with same flavor fails from Horizon also
Hi Kuro,are you able to create test VM of tiny flavor using heat..? so to confirm heat stack creation is working fine..
@PraveenN, yes. I am able to create VM with tiny flavor (from both Heat and Horizon). Also, I have successfully created more than 10 VMs with core set to 2 using both method.