From: Jiri Denemark Date: Thu, 19 Oct 2017 12:26:24 +0000 (+0200) Subject: qemu: Set correct job status when qemuMigrationRun fails X-Git-Tag: v3.9.0-rc1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55ac6a5d44a2fbd7e93d995930d6071030c907ba;p=thirdparty%2Flibvirt.git 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 Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index bcb0e2a987..626b4e3eed 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -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;