Resource.has_interface can fail if there are registry changes on update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Steve Baker | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This happens in templates which have some neutron resources (any one which checks for implicit dependencies, such as OS::Neutron::Port) and when there is a change in the resource registry type names during a stack update.
$ cat base.yaml
heat_template_
parameters:
network:
type: string
default: private
resources:
port:
type: OS::Neutron::Port
properties:
network: {get_param: network}
foo:
type: My::Foo
$ cat env.yaml
resource_registry:
My::Foo: foo.yaml
$ cat foo.yaml
heat_template_
$ heat stack-create -f base.yaml -e env.yaml a
# wait for complete, edit base.yaml and env.yaml to rename My::Foo to My::Bar
$ heat stack-update -f base.yaml -e env.yaml a
# stack remains IN_PROGRESS forever, the following trace is logged
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: existing_deps = self.existing_
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: File "/usr/lib/
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: self.resources.
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: File "/usr/lib/
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: res.add_
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: File "/usr/lib/
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: if res.has_
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: File "/usr/lib/
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: return ri.name == resource_type
Oct 26 11:24:23 steveb-dellserver heat-engine[32576]: AttributeError: 'NoneType' object has no attribute 'name'
When the registry changes, get_resource_info might return None, so has_interface needs a None check
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Steve Baker (steve-stevebaker) |
milestone: | none → mitaka-1 |
tags: | added: liberty-backport-potential |
tags: | added: kilo-backport-potential |
tags: | removed: liberty-backport-potential |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/239368
Review: https:/