qemu: Properly reset non-p2p migration

While peer-to-peer migration enters the Confirm phase even if the
Perform phase fails, the client which initiated a non-p2p migration will
never call virDomainMigrateConfirm* API if the Perform phase failed.
Thus we need to explicitly reset migration before reporting a failure
from the Perform phase API.

https://bugzilla.redhat.com/show_bug.cgi?id=1425003

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2017-04-26 21:46:28 +02:00
parent 81bbdafb96
commit eeb2feb9fb

View File

@ -4914,10 +4914,13 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
goto endjob; goto endjob;
endjob: endjob:
if (ret < 0) if (ret < 0) {
qemuMigrationReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT);
qemuMigrationJobFinish(driver, vm); qemuMigrationJobFinish(driver, vm);
else } else {
qemuMigrationJobContinue(vm); qemuMigrationJobContinue(vm);
}
if (!virDomainObjIsActive(vm)) if (!virDomainObjIsActive(vm))
qemuDomainRemoveInactive(driver, vm); qemuDomainRemoveInactive(driver, vm);