Can not suspend or resume anymore when failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
huangtianhua |
Bug Description
1. create a stack with nova server
2. suspend the stack, failed due to some reasons, the stack went to 'SUSPEND_FAILED' state, and the resource(nova server) went to 'SUSPEND_FAILED' state
3. then we can't suspend the stack anymore, because the resource(nova server) status is not COMPLETE:
def suspend(self):
'''
Suspend the resource. Subclasses should provide a handle_suspend()
method to implement suspend
'''
action = self.SUSPEND
# Don't try to suspend the resource unless it's in a stable state
if (self.action == self.DELETE or self.status != self.COMPLETE):
exc = exception.
raise exception.
.... (DO SUSPEND)
4. stack resume has the same problem.
May be the state check for suspend should be:
if (self.action == self.DELETE or (self.acton != self.SUSPEND and self.status != self.COMPLETE)):
exc = exception.
raise exception.
.... (DO SUSPEND)
the state check for resume should be:
if self.state not in ((self.SUSPEND, self.COMPLETE), (self.RESUME, self.FAILED)):
exc = exception.
raise exception.
...... (DO RESUME)
Changed in heat: | |
assignee: | nobody → huangtianhua (huangtianhua) |
Changed in heat: | |
status: | New → In Progress |
Changed in heat: | |
importance: | Undecided → Medium |
milestone: | none → liberty-2 |
Changed in heat: | |
status: | In Progress → Fix Committed |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | liberty-2 → 5.0.0 |