Skip to content
Snippets Groups Projects
Commit c087266c authored by Guido Trotter's avatar Guido Trotter
Browse files

KVM live migration: handle failure

If the KVM live migration ends up in a 'failed' state it has been
aborted at the kvm level, and the machine is still running locally.
We support also the 'cancelled' state even though there should be no way
of reaching it, without manual intervention.

Reviewed-by: iustinp
parent 90c024f6
No related branches found
No related tags found
No related merge requests found
......@@ -506,6 +506,11 @@ class KVMHypervisor(hv_base.BaseHypervisor):
done = True
elif status == 'active':
time.sleep(2)
elif status == 'failed' or status == 'cancelled':
if not live:
self._CallMonitorCommand(instance_name, 'cont')
raise errors.HypervisorError("Migration %s at the kvm level" %
status)
else:
logging.info("KVM: unknown migration status '%s'" % status)
time.sleep(2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment