[libvirt PATCH 71/80] qemu: Register qemuProcessCleanupMigrationJob after Begin phase

Jiri Denemark jdenemar at redhat.com
Tue May 10 15:21:32 UTC 2022


The callback will properly cleanup non-p2p migration job in case the
migrating domain dies between Begin and Perform while the client which
controls the migration is not cooperating (normally the API for the next
migration phase would handle this).

The same situation can happen even after Prepare and Perform phases, but
they both already register a suitable callback, so no fix is needed
there.

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
 src/qemu/qemu_migration.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 1fc978bad5..38a67f7e20 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2939,6 +2939,7 @@ qemuMigrationSrcBegin(virConnectPtr conn,
             VIR_FREE(xml);
             goto endjob;
         }
+        qemuDomainCleanupAdd(vm, qemuProcessCleanupMigrationJob);
         qemuMigrationJobContinue(vm);
     } else {
         goto endjob;
-- 
2.35.1



More information about the libvir-list mailing list