Heat doesn't see glance images [closed]

asked 2017-02-01 08:06:54 -0500

pasasap 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 following the newest tutorial for centos on official page, but for v2 api, so I ommited domain values, etc.

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

parameters:
  flavor:
    type: string
    description: Flavor for the instances to be created.
    default: m1.tiny
    constraints:
      - custom_constraint: nova.flavor
        description: Must be a flavor known to Nova.
  image:
    type: string
    description: Name or ID of the image to user for the instances.
    default: cirros
    constraints:
      - custom_constraint: glance.image
        description: Must identify an image known to Glance.
resources:
  server:
    type: OS::Nova::Server
    properties:
      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: : resources.server.properties.image: : "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
7.0.1
# heat-api-cfn --version
7.0.1
# heat-engine --version
7.0.1
# heat --version
1.5.0
# glance-api --version
13.0.0
# glance-registry --version
13.0.0
# glance --version
2.6.0
# 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                               |
+------------------+--------------------------------------+

In glance logs there is nothing, but I have some logs from Heat and Nova (heat template has more lines, so there are more logs):

==> ../heat/heat-engine.log <==
2017-01-28 00:39:34.920 27909 INFO heat.engine.service [req-935d48da-6821-403b-b40b-a815dda02939 37143017afce479d9d498eba4537f4f4 767bcfa93f374177bd3290ce08d90afd - - -] Creating stack docker_stack

==> ../nova/nova-api.log <==
2017-01-28 00:39:35.136 24913 INFO nova.api.openstack.wsgi [req-d91e0bb7-92bb-46ec-877f-308fa6be7aea 37143017afce479d9d498eba4537f4f4 767bcfa93f374177bd3290ce08d90afd - default default] HTTP exception thrown: Flavor m1.tiny could not be found.
2017-01-28 00:39:35.138 24913 INFO nova.osapi_compute.wsgi.server [req-d91e0bb7-92bb-46ec-877f-308fa6be7aea 37143017afce479d9d498eba4537f4f4 767bcfa93f374177bd3290ce08d90afd - default default] 192.168.56.150 "GET /v2.1/767bcfa93f374177bd3290ce08d90afd/flavors/m1.tiny HTTP/1.1" status: 404 len: 434 time: 0.1466541
2017-01-28 00:39:35.169 24913 INFO nova.osapi_compute.wsgi.server [req-fa0b9299-bf44-42e1-8da3-b634fc94e2cf 37143017afce479d9d498eba4537f4f4 767bcfa93f374177bd3290ce08d90afd - default default] 192.168.56.150 "GET /v2.1/767bcfa93f374177bd3290ce08d90afd/flavors HTTP/1.1" status: 200 len: 2054 time: 0.0272789
2017-01-28 00:39:35.205 24913 INFO nova.osapi_compute.wsgi.server [req-fb0b9fba-a1de-4292-a25a-0d2a6f610c59 37143017afce479d9d498eba4537f4f4 767bcfa93f374177bd3290ce08d90afd - default default] 192.168.56.150 "GET /v2.1/767bcfa93f374177bd3290ce08d90afd/flavors/1 HTTP/1.1" status: 200 len: 761 time: 0.0250731 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by volenbovsky
close date 2017-02-01 09:14:11.857213