Using a Nova::Flavor resource in a Nova::Server resource fails validation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Rabi Mishra |
Bug Description
When trying to use a flavor created by the template with the OS::Nova::Flavor resource type, validation of the stack fails because it looks for the flavor before it has been created (or so it appears to me). In a template containing the flavor and server resources shown below, creating a stack results in the following trace from heat-engine:
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack [req-74e749c8-
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack Traceback (most recent call last):
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack File "/usr/lib/
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack result = res.validate()
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack File "/usr/lib/
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack flavor_obj = self.client_
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack File "/usr/lib/
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack flavor = self.client(
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack File "/usr/lib/
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack raise exceptions.
2016-03-11 23:35:42.378 19467 ERROR heat.engine.stack NotFound: No Flavor matching {'name': u'test_flavor'}. (HTTP 404)
The relevant bits from the template are:
test_flavor:
type: OS::Nova::Flavor
properties:
disk: 10
ram: 512
vcpus: 1
server1:
type: OS::Nova::Server
depends_on: test_flavor
properties:
name: Server1
image: { get_param: image }
flavor: { get_resource: test_flavor }
key_name: { get_param: key_name }
networks:
- port: { get_resource: server1_port }
Changed in heat: | |
milestone: | none → mitaka-rc1 |
I think this is a result of https:/ /github. com/openstack/ heat/commit/ eeb52c5c4cc0365 0375586d6b08c33 e13d47ee56 change, where the image,flavor combination is validated for the server.
If the flavor/image is not already created in nova, this would fail in validation.