|
|
3e5111 |
From b24b004e1196889201142d1fc7d51e2fafdbe328 Mon Sep 17 00:00:00 2001
|
|
|
3e5111 |
Message-Id: <b24b004e1196889201142d1fc7d51e2fafdbe328@dist-git>
|
|
|
3e5111 |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3e5111 |
Date: Thu, 20 Apr 2017 09:16:20 +0200
|
|
|
3e5111 |
Subject: [PATCH] conf: add a new parse flag
|
|
|
3e5111 |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION
|
|
|
3e5111 |
|
|
|
3e5111 |
So far there is probably no change that is allowed to be done
|
|
|
3e5111 |
by the VIR_DOMAIN_DEF_PARSE_ABI_UPDATE flag that would break
|
|
|
3e5111 |
guest ABI but this may change in the future.
|
|
|
3e5111 |
|
|
|
3e5111 |
This introduces new VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION
|
|
|
3e5111 |
which should be used only for ABI updates that are "safe" for
|
|
|
3e5111 |
persistent migration.
|
|
|
3e5111 |
|
|
|
3e5111 |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3e5111 |
(cherry picked from commit 5c7d88085a762cf4ecc9416a3b7581fa45738c2a)
|
|
|
3e5111 |
|
|
|
3e5111 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1373184
|
|
|
3e5111 |
|
|
|
3e5111 |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3e5111 |
---
|
|
|
3e5111 |
src/conf/domain_conf.c | 3 ++-
|
|
|
3e5111 |
src/conf/domain_conf.h | 4 ++++
|
|
|
3e5111 |
src/qemu/qemu_migration_cookie.c | 2 +-
|
|
|
3e5111 |
3 files changed, 7 insertions(+), 2 deletions(-)
|
|
|
3e5111 |
|
|
|
3e5111 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
3e5111 |
index 1b0a55b27..71f0c95c3 100644
|
|
|
3e5111 |
--- a/src/conf/domain_conf.c
|
|
|
3e5111 |
+++ b/src/conf/domain_conf.c
|
|
|
3e5111 |
@@ -3805,7 +3805,8 @@ virDomainDefPostParseMemory(virDomainDefPtr def,
|
|
|
3e5111 |
/* Attempt to infer the initial memory size from the sum NUMA memory sizes
|
|
|
3e5111 |
* in case ABI updates are allowed or the <memory> element wasn't specified */
|
|
|
3e5111 |
if (def->mem.total_memory == 0 ||
|
|
|
3e5111 |
- parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE)
|
|
|
3e5111 |
+ parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE ||
|
|
|
3e5111 |
+ parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION)
|
|
|
3e5111 |
numaMemory = virDomainNumaGetMemorySize(def->numa);
|
|
|
3e5111 |
|
|
|
3e5111 |
/* calculate the sizes of hotplug memory */
|
|
|
3e5111 |
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
|
|
3e5111 |
index 47eaacef3..71e651975 100644
|
|
|
3e5111 |
--- a/src/conf/domain_conf.h
|
|
|
3e5111 |
+++ b/src/conf/domain_conf.h
|
|
|
3e5111 |
@@ -2725,6 +2725,10 @@ typedef enum {
|
|
|
3e5111 |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE = 1 << 10,
|
|
|
3e5111 |
/* skip parsing of security labels */
|
|
|
3e5111 |
VIR_DOMAIN_DEF_PARSE_SKIP_SECLABEL = 1 << 11,
|
|
|
3e5111 |
+ /* Allows updates in post parse callback for incoming persistent migration
|
|
|
3e5111 |
+ * that would break ABI otherwise. This should be used only if it's safe
|
|
|
3e5111 |
+ * to do such change. */
|
|
|
3e5111 |
+ VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION = 1 << 12,
|
|
|
3e5111 |
} virDomainDefParseFlags;
|
|
|
3e5111 |
|
|
|
3e5111 |
typedef enum {
|
|
|
3e5111 |
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
|
|
|
3e5111 |
index bd12f1124..12887892d 100644
|
|
|
3e5111 |
--- a/src/qemu/qemu_migration_cookie.c
|
|
|
3e5111 |
+++ b/src/qemu/qemu_migration_cookie.c
|
|
|
3e5111 |
@@ -1173,7 +1173,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
|
|
3e5111 |
mig->persistent = virDomainDefParseNode(doc, nodes[0],
|
|
|
3e5111 |
caps, driver->xmlopt, NULL,
|
|
|
3e5111 |
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
|
|
3e5111 |
- VIR_DOMAIN_DEF_PARSE_ABI_UPDATE |
|
|
|
3e5111 |
+ VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION |
|
|
|
3e5111 |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
|
|
3e5111 |
if (!mig->persistent) {
|
|
|
3e5111 |
/* virDomainDefParseNode already reported
|
|
|
3e5111 |
--
|
|
|
3e5111 |
2.12.2
|
|
|
3e5111 |
|