]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Make qemuMigrationSrcCancel optionally synchronous
authorJiri Denemark <jdenemar@redhat.com>
Tue, 6 Sep 2022 16:21:31 +0000 (18:21 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 6 Sep 2022 16:28:10 +0000 (18:28 +0200)
commit2d7b22b561f9e2dd1b86fb2c5b0d904823a189d2
tree8e8b58a5a3e7601517fe7f7c5b5f9e44a1f9e769
parent4e55fe21b54dbc79413626f50908fad5e72a0494
qemu: Make qemuMigrationSrcCancel optionally synchronous

We have always considered "migrate_cancel" QMP command to return after
successfully cancelling the migration. But this is no longer true (to be
honest I'm not sure it ever was) as it just changes the migration state
to "cancelling". In most cases the migration is canceled pretty quickly
and we don't really notice anything, but sometimes it takes so long we
even get to clearing migration capabilities before the migration is
actually canceled, which fails as capabilities can only be changed when
no migration is running. So to avoid this issue, we can wait for the
migration to be really canceled after sending migrate_cancel. The only
place where we don't need synchronous behavior is when we're cancelling
migration on user's request while it is actively watched by another
thread.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_migration.h
src/qemu/qemu_process.c