]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Ignore failure in post-copy migration when QEMU says completed
authorJiri Denemark <jdenemar@redhat.com>
Fri, 18 Nov 2022 15:19:33 +0000 (16:19 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 21 Nov 2022 17:17:44 +0000 (18:17 +0100)
commit3211895be384056708cc82dd034339962362f323
tree2687e0393386a0177f5825dbf894e6e9331fe883
parentbf77578c9c12450296174118a17cbd338e5f54e0
qemu: Ignore failure in post-copy migration when QEMU says completed

When post-copy migration is running in Finish phase we already did
everything needed and we're just waiting for all the memory to transfer
to the destination. The domain is already running on there at this
point. Once all data is transferred (QEMU sends a MIGRATION completed
event) we're done. So in this specific post-copy case the source does
not need to care about the result of the Finish call as long as QEMU
says migration completed. The Finish call to the destination daemon may
fail for reasons that do not affect QEMU, e.g., libvirt daemon was
restarted there or the libvirt connection broke.

Currently we just mark the post-copy migration as failed on the source
and keep the domain paused there. But when libvirt daemon is restarted
at this point, it will detect migration finished successfully and kill
the domain as migrated. It make sense to do this even without having to
restart the daemon.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/338
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_migration.c