From c93c63891d187ee0d04a44ef5e59738f4edb5647bb279d0afffc111ee3489270 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Fri, 17 Apr 2020 16:30:52 +0000 Subject: [PATCH] Accepting request 794957 from home:jfehlig:branches:Virtualization - qemu: fix hang in p2p + xbzrle compression + parallel migration 93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch bsc#1161159 OBS-URL: https://build.opensuse.org/request/show/794957 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=822 --- ...-p2p-xbzrle-compression-parallel-mig.patch | 40 +++++++++++++++++++ libvirt.changes | 7 ++++ libvirt.spec | 2 + 3 files changed, 49 insertions(+) create mode 100644 93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch diff --git a/93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch b/93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch new file mode 100644 index 0000000..fa9523a --- /dev/null +++ b/93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch @@ -0,0 +1,40 @@ +commit 93b15ba0f2eb7858f8d88a5fd7354bd48bb7fc8d +Author: Lin Ma +Date: Thu Apr 16 12:44:51 2020 +0800 + + qemu: fix hang in p2p + xbzrle compression + parallel migration + + When we do parallel migration, The multifd-channels migration parameter + needs to be set on the destination side as well before incoming migration + URI, unless we accept the default number of connections(2). + + Usually, This can be correctly handled by libvirtd. But in this case if + we use p2p + xbzrle compression without parameter '--comp-xbzrle-cache', + qemuMigrationParamsDump returns too early, The corresponding migration + parameter will not be set on the destination side, It results QEMU hangs. + + Reproducer: + virsh migrate --live --p2p --comp-methods xbzrle \ + --parallel --parallel-connections 3 GUEST qemu+ssh://dsthost/system + + or + + virsh migrate --live --p2p --compressed \ + --parallel --parallel-connections 3 GUEST qemu+ssh://dsthost/system + + Signed-off-by: Lin Ma + Message-Id: <20200416044451.21134-1-lma@suse.com> + Reviewed-by: Jiri Denemark + +Index: libvirt-6.0.0/src/qemu/qemu_migration_params.c +=================================================================== +--- libvirt-6.0.0.orig/src/qemu/qemu_migration_params.c ++++ libvirt-6.0.0/src/qemu/qemu_migration_params.c +@@ -630,7 +630,6 @@ qemuMigrationParamsDump(qemuMigrationPar + if (migParams->compMethods == 1ULL << QEMU_MIGRATION_COMPRESS_XBZRLE && + !migParams->params[QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE].set) { + *flags |= VIR_MIGRATE_COMPRESSED; +- return 0; + } + + for (i = 0; i < QEMU_MIGRATION_COMPRESS_LAST; ++i) { diff --git a/libvirt.changes b/libvirt.changes index 9411f18..d274097 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 17 05:19:57 UTC 2020 - Lin Ma + +- qemu: fix hang in p2p + xbzrle compression + parallel migration + 93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch + bsc#1161159 + ------------------------------------------------------------------- Thu Apr 9 22:04:57 UTC 2020 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index a38fca6..14acf09 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -342,6 +342,7 @@ Patch0: 88011ed2-libxl-driver-crash-fix.patch Patch1: 8e669b38-conf-add-event-channels.patch Patch2: a93f55c5-libxl-add-event-channels.patch Patch3: 967f4eeb-xenconfig-event-channels.patch +Patch4: 93b15ba0-qemu-fix-hang-in-p2p-xbzrle-compression-parallel-mig.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -881,6 +882,7 @@ libvirt plugin for NSS for translating domain names into IP addresses. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch100 -p1 %patch101 -p1 %patch150 -p1