cannot delete the stack after heat-engine down in middle of stack-update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Rikimaru Honjo |
Bug Description
[Issue]
I'm checking the behavior when system failure cases.
Stack can't delete forever after heat-engine down in middle of stack-update.
Probably, similar case of following bug:
https:/
[How to reproduce]
1) Create stack with following template, this template is using boot from volume
$ cat template
{
"AWSTemplateF
"Resources" : {
"volume": {
"Type": "OS::Cinder:
"Properties": {
"name": "volume",
"size": 1,
"image": "0dd84e83-
}
},
"instance": {
"Type": "OS::Nova::Server",
"Properties": {
"name": "instance",
"flavor": "m1.tiny",
"image": "0dd84e83-
{
}
]
}
}
}
}
$ heat stack-create -f template test
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
2) Wait for CREATE_COMPLETE
$ heat stack-list
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
3) Update stack with following template, name and volume's image id was changed
$ cat template-up
{
"AWSTemplateF
"Resources" : {
"volume": {
"Type": "OS::Cinder:
"Properties": {
"name": "volume-up",
"size": 1,
"image": "8580e3cb-
}
},
"instance": {
"Type": "OS::Nova::Server",
"Properties": {
"name": "instance",
"flavor": "m1.tiny",
"image": "0dd84e83-
{
}
]
}
}
}
}
$ heat stack-update -f template-up test
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
4) Kill heat-engine for simulating system failure
$ ps aux|grep heat-engine|grep -v grep
devstack 27680 0.1 2.3 74068 48544 pts/43 S+ 13:29 0:06 python bin/heat-engine --config-
$ sudo kill -SIGKILL 27680
5) Restart heat-engine
$ /usr/bin/python /usr/local/
[1] 31877
$ ps aux|grep heat-engine|grep -v grep
devstack 31877 9.5 2.2 71480 46344 pts/11 S 14:44 0:01 /usr/bin/python /usr/local/
6) Stack status is in "UPDATE_
$ heat stack-list
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
7) But stack deletion never succeed
$ heat stack-list
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
$ heat stack-delete 1b1bff1b-
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
$ heat stack-list
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
$ heat stack-delete 1b1bff1b-
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
$ heat stack-list
+------
| id | stack_name | stack_status | creation_time |
+------
| 1b1bff1b-
+------
[trace]
* Stack deletion failed by "Volume in use"
2014-06-26 14:51:30.138 ERROR heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
2014-06-26 14:51:30.138 TRACE heat.engine.
* Because instance that's using the volume is alive
$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 2b0592c5-
+------
* It means, deletion order wasn't good
* This case's update method is UpdateReplace. According to DB, current_stack and backup_stack are having following resources when heat-engine down
current_stack has instance, new volume
backup_stack has old volume
* stack-delete try to delete backup_stack at first, but instance connected old volume at that time. Eventually, DELETE_FAILED occured with "Volume in use"
Changed in heat: | |
assignee: | Mitsuru Kanabuchi (kanabuchi) → Rikimaru Honjo (honjo-rikimaru-c6) |
Changed in heat: | |
importance: | Undecided → Medium |
milestone: | none → juno-3 |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-3 → 2014.2 |
Recently patch (commitid: 589b26698d20a11 3fa42552983c79e 2576c26421) changed volume's update_allowed, it affects route of update method.
So I updated bug description's template for reproducing this bug.