Ask Your Question
1

With 'LXD' as a hypervisor, I'm unable to launch instances and get "Error: No valid host was found. There are not enough hosts available."

asked 2016-03-21 09:20:22 -0500

beenum gravatar image

updated 2016-03-25 13:54:09 -0500

I'm running devstack on a VM with Wily and successfully ran stack.sh with nova-lxd plugin, everything went fine. Hypervisor on the dashboard is changed to 'lxd' too. I added a glance image by running;

glance image-create --name='lxc' --container-format=bare --disk-format=raw < vivid-server-cloudimg-amd64-root.tar.gz

But I'm unable to run any instance and It always gives me the error of "Error: No valid host was found. There are not enough hosts available."

Got some errors in the nova-conductor which looks like;

2016-03-21 18:26:38.271 ^[[01;31mERROR nova.scheduler.utils [^[[01;36mreq-b7bc843a-90f6-4277-865c-b0c098e4f68d ^[[00;36madmin admin^[[01;31m] ^[[01;35m[instance: fff87a03-28d0-4506-b32c-135e53256e64] ^[[01;31mError from last host: ubuntu (node ubuntu): [u'Traceback (most recent call last):\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 1925, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 2091, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance fff87a03-28d0-4506-b32c-135e53256e64 was re-scheduled: Failed to communicate with LXD API instance-00000002: Error 500 - Error inserting instance-00000002 into database: Bad key: limits.cpu.\n']^[[00m
2016-03-21 18:26:38.391 ^[[01;33mWARNING nova.scheduler.utils [^[[01;36mreq-b7bc843a-90f6-4277-865c-b0c098e4f68d ^[[00;36madmin admin^[[01;33m] ^[[01;35m^[[01;33mFailed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 150, in inner
    return func(*args, **kwargs)

  File "/opt/stack/nova/nova/scheduler/manager.py", line 104, in select_destinations
    dests = self.driver.select_destinations(ctxt, spec_obj)

  File "/opt/stack/nova/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.
^[[00m2016-03-21 18:26:38.392 ^[[01;33mWARNING nova.scheduler.utils [^[[01;36mreq-b7bc843a-90f6-4277-865c-b0c098e4f68d ^[[00;36madmin admin^[[01;33m] ^[[01;35m[instance: fff87a03-28d0-4506-b32c-135e53256e64] ^[[01;33mSetting instance to ERROR state.^[[00m

And in nova-schedular logs, found some fails starting from retry filters:

2016-03-21 18:16:41.474 ^[[00;36mINFO nova.scheduler.filters.retry_filter [^[[01;36mreq-6f75faa5-eae3-4132-887b-c42cea1bb136 ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mHost [u'ubuntu', u'ubuntu'] fails.  Previously tried hosts: [[u'ubuntu', u'ubuntu']]^[[00m
2016-03-21 18:16:41.474 ^[[00;36mINFO nova.filters [^[[01;36mreq-6f75faa5-eae3-4132-887b-c42cea1bb136 ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mFilter RetryFilter returned 0 hosts^[[00m
2016-03-21 18:16:41.474 ^[[00;32mDEBUG nova.filters [^[[01;36mreq-6f75faa5-eae3-4132-887b-c42cea1bb136 ^[[00;36madmin admin^[[00;32m] ^[[01;35m^[[00;32mFiltering removed all hosts for the request with instance ID 'bc278c26-76ec-4a3e-a02a-e04747b04d57'. Filter results: [('RetryFilter', None)]^[[00m ^[[00;33mfrom (pid=16998) get_filtered_objects /opt/stack/nova/nova/filters.py:129^[[00m2016-03-21 18:16:41.474 ^[[00;36mINFO nova.filters [^[[01;36mreq-6f75faa5-eae3-4132-887b-c42cea1bb136 ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mFiltering removed all hosts fo
r the request with instance ID 'bc278c26-76ec-4a3e-a02a-e04747b04d57'. Filter results: ['RetryFilter: (start: 1, end: 0)']^[[00m2016-03-21 18:16:41.474 ^[[00;32mDEBUG nova.scheduler.filter_scheduler [^[[01;36mreq-6f75faa5-eae3-4132-887b-c42cea1bb136 ^[[00;36madmin admin^[[00;32m] ^[[01;35m^[[00;32mThere are 0 hosts available ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-04-05 13:55:27 -0500

beenum gravatar image

I resolved the issue. It was due the older lxd and lxc packages installed by default in ubuntu wily. So all I did was to update them to the latest versions.

edit flag offensive delete link more
0

answered 2016-03-21 12:36:43 -0500

dbaxps gravatar image

Wild guess , usually Nova-Docker Container raise up this error due to Controller is missing file:-

$cat  /etc/nova/rootwrap.d/docker.filters
[Filters]
# nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*'
ln: CommandFilter, /bin/ln, root

which is supposed to be read by nova-scheduler

edit flag offensive delete link more

Comments

That didn't work out for me. I did the same for lxd.filters. I'm still blank...help!!

beenum gravatar imagebeenum ( 2016-03-25 13:48:20 -0500 )edit

I have added LXD API failed communication error found in n-cond too...any idea?

beenum gravatar imagebeenum ( 2016-03-25 13:55:04 -0500 )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: 2016-03-21 09:20:22 -0500

Seen: 555 times

Last updated: Apr 05 '16