Ask Your Question
0

No valid host was found

asked 2017-07-31 01:29:48 -0600

kuro gravatar image

updated 2017-07-31 01:30:33 -0600

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.

edit retag flag offensive close merge delete

Comments

Hi Please share your yaml file ( HOT template) used to create stack.

Praveen N gravatar imagePraveen N ( 2017-07-31 02:04:00 -0600 )edit

@PraveenN, I don't think this is a Heat issue as VM creation with same flavor fails from Horizon also

kuro gravatar imagekuro ( 2017-07-31 02:13:04 -0600 )edit

Hi Kuro,are you able to create test VM of tiny flavor using heat..? so to confirm heat stack creation is working fine..

Praveen N gravatar imagePraveen N ( 2017-07-31 02:16:09 -0600 )edit

@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.

kuro gravatar imagekuro ( 2017-07-31 04:06:32 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 02:47:41 -0600

HumongousRainDrop gravatar image

The overcommitment ratio is not the only restriction on the amount of assignable CPUs. While all VMs together may have <physical cores> * <overcommitment ratio>, there is also the limitation that a single VM cannot have more CPUs than its host. Your setup violates this last rule. AFAIK this rule is not implemented by OpenStack directly but rather through the hypervisor. Nova-compute merely communicates the fact that the hypervisor cannot host your VM.

edit flag offensive delete link more

Comments

Thanks for your reply. So, you are saying, even if I remove CoreFilter from nova.conf, will it sill fail? Is there any work around?

kuro gravatar imagekuro ( 2017-08-02 03:52:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-07-31 01:29:48 -0600

Seen: 315 times

Last updated: Aug 02 '17