From 3e28f5c7d1f044c1053430142e65dd2bbe2194622308efac2d3f91cf937940a6 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 8 Feb 2022 22:28:35 +0000 Subject: [PATCH] - qemu: fix inactive snapshot revert 76deb656-qemu-fix-snapshot-revert.patch boo#1195690 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=923 --- 76deb656-qemu-fix-snapshot-revert.patch | 30 +++++++++++++++++++++++++ libvirt.changes | 7 ++++++ libvirt.spec | 1 + 3 files changed, 38 insertions(+) create mode 100644 76deb656-qemu-fix-snapshot-revert.patch diff --git a/76deb656-qemu-fix-snapshot-revert.patch b/76deb656-qemu-fix-snapshot-revert.patch new file mode 100644 index 0000000..1382445 --- /dev/null +++ b/76deb656-qemu-fix-snapshot-revert.patch @@ -0,0 +1,30 @@ +commit 76deb656132bb8817ddae4b7f417930c4db824c9 +Author: Ján Tomko +Date: Thu Jan 20 14:53:33 2022 +0100 + + qemu: fix inactive snapshot revert + + The commit splitting out the qemuSnapshotRevertInactive function + dropped the 'defined = true' line by accident and instead + returned -1, leaving the user with a cryptic error: + error: An error occurred, but the cause is unknown + + https://bugzilla.redhat.com/show_bug.cgi?id=2039136 + https://gitlab.com/libvirt/libvirt/-/issues/266 + + Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e + Signed-off-by: Ján Tomko + +Index: libvirt-8.0.0/src/qemu/qemu_snapshot.c +=================================================================== +--- libvirt-8.0.0.orig/src/qemu/qemu_snapshot.c ++++ libvirt-8.0.0/src/qemu/qemu_snapshot.c +@@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj + + if (*inactiveConfig) { + virDomainObjAssignDef(vm, inactiveConfig, false, NULL); +- return -1; ++ defined = true; + } + + if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | diff --git a/libvirt.changes b/libvirt.changes index 18cd66b..118ad43 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 8 22:25:03 UTC 2022 - James Fehlig + +- qemu: fix inactive snapshot revert + 76deb656-qemu-fix-snapshot-revert.patch + boo#1195690 + ------------------------------------------------------------------- Mon Feb 7 21:32:20 UTC 2022 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index 9e9eed9..9610867 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -308,6 +308,7 @@ Patch3: 31e937fb-libxl-save-lock-indicator.patch Patch4: 105dace2-revert-virProcessGetStatInfo.patch Patch5: e0241f33-libxl-mark-allocated-graphics-ports.patch Patch6: 18ec405a-libxl-release-graphics-ports.patch +Patch7: 76deb656-qemu-fix-snapshot-revert.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch