Ask Your Question

damitha23's profile - activity

2014-07-17 04:09:15 -0500 received badge  Famous Question (source)
2014-02-21 10:57:29 -0500 received badge  Popular Question (source)
2014-02-21 10:57:29 -0500 received badge  Notable Question (source)
2014-01-24 00:22:55 -0500 received badge  Enthusiast
2014-01-22 00:30:22 -0500 received badge  Supporter (source)
2014-01-20 05:13:31 -0500 commented question Return 0 hosts error when spawn docker containers using openstack havana running on Ubuntu 13.04

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

2014-01-18 00:27:03 -0500 asked a question Return 0 hosts error when spawn docker containers using openstack havana running on Ubuntu 13.04

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 https://github.com/openstack-dev/devstack.git
cd devstack
echo VIRT_DRIVER=docker >> localrc
./tools/docker/install_docker.sh

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

./stack.sh

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 10.0.2.15:5042/ubuntu
docker push 10.0.2.15:5042/ubuntu

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/retry_filter.py:45^[[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

scheduler_default_filters=AllHostsFilter

and restarted all services. But still same problem appear.

Damitha