[Pkg-libvirt-maintainers] Bug#1107107: unblock: libvirt/11.3.0-2

Andrea Bolognani eof at kiyuko.org
Sun Jun 1 16:56:43 BST 2025


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: libvirt at packages.debian.org
Control: affects -1 + src:libvirt

Please unblock package libvirt.

[ Reason ]

Apply fix for #1104735.

[ Tests ]

The backport has been confirmed to address the issue in Debian:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104735#25

[ Risks ]

Very little risk of causing regressions. The fix is small and
targeted, and it comes directly from upstream with no changes.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock libvirt/11.3.0-2

-- 
Andrea Bolognani <eof at kiyuko.org>
Resistance is futile, you will be garbage collected.
-------------- next part --------------
diff -Nru libvirt-11.3.0/debian/changelog libvirt-11.3.0/debian/changelog
--- libvirt-11.3.0/debian/changelog	2025-05-02 20:25:28.000000000 +0000
+++ libvirt-11.3.0/debian/changelog	2025-06-01 14:39:44.000000000 +0000
@@ -1,3 +1,11 @@
+libvirt (11.3.0-2) unstable; urgency=medium
+
+  * [eb4a97a] patches: Add backports
+    - backport/[...]-Don-t-setup-qemu-for-inco.patch
+      - Closes: #1104735
+
+ -- Andrea Bolognani <eof at kiyuko.org>  Sun, 01 Jun 2025 16:39:44 +0200
+
 libvirt (11.3.0-1) unstable; urgency=medium
 
   * [228f666] New upstream version 11.3.0
diff -Nru libvirt-11.3.0/debian/patches/backport/qemuProcessStartWithMemoryState-Don-t-setup-qemu-for-inco.patch libvirt-11.3.0/debian/patches/backport/qemuProcessStartWithMemoryState-Don-t-setup-qemu-for-inco.patch
--- libvirt-11.3.0/debian/patches/backport/qemuProcessStartWithMemoryState-Don-t-setup-qemu-for-inco.patch	1970-01-01 00:00:00.000000000 +0000
+++ libvirt-11.3.0/debian/patches/backport/qemuProcessStartWithMemoryState-Don-t-setup-qemu-for-inco.patch	2025-06-01 14:39:44.000000000 +0000
@@ -0,0 +1,62 @@
+From: Peter Krempa <pkrempa at redhat.com>
+Date: Tue, 13 May 2025 19:07:20 +0200
+Subject: qemuProcessStartWithMemoryState: Don't setup qemu for incoming
+ migration when reverting internal snapshot
+
+The memory/device state of the VM for an internal snapshot is restored
+by qemu itself via a QMP command and is taken from the qcow2 image, thus
+we don't actually do any form of incoming migration.
+
+Commit 5b324c0a739fe00 which refactored the setup of the incoming
+migration state didn't take the above into account and inadvertently
+caused that qemu is being started with '-incoming defer' also when
+libvirt would want to revert an internal snapshot.
+
+Now when qemu expects incoming migration it doesn't activate the block
+backends as that would cause locking problems and image inconsistency,
+but also doesn't allow the use of the images. Since the block backends
+are not activated qemu then thinks that they don't actually support
+internal snapshots and reports:
+
+  error: operation failed: load of internal snapshot 'foo1' job failed: Device 'libvirt-1-format' is writable but does not support snapshots
+
+Due to the above bug it's not possible to revert to internal snapshots
+in libvirt-11.2 and libvirt-11.3.
+
+Fixes: 5b324c0a739fe00cbec209219db4488742492112
+Resolves: https://issues.redhat.com/browse/RHEL-88747
+Closes: https://gitlab.com/libvirt/libvirt/-/issues/771
+Signed-off-by: Peter Krempa <pkrempa at redhat.com>
+Reviewed-by: Jim Fehlig <jfehlig at suse.com>
+Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
+(cherry picked from commit 889d2ae289cd95d612575ebc7a4e111ac33b0939)
+
+Bug-Debian: https://bugs.debian.org/1104735
+
+Forwarded: not-needed
+Origin: https://gitlab.com/libvirt/libvirt/-/commits/889d2ae289cd95d612575ebc7a4e111ac33b0939
+---
+ src/qemu/qemu_process.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
+index 1af91c5..5f2203d 100644
+--- a/src/qemu/qemu_process.c
++++ b/src/qemu/qemu_process.c
+@@ -8636,9 +8636,13 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
+     /* The fd passed to qemuProcessIncomingDefNew is used to create the migration
+      * URI, so it must be called after starting the decompression program.
+      */
+-    incoming = qemuProcessIncomingDefNew(driver, vm, NULL, "stdio", fd, path, data, migParams);
+-    if (!incoming)
+-        return -1;
++    if (!snapshot) {
++        /* Internal snapshots are reverted by a QMP command after qemu is started,
++         * so we don't actually want to setup incoming migration. */
++        if (!(incoming = qemuProcessIncomingDefNew(driver, vm, NULL, "stdio",
++                                                   fd, path, data, migParams)))
++            return -1;
++    }
+ 
+     /* No cookie means libvirt which saved the domain was too old to mess up
+      * the CPU definitions.
diff -Nru libvirt-11.3.0/debian/patches/series libvirt-11.3.0/debian/patches/series
--- libvirt-11.3.0/debian/patches/series	2025-05-02 20:25:28.000000000 +0000
+++ libvirt-11.3.0/debian/patches/series	2025-06-01 14:39:44.000000000 +0000
@@ -1,3 +1,4 @@
+backport/qemuProcessStartWithMemoryState-Don-t-setup-qemu-for-inco.patch
 debian/Debianize-libvirt-guests.patch
 debian/apparmor_profiles_local_include.patch
 debian/Use-sensible-editor-by-default.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20250601/b1b96b35/attachment.sig>


More information about the Pkg-libvirt-maintainers mailing list