Retry of nested stack delete has race
Bug #1669608 reported by
Zane Bitter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
In Progress
|
Medium
|
Rico Lin |
Bug Description
When updating a nested stack that is e.g. in the UPDATE_FAILED state, we check the timestamp when polling the child status to avoid a race where we may see the status before the child stack becomes UPDATE_IN_PROGRESS again.
There is no such protection for a nested stack in the DELETE_FAILED state. Trying to delete the parent resource again will likely always fail with the same error as last time, since it will see the status before the child stack becomes DELETE_IN_PROGRESS. (A subsequent attempt should work, if the stack was in fact deleted, since the parent will get NotFound when looking for the child status.)
Changed in heat: | |
milestone: | pike-1 → pike-2 |
Changed in heat: | |
milestone: | pike-2 → pike-3 |
Changed in heat: | |
milestone: | pike-3 → pike-rc1 |
Changed in heat: | |
assignee: | nobody → Rico Lin (rico-lin) |
Changed in heat: | |
milestone: | pike-rc1 → pike-rc2 |
Changed in heat: | |
milestone: | pike-rc2 → queens-1 |
Changed in heat: | |
milestone: | queens-1 → queens-2 |
Changed in heat: | |
milestone: | queens-2 → queens-3 |
Changed in heat: | |
milestone: | queens-3 → queens-rc1 |
Changed in heat: | |
milestone: | queens-rc1 → rocky-1 |
Changed in heat: | |
milestone: | rocky-1 → rocky-2 |
To post a comment you must log in.
delete_stack used to always use cast, and now it looks in the code like it always uses call.
I believe the problem is here: /github. com/openstack/ heat/blob/ master/ heat/engine/ resources/ stack_resource. py#L535
https:/
(needs a return statement. Same for the abandon_stack 2 lines above)
return self.rpc_ client( ).delete_ stack(self. context, stack_identity, cast=False)
otherwise delete_nested will immediately proceed to the check_delete method (which detects FAILED) may execute before the handle_delete is able to update the state for the nested stack.