qemu: Ignore failure in post-copy migration when QEMU says completed
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 <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>
Reviewed-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>

zippy2/libvirt,olafhering/libvirt,olafhering/libvirt,libvirt/libvirt,zippy2/libvirt,libvirt/libvirt,zippy2/libvirt,zippy2/libvirt,libvirt/libvirt,olafhering/libvirt,libvirt/libvirt,olafhering/libvirt