Merge "[bugfix]retry is reached but action still success"
This commit is contained in:
@@ -108,8 +108,14 @@ class TaskFlowActionContainer(base.BaseTaskFlowActionContainer):
|
|||||||
def do_execute(self, *args, **kwargs):
|
def do_execute(self, *args, **kwargs):
|
||||||
LOG.debug("Running action: %s", self.name)
|
LOG.debug("Running action: %s", self.name)
|
||||||
|
|
||||||
self.action.execute()
|
# NOTE: For result is False, set action state fail
|
||||||
self.engine.notify(self._db_action, objects.action.State.SUCCEEDED)
|
result = self.action.execute()
|
||||||
|
if result is False:
|
||||||
|
self.engine.notify(self._db_action,
|
||||||
|
objects.action.State.FAILED)
|
||||||
|
else:
|
||||||
|
self.engine.notify(self._db_action,
|
||||||
|
objects.action.State.SUCCEEDED)
|
||||||
|
|
||||||
def do_post_execute(self):
|
def do_post_execute(self):
|
||||||
LOG.debug("Post-condition action: %s", self.name)
|
LOG.debug("Post-condition action: %s", self.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user