Heat stack create is failing with No Valid host Error

asked 2014-11-14 05:03:38 -0500

Pradip gravatar image

updated 2014-11-14 08:23:46 -0500

larsks gravatar image


I am seeing an error in Heat engine:

heat.engine.resource [-] CREATE: Server "server1" [cba09fd3-6bcb-4426-a93e-87514f4b28ab] Stack "my_stack_1" [00444bfc-ce73-429a-bd29-301fef136c91]
heat.engine.resource Traceback (most recent call last):
heat.engine.resource   File "/opt/stack/heat/heat/engine/resource.py", line 453, in _action_recorder
heat.engine.resource     yield
heat.engine.resource   File "/opt/stack/heat/heat/engine/resource.py", line 523, in _do_action
heat.engine.resource     yield self.action_handler_task(action, args=handler_args)
heat.engine.resource   File "/opt/stack/heat/heat/engine/scheduler.py", line 311, in wrapper
heat.engine.resource     step = next(subtask)
heat.engine.resource   File "/opt/stack/heat/heat/engine/resource.py", line 497, in action_handler_task
heat.engine.resource     while not check(handler_data):
heat.engine.resource   File "/opt/stack/heat/heat/engine/resources/server.py", line 562, in check_create_complete
heat.engine.resource     return self._check_active(server)
heat.engine.resource   File "/opt/stack/heat/heat/engine/resources/server.py", line 581, in _check_active
heat.engine.resource     'code': fault.get('code', _('Unknown'))
heat.engine.resource ResourceInError: Went to status ERROR due to "Message: No valid host was found. There are not enough hosts available., Code: 500"
heat.engine.scheduler [-] Task stack_task from Stack "my_stack_1" [00444bfc-ce73-429a-bd29-301fef136c91] sleeping from (pid=24348) _sleep /opt/stack/heat/heat/engine/scheduler.py:163
heat.engine.scheduler [-] Task stack_task from Stack "my_stack_1" [00444bfc-ce73-429a-bd29-301fef136c91] running from (pid=24348) step /opt/stack/heat/heat/engine/scheduler.py:218
heat.engine.scheduler [-] Task resource_action running from (pid=24348) step /opt/stack/heat/heat/engine/scheduler.py:218
heat.engine.scheduler [-] Task resource_action complete from (pid=24348) step /opt/stack/heat/heat/engine/scheduler.py:224
heat.engine.stack [-] Stack CREATE FAILED (my_stack_1): Resource CREATE failed: ResourceInError: Went to status ERROR due to "Message: No valid host was found. There are not enough hosts available., Code: 500"

Here is my local.conf respective section:

## Enable Heat Orchestration service

## Images
# Use this image when creating test instances
# Use this image when working with Orchestration (Heat)

This is my template:

ubuntu@ubuntu:~/devstack$ cat my_templates/t1.yml
heat_template_version: 2013-05-23

description: Test Template

    type: string
    description: Image use to boot a server
    type: string
    description: Network ID for the server

    type: OS::Nova::Server
      name: "Test server"
      image: { get_param: ImageID }
      flavor: "m1.small"
      - network: { get_param: NetID }

    description: IP address of the server in the private network
    value: { get_attr: [ server1, first_address ] }

This is how I am running:

ubuntu@ubuntu:~/devstack$ nova net-list
| ID                                   | Label   | CIDR        |
| 1c2a4823-8f0a-4009-95c1-3863bc7d4dbf | private | |
ubuntu@ubuntu:~/devstack$ heat stack-create -f my_templates/t1.yml -P "ImageID=F17-x86_64-cfntools;NetID=1c2a4823-8f0a-4009-95c1-3863bc7d4dbf" my_stack_1
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-11-14 08:26:23 -0500

larsks gravatar image

"No valid host" is an error from Nova, not from Heat. It indicates that Nova was unable to find a suitable hypervisor on which to schedule your instance. This can mean that (a) you are requesting more resources (memory, disk, etc) than are currently available, or (b) that there is a configuration problem with Nova preventing it from seeing any available hypervisors.

You're using the m1.small flavor, so unless you are running OpenStack in a very constrained environment it seems unlikely that resource availability is an issue. Are you able to start an instance manually using nova boot? Does nova service-list show an available nova-compute service?

edit flag offensive delete link more


Thanks. I can able to run it:

stack@localhost:~/devstack$ nova list +--------------------------------------+-------+--------+------------+-------------+------------------+ | ID | Name | Status | Task State | Power State | Networks | +----------------------

Pradip gravatar imagePradip ( 2014-11-15 09:27:32 -0500 )edit

Thank you, I solved the problem. The flavor exceeded the size of the VM disk.

Greetings and thanks

instructor_beeva gravatar imageinstructor_beeva ( 2016-12-14 13:28:51 -0500 )edit

answered 2014-11-15 09:30:01 -0500

Pradip gravatar image

One problem I noticed is that in some nova logs, I saw this:

raise exception.NovaException(msg)\n\nNovaException: Failed to add interface: interface eth1 does not exist!\n\n\n']

My ifconfig shows I have only eth0 port, where in my OS local.conf has the following:

PUBLIC_INTERFACE=eth0 FLAT_INTERFACE=eth1 <------------ It's not correct.

edit flag offensive delete link more

answered 2014-12-18 05:26:42 -0500

If you don't have enough space or ram than it give same type of error. So please delete one of instance after that try to launch stack.

edit flag offensive delete link more


I have the same issue (openstack mitaka) after deleting all instances and edit my image (Minimum Disk) I recreated the instance. New instance have got IP and power state is runnung

sibomarie gravatar imagesibomarie ( 2016-10-31 10:18:10 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-11-14 05:03:38 -0500

Seen: 10,360 times

Last updated: Nov 15 '14