Heat stack update removes external resource
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Thomas Herve |
Bug Description
openstack version: pike 9.03
Given following stack, which has one resource with external_id, the stack update removes the resource every second time. The first update removes the resource and then the second update adds the resource back to the stack.
heat_template_
description: 'testing external resource'
parameters:
change_me:
type: string
default: change1
network:
type: string
description: UUID of an existing neutron network
default: a027a807-
constraints:
- custom_constraint: neutron.network
resources:
mynet:
type: OS::Neutron::Net
external_id: {get_param: network}
outputs:
mynet:
description: properties of the external network
value:
name: {get_attr: [mynet, name]}
[cloudadmin@
2018-03-16 07:12:29Z [test_stack]: CREATE_IN_PROGRESS Stack CREATE started
2018-03-16 07:12:30Z [test_stack.mynet]: ADOPT_IN_PROGRESS state changed
2018-03-16 07:12:30Z [test_stack.mynet]: ADOPT_COMPLETE state changed
2018-03-16 07:12:30Z [test_stack.mynet]: CHECK_COMPLETE CHECK not supported for OS::Neutron::Net
2018-03-16 07:12:30Z [test_stack]: CREATE_COMPLETE Stack CREATE completed successfully
+------
| Field | Value |
+------
| id | cce47e1f-
| stack_name | test_stack |
| description | testing external resource |
| creation_time | 2018-03-
| updated_time | None |
| stack_status | CREATE_COMPLETE |
| stack_status_reason | Stack CREATE completed successfully |
+------
[cloudadmin@
+------
| resource_name | physical_
+------
| mynet | a027a807-
+------
[cloudadmin@
2018-03-16 07:23:28Z [test_stack]: UPDATE_IN_PROGRESS Stack UPDATE started
2018-03-16 07:23:28Z [test_stack.mynet]: DELETE_IN_PROGRESS state changed
2018-03-16 07:23:28Z [test_stack.mynet]: DELETE_COMPLETE state changed
2018-03-16 07:23:29Z [test_stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
+------
| Field | Value |
+------
| id | cce47e1f-
| stack_name | test_stack |
| description | testing external resource |
| creation_time | 2018-03-
| updated_time | 2018-03-
| stack_status | UPDATE_COMPLETE |
| stack_status_reason | Stack UPDATE completed successfully |
+------
[cloudadmin@
The resource list is empty, although it should show mynet. Also, 'openstack stack show' shows output_value as null.
[cloudadmin@
+------
| Field | Value |
+------
| id | cce47e1f-
| stack_name | test_stack |
| description | testing external resource |
| creation_time | 2018-03-
| updated_time | 2018-03-
| stack_status | UPDATE_COMPLETE |
| stack_status_reason | Stack UPDATE completed successfully |
| parameters | OS::project_id: c15ead6ae28b43a
| | OS::stack_id: cce47e1f-
| | OS::stack_name: test_stack |
| | change_me: updated |
| | network: a027a807-
| | |
| outputs | - description: properties of the external network |
| | output_key: mynet |
| | output_value: |
| | name: null |
| | |
| links | - href: http://
| | rel: self |
| | |
| parent | None |
| disable_rollback | True |
| deletion_time | None |
| stack_user_
| capabilities | [] |
| notification_topics | [] |
| stack_owner | None |
| timeout_mins | None |
| tags | None |
+------
When stack update is run again, the external resource is added back to the stack. It seems that stack update works correctly every second time.
[cloudadmin@
2018-03-16 07:24:27Z [test_stack]: UPDATE_IN_PROGRESS Stack UPDATE started
2018-03-16 07:24:27Z [test_stack.mynet]: ADOPT_IN_PROGRESS state changed
2018-03-16 07:24:27Z [test_stack.mynet]: ADOPT_COMPLETE state changed
2018-03-16 07:24:27Z [test_stack.mynet]: CHECK_COMPLETE CHECK not supported for OS::Neutron::Net
2018-03-16 07:24:27Z [test_stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
+------
| Field | Value |
+------
| id | cce47e1f-
| stack_name | test_stack |
| description | testing external resource |
| creation_time | 2018-03-
| updated_time | 2018-03-
| stack_status | UPDATE_COMPLETE |
| stack_status_reason | Stack UPDATE completed successfully |
+------
[cloudadmin@
+------
| resource_name | physical_
+------
| mynet | a027a807-
+------
[cloudadmin@
+------
| Field | Value |
+------
| id | cce47e1f-
| stack_name | test_stack |
| description | testing external resource |
| creation_time | 2018-03-
| updated_time | 2018-03-
| stack_status | UPDATE_COMPLETE |
| stack_status_reason | Stack UPDATE completed successfully |
| parameters | OS::project_id: c15ead6ae28b43a
| | OS::stack_id: cce47e1f-
| | OS::stack_name: test_stack |
| | change_me: updated |
| | network: a027a807-
| | |
| outputs | - description: properties of the external network |
| | output_key: mynet |
| | output_value: |
| | name: testnet |
| | |
| links | - href: http://
| | rel: self |
| | |
| parent | None |
| disable_rollback | True |
| deletion_time | None |
| stack_user_
| capabilities | [] |
| notification_topics | [] |
| stack_owner | None |
| timeout_mins | None |
| tags | None |
+------
[cloudadmin@
Thanks for the detailed reproducer, I was able to see it. Looking at the issue.