render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
1b87cf
From 94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca Mon Sep 17 00:00:00 2001
1b87cf
Message-Id: <94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca@dist-git>
1b87cf
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
1b87cf
Date: Thu, 20 Jan 2022 14:53:33 +0100
1b87cf
Subject: [PATCH] qemu: fix inactive snapshot revert
1b87cf
MIME-Version: 1.0
1b87cf
Content-Type: text/plain; charset=UTF-8
1b87cf
Content-Transfer-Encoding: 8bit
1b87cf
1b87cf
The commit splitting out the qemuSnapshotRevertInactive function
1b87cf
dropped the 'defined = true' line by accident and instead
1b87cf
returned -1, leaving the user with a cryptic error:
1b87cf
error: An error occurred, but the cause is unknown
1b87cf
1b87cf
https://bugzilla.redhat.com/show_bug.cgi?id=2039136
1b87cf
https://gitlab.com/libvirt/libvirt/-/issues/266
1b87cf
1b87cf
Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e
1b87cf
Signed-off-by: Ján Tomko <jtomko@redhat.com>
1b87cf
(cherry picked from commit 76deb656132bb8817ddae4b7f417930c4db824c9)
1b87cf
1b87cf
https://bugzilla.redhat.com/show_bug.cgi?id=2043584
1b87cf
1b87cf
Signed-off-by: Ján Tomko <jtomko@redhat.com>
1b87cf
---
1b87cf
 src/qemu/qemu_snapshot.c | 2 +-
1b87cf
 1 file changed, 1 insertion(+), 1 deletion(-)
1b87cf
1b87cf
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
1b87cf
index f92e00f9c0..ac7bab90f8 100644
1b87cf
--- a/src/qemu/qemu_snapshot.c
1b87cf
+++ b/src/qemu/qemu_snapshot.c
1b87cf
@@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj *vm,
1b87cf
 
1b87cf
     if (*inactiveConfig) {
1b87cf
         virDomainObjAssignDef(vm, inactiveConfig, false, NULL);
1b87cf
-        return -1;
1b87cf
+        defined = true;
1b87cf
     }
1b87cf
 
1b87cf
     if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
1b87cf
-- 
1b87cf
2.35.0
1b87cf