stack update action doesn't take effect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Angus Salkeld |
Bug Description
Just try "stack-update" case in order to increase/reduce the nova instances on below resource type, It seems heat engine will base on the original instance request number (at first create in template) of the resource to judge whether need adjustment (create/delete nova instance) or ignore the request.
1. OS::Heat:
2. OS::Heat:
3. OS::Heat:
4. AWS::AutoScalin
For example test on "OS::Heat:
step 1: create stack with below template
[root@xhu01 os_instance_gp]# more my_instance_
heat_template_
resources:
my_inst_gp:
type: OS::Heat:
properties:
Size: 1
she_inst_gp:
type: OS::Heat:
properties:
Size: 1
launchconfig_my:
type: AWS::AutoScalin
properties:
ImageId: yy
launchconfig_she:
type: AWS::AutoScalin
properties:
ImageId: yy
[root@xhu01 os_instance_gp]# heat stack-create -f my_instance_
+------
| id | stack_name | stack_status | creation_time |
+------
| 61688284-
+------
[root@xhu01 os_instance_gp]#
step 2: check nova instance list, it is ok, each resource "OS::Heat:
[root@xhu01 ~]# nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 6e614afe-
| 6ee6fa06-
+------
[root@xhu01 ~]#
step 3: update template, change 'Size' from 1 to 3 on the two "OS::Heat:
step 4: run stack-update command to update stack with the latest template
[root@xhu01 os_instance_gp]# heat stack-update -f my_instance_
+------
| id | stack_name | stack_status | creation_time |
+------
| 61688284-
+------
[root@xhu01 os_instance_gp]#
step 5: check nova list, it is ok, each "OS::Heat:
[root@xhu01 ~]# nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| c8e79939-
| 6e614afe-
| c8528622-
| 6ee6fa06-
| f3ec7eb0-
| 9c8d6e91-
+------
[root@xhu01 ~]#
step 6: update template, change 'Size' from 3 to original value 1 on the two "OS::Heat:
step 7: run stack-update command to update stack with the latest template
[root@xhu01 os_instance_gp]# heat stack-update -f my_instance_
+------
| id | stack_name | stack_status | creation_time |
+------
| 61688284-
+------
[root@xhu01 os_instance_gp]#
step 7: check nova list, no change for a long time.
>>>>>> >>> there is something wrong here: I think heat engine should delete 2 (3-1) on each "OS::Heat:
step 8: update template, change 'Size' from 1 to 2 on the two "OS::Heat:
step 9: run stack-update command to update stack with the latest template
[root@xhu01 os_instance_gp]# heat stack-update -f my_instance_
+------
| id | stack_name | stack_status | creation_time |
+------
| 61688284-
+------
[root@xhu01 os_instance_gp]#
step 10: check nova list, it is ok for me, since heat engine deletes 1 (3-2) nova instance on each "OS::Heat:
[root@xhu01 ~]# nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| c8e79939-
| c8528622-
| f3ec7eb0-
| 9c8d6e91-
+------
[root@xhu01 ~]#
According to my test, the resource "OS::Heat:
1. a = the current instance number(base on "nova list") on the heat resource, such as "OS::Heat:
2. b = the request instance number in template, such as "Size" on "OS::Heat:
if b > a, create (b-a) nova instances for this resource
if a > b, delete (a-b) nova instances for this resource
if a ==b , ignore the request on this resource
Changed in heat: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Angus Salkeld (asalkeld) |
milestone: | none → kilo-1 |
tags: | added: juno-rc-potential |
Changed in heat: | |
milestone: | kilo-1 → juno-rc3 |
tags: | removed: juno-rc-potential |
tags: | removed: juno-rc-potential |
Changed in heat: | |
milestone: | juno-rc3 → 2014.2 |
Hi, all, any comments on this issue?