Ask Your Question

Heat cannot validate glance.image constraint

asked 2017-02-01 07:11:32 -0500

pasasap gravatar image

updated 2017-04-21 10:52:54 -0500

zaneb gravatar image

Hi. I have installed in one node openstack with packstack, I have changed only passwords and IPs, so I didn't have Heat. Then I have installed Heat using that install guide but for v2 api, so I ommited domain values, etc. I think it should work.

Now I try to deploy VM with Heat, but I get an error that I can't found fix for that error.

That is piece of my template file my_stack.yaml

    type: string
    description: Flavor for the instances to be created.
    default: m1.tiny
      - custom_constraint: nova.flavor
        description: Must be a flavor known to Nova.
    type: string
    description: Name or ID of the image to user for the instances.
    default: cirros
      - custom_constraint: glance.image
        description: Must identify an image known to Glance.
    type: OS::Nova::Server
      flavor: { get_param: flavor }
      image: { get_param: image }

After calling:

openstack stack create -t ./my_stack.yaml my_stack

I get an error:

ERROR: Property error: : : "cirros" does not validate glance.image (constraint not found)

If I comment constraints for image, then in server resource i get the same error.

I have tried with image ID, with other images, I can't find solution for that. I didn't edit heat.conf file. I am using admin credentials. I gave here also flavor for nova, because Heat sees that properly. I am using v2 API for login (OS_AUTH_URL=.../v2.0).

Here some output:

# heat-api --version
# heat-api-cfn --version
# heat-engine --version
# heat --version
# glance-api --version
# glance-registry --version
# glance --version
# glance image-show 04c8bc65-7d00-4af9-bb1a-e74c44382685
| Property         | Value                                |
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6     |
| container_format | bare                                 |
| created_at       | 2016-11-25T00:23:15Z                 |
| disk_format      | raw                                  |
| id               | 04c8bc65-7d00-4af9-bb1a-e74c44382685 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | 767bcfa93f374177bd3290ce08d90afd     |
| protected        | False                                |
| size             | 13287936                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2017-01-28T01:28:11Z                 |
| virtual_size     | None                                 |
| visibility       | public                               |
edit retag flag offensive close merge delete


I would configure debug logging and check the Heat log. It should tell you how Heat communicates with Glance.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-01 09:42:06 -0500 )edit (LINK) there is launched with debug and verbose flags.

pasasap gravatar imagepasasap ( 2017-02-01 09:44:41 -0500 )edit

This is the debug output of the openstack client, which doesn't help in this case. My suggestion is to ensure that Heat's log level is DEBUG, then check the Heat log file.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-01 16:16:22 -0500 )edit

Nevermind. I have installed from the beggining openstack with packstack witch Heat enabled. Thank You anyway ;')

pasasap gravatar imagepasasap ( 2017-02-02 05:52:23 -0500 )edit

please check your heat-engine.log check if you have the following ERROR likes:

ERROR stevedore.extension [-] Could not load 'glance': No module named openstack.common.apiclient ERROR stevedore.extension [-] Could not load 'glance.image': No module named openstack.c

downgrade glance client to fix

zioproto gravatar imagezioproto ( 2017-04-21 10:28:11 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2017-02-01 09:34:43 -0500

shasha.tavil gravatar image


There may be a possibility of multiple images by name "cirros" in which case you need to give "ID" of the image instead of the name. Can you please check using "openstack image list"

edit flag offensive delete link more


No, there is only one image with cirros name. Image ID instead of the name didn't help.

pasasap gravatar imagepasasap ( 2017-02-01 09:41:36 -0500 )edit

answered 2017-02-01 22:28:04 -0500

zaneb gravatar image

updated 2017-04-21 10:57:10 -0500

I think the error message is a bit misleading here. It looks like the "(constraint not found)" means that Heat doesn't have the glance.image constraint installed at all. (It shouldn't imply there's a problem with the value... it can't even check the value.)

Constraints are registered in the setup.cfg file and that configuration data is written into the package's entry_points.txt file (in the egg-info directory) at installation time. Check the heat-engine log at startup to see if there are any errors.

Most likely this was due to having a glanceclient version that is too new. A change in glanceclient 2.6.0 made it incompatible with Newton and earlier Heat releases of Heat. If you're running Newton or earlier, you want to use an earlier version of glanceclient. Ocata and later versions of Heat contain a patch to use glanceclient 2.6.0 or later.

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


Asked: 2017-02-01 07:11:32 -0500

Seen: 1,038 times

Last updated: Apr 21 '17