Ask Your Question
2

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

Hi,

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.resource
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
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng

## Images
# Use this image when creating test instances
IMAGE_URLS+=",http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img"
# Use this image when working with Orchestration (Heat)
IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2"

This is my template:

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

description: Test Template

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

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

outputs:
  server1_private_ip:
    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 | 10.0.0.0/24 |
+--------------------------------------+---------+-------------+
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
5

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

Comments

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
0

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

Comments

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
0

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

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: 2014-11-14 05:03:38 -0500

Seen: 7,044 times

Last updated: Nov 15 '14