Return 0 hosts error when spawn docker containers using openstack havana running on Ubuntu 13.04

asked 2014-01-18 00:27:03 -0500

damitha23 gravatar image

I installed devstack with docker driver in Oracle virtualbox Ubuntu 13.04 vm using following steps

sudo apt-get update
sudo apt-get install socat git
git clone
cd devstack
echo VIRT_DRIVER=docker >> localrc

echo SCREEN_LOGDIR=/opt/stack/logs/screen >> localrc
echo LOGFILE=/opt/stack/logs/ >> localrc
echo VERBOSE=True >> localrc
(Above three lines are for writing to log files)


Now I could spawn docker containers using docker-busybox:latest image. Next I wanted to spawn an container from docker ubuntu image in glance.

docker pull dockerfile/ubuntu
docker tag dockerfile/ubuntu
docker push

glance image-list

|82f380e3-5386-4e26-ba46-e74921f63896 | ubuntu:latest                   | raw         | docker           | 177      | active|

When I laonch an instance from horizon using above image I get "Error:No valid host was found"

nova scheducler log contain "returned 0 hosts" as in the following lines

2014-01-17 19:54:25.031 ^[[00;32mDEBUG nova.scheduler.filters.retry_filter [^[[01;36mreq-ee6edcd1-eabc-4c34-8ca8-767611cf8e01 ^[[00;36madmin admin^[[00;32m] ^[[01;35m^[[00;32mHost [u'ubuntu', u'ubuntu'] fails. Previously tried hosts: [[u'ubuntu', u'ubuntu']]^[[00m ^[[00;33mfrom (pid=31159) host_passes /opt/stack/nova/nova/scheduler/filters/^[[00m 2014-01-17 19:54:25.032 ^[[00;36mINFO nova.filters [^[[01;36mreq-ee6edcd1-eabc-4c34-8ca8-767611cf8e01 ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mFilter RetryFilter returned 0 hosts^[[00m 2014-01-17 19:54:25.032 ^[[01;33mWARNING nova.scheduler.driver [^[[01;36mreq-ee6edcd1-eabc-4c34-8ca8-767611cf8e01 ^[[00;36madmin admin^[[01;33m] ^[[01;35m[instance: 24fb236f-a7fc-4cb3-8316-a8b290b0c72e] ^[[01;33mSetting instance to ERROR state.^[[00m

From what I gather from forums I had to add following lines in /etc/nova/nova.conf


and restarted all services. But still same problem appear.


edit retag flag offensive close merge delete


I tried a devstack setup with lxc driver instead of docker. There also the same problem occur with an ubuntu image. Instances spawn fine with default cirros image. But when I add a ubuntu image from horizon image create again I get returned 0 hosts problem. Damitha

damitha23 gravatar imagedamitha23 ( 2014-01-20 05:13:31 -0500 )edit