Fix action plan state change when action failed
Since default workflow engine action container do_execute method does not raise exception when action failed, workflow engine action container execute method never raise exception and action plan state becomes always SUCCEEDED. This patch fixes default workflow engine action container do_execute method to raise exception when action does not return True. Change-Id: I7eeef69dbdfb5d40e3cf0b1004cbfe199a16bf7b Closes-Bug: #1719793
This commit is contained in:
@@ -127,8 +127,10 @@ class TaskFlowActionContainer(base.BaseTaskFlowActionContainer):
|
||||
return self.engine.notify(self._db_action,
|
||||
objects.action.State.SUCCEEDED)
|
||||
else:
|
||||
return self.engine.notify(self._db_action,
|
||||
objects.action.State.FAILED)
|
||||
self.engine.notify(self._db_action,
|
||||
objects.action.State.FAILED)
|
||||
raise exception.ActionExecutionFailure(
|
||||
action_id=self._db_action.uuid)
|
||||
|
||||
def do_post_execute(self):
|
||||
LOG.debug("Post-condition action: %s", self.name)
|
||||
|
||||
Reference in New Issue
Block a user