1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

qemu: Set correct job status when qemuMigrationRun fails

Instead of enumerating all states which need to be turned into
QEMU_DOMAIN_JOB_STATUS_FAILED (and failing to add all of them), it's
better to mention just the one which needs to be left alone.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Jiri Denemark 2017-10-19 14:26:24 +02:00
parent 73a352263c
commit 55ac6a5d44

View File

@ -3943,9 +3943,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
if (iothread)
qemuMigrationStopTunnel(iothread, true);
if (priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_ACTIVE ||
priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_MIGRATING ||
priv->job.current->status == QEMU_DOMAIN_JOB_STATUS_POSTCOPY)
if (priv->job.current->status != QEMU_DOMAIN_JOB_STATUS_CANCELED)
priv->job.current->status = QEMU_DOMAIN_JOB_STATUS_FAILED;
goto cleanup;