Abort operation for live migration
This patch adds abort operation for live migration to support abort in cancel action plan. Change-Id: I458e93d9bd09dc4cf80cc941104129fc7600a6b1 Partially-Implements: blueprint cancel-action-plan
This commit is contained in:
@@ -143,8 +143,14 @@ class TaskFlowActionContainer(base.BaseTaskFlowActionContainer):
|
||||
def do_abort(self, *args, **kwargs):
|
||||
LOG.warning("Aborting action: %s", self.name)
|
||||
try:
|
||||
self.action.abort()
|
||||
self.engine.notify(self._db_action, objects.action.State.CANCELLED)
|
||||
result = self.action.abort()
|
||||
if result:
|
||||
# Aborted the action.
|
||||
self.engine.notify(self._db_action,
|
||||
objects.action.State.CANCELLED)
|
||||
else:
|
||||
self.engine.notify(self._db_action,
|
||||
objects.action.State.SUCCEEDED)
|
||||
except Exception as e:
|
||||
self.engine.notify(self._db_action, objects.action.State.FAILED)
|
||||
LOG.exception(e)
|
||||
|
||||
Reference in New Issue
Block a user