|
|
a41c76 |
From da9c0f143d7c917c98b7352be7954e8b2489aa9e Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <da9c0f143d7c917c98b7352be7954e8b2489aa9e@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Fri, 3 Apr 2020 14:32:58 +0200
|
|
|
a41c76 |
Subject: [PATCH] virDomainCheckpointRedefinePrep: Set 'current' checkpoint if
|
|
|
a41c76 |
there isn't any
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
When redefining checkpoints from scratch we'd not set the 'current'
|
|
|
a41c76 |
checkpoint if there wasn't any. This meant that the code wasn't ever
|
|
|
a41c76 |
able to set a 'current' checkpoint as any other one looks up if the
|
|
|
a41c76 |
parent of the redefined checkpoint is current.
|
|
|
a41c76 |
|
|
|
a41c76 |
Since the backup code then requires the current checkpoint to start the
|
|
|
a41c76 |
lookup we'd not be able to perform a backup after restoring the
|
|
|
a41c76 |
checkpoint hierarchy.
|
|
|
a41c76 |
|
|
|
a41c76 |
Reported-by: Eyal Shenitzky <eshenitz@redhat.com>
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 9428c4609c7b23b3afe89566dca9ac237256d3df)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1819755
|
|
|
a41c76 |
|
|
|
a41c76 |
Message-Id: <53c1d685b40f0f540eeb4d15a17e308aab2bf648.1585916255.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/conf/checkpoint_conf.c | 4 ++++
|
|
|
a41c76 |
1 file changed, 4 insertions(+)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
|
|
|
a41c76 |
index 26bcfc16b7..d557fada49 100644
|
|
|
a41c76 |
--- a/src/conf/checkpoint_conf.c
|
|
|
a41c76 |
+++ b/src/conf/checkpoint_conf.c
|
|
|
a41c76 |
@@ -550,6 +550,10 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
|
|
|
a41c76 |
*update_current = true;
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
+ /* set the first redefined checkpoint as current */
|
|
|
a41c76 |
+ if (virDomainCheckpointGetCurrent(vm->checkpoints) == NULL)
|
|
|
a41c76 |
+ *update_current = true;
|
|
|
a41c76 |
+
|
|
|
a41c76 |
other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);
|
|
|
a41c76 |
if (other) {
|
|
|
a41c76 |
otherdef = virDomainCheckpointObjGetDef(other);
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.26.0
|
|
|
a41c76 |
|