Description of problem: When doing a stack-update of a heat stack containing nested stacks, it's impossible to change the type alias of the resource in the resource_registry without destroying the nested stack, even if the stack template referenced has not changed. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: $ cat > parent.yaml << EOF heat_template_version: 2014-10-16 resources: random: type: My::Random EOF $cat > random.yaml << EOF heat_template_version: 2014-10-16 resources: the_random: type: OS::Heat::RandomString EOF $ cat > env.yaml << EOF resource_registry: My::Random: random.yaml My::Random2: random.yaml EOF $ heat stack-create r1 -f parent.yaml -e env.yaml +--------------------------------------+------------+--------------------+---------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+---------------------+--------------+ | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | r1 | CREATE_IN_PROGRESS | 2015-11-05T17:56:46 | None | +--------------------------------------+------------+--------------------+---------------------+--------------+ -bash-4.3$ heat resource-list -n2 r1 +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ | resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name | +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ | random | 42764e30-6184-4714-ad2e-533cb6ad5f30 | My::Random | CREATE_COMPLETE | 2015-11-05T17:56:46 | r1 | | the_random | r1-random-r2oxpnrqbsoi-the_random-ljovuhzofeyv | OS::Heat::RandomString | CREATE_COMPLETE | 2015-11-05T17:56:46 | r1-random-r2oxpnrqbsoi | +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ -bash-4.3$ heat stack-list -n +--------------------------------------+------------------------+-----------------+---------------------+--------------+--------------------------------------+ | id | stack_name | stack_status | creation_time | updated_time | parent | +--------------------------------------+------------------------+-----------------+---------------------+--------------+--------------------------------------+ | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | r1 | CREATE_COMPLETE | 2015-11-05T17:56:46 | None | None | | 42764e30-6184-4714-ad2e-533cb6ad5f30 | r1-random-r2oxpnrqbsoi | CREATE_COMPLETE | 2015-11-05T17:56:46 | None | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | Actual results: If you update the type in parent.yaml to My::Random2, the nested stack is replaced, despite pointing to the same template: $ sed -i "s/My::Random/My::Random2/" parent.yaml -bash-4.3$ heat stack-update r1 -f parent.yaml -e env.yaml +--------------------------------------+------------+-----------------+---------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+-----------------+---------------------+--------------+ | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | r1 | CREATE_COMPLETE | 2015-11-05T17:56:46 | None | +--------------------------------------+------------+-----------------+---------------------+--------------+ -bash-4.3$ heat stack-list +--------------------------------------+------------+-----------------+---------------------+---------------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+-----------------+---------------------+---------------------+ | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | r1 | UPDATE_COMPLETE | 2015-11-05T17:56:46 | 2015-11-05T17:59:31 | +--------------------------------------+------------+-----------------+---------------------+---------------------+ -bash-4.3$ heat resource-list -n2 r1 +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ | resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name | +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ | random | 15a9503b-5d36-4e74-b118-ee285f601d2d | My::Random2 | CREATE_COMPLETE | 2015-11-05T17:59:31 | r1 | | the_random | r1-random-qvndtjvasurz-the_random-3hjbwb7myxyz | OS::Heat::RandomString | CREATE_COMPLETE | 2015-11-05T17:59:31 | r1-random-qvndtjvasurz | +---------------+------------------------------------------------+------------------------+-----------------+---------------------+------------------------+ -bash-4.3$ heat stack-list -n +--------------------------------------+------------------------+-----------------+---------------------+---------------------+--------------------------------------+ | id | stack_name | stack_status | creation_time | updated_time | parent | +--------------------------------------+------------------------+-----------------+---------------------+---------------------+--------------------------------------+ | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | r1 | UPDATE_COMPLETE | 2015-11-05T17:56:46 | 2015-11-05T17:59:31 | None | | 15a9503b-5d36-4e74-b118-ee285f601d2d | r1-random-qvndtjvasurz | CREATE_COMPLETE | 2015-11-05T17:59:31 | None | 0076e20e-3f2b-486f-a9c4-a7e81b18c1c7 | Expected results: the nested stack and nested the_random resource should be unmodified, not replaced as above. Additional info:
can we get this backported for z3?
We don't have an upstream patch yet, but when we do I'd expect to backport it.
The upstream patch is now ready to go I think.
works better now. mind the syntax in the example on comment 0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2015:2680