[bugfix]retry is reached but action still success
now when action like live-migration retry is reached result is False but action still success we can add check in do execute method can fix this problem. close-bug: 1685757 Change-Id: I8390566ec8dcfa3a71b931d5be1b305802ac0b2a
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