|
|
4a2fec |
From 7d98216efe37db465e3819912a014086e33c3bdd Mon Sep 17 00:00:00 2001
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
Date: Wed, 25 Oct 2017 18:28:33 +0200
|
|
|
4a2fec |
Subject: [PATCH 14/19] migration: Add 'pre-switchover' and 'device' statuses
|
|
|
4a2fec |
|
|
|
4a2fec |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Message-id: <20171025182838.31829-3-dgilbert@redhat.com>
|
|
|
4a2fec |
Patchwork-id: 77436
|
|
|
4a2fec |
O-Subject: [RHV-7.5 qemu-kvm-rhev PATCH 2/7] migration: Add 'pre-switchover' and 'device' statuses
|
|
|
4a2fec |
Bugzilla: 1497120
|
|
|
4a2fec |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
Add two statuses for use when the 'pause-before-switchover'
|
|
|
4a2fec |
capability is enabled.
|
|
|
4a2fec |
|
|
|
4a2fec |
'pre-switchover' is the state that we wait in for management
|
|
|
4a2fec |
to allow us to continue.
|
|
|
4a2fec |
'device' is the state we enter while serialising the devices
|
|
|
4a2fec |
after management gives us the OK.
|
|
|
4a2fec |
|
|
|
4a2fec |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Reviewed-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
Reviewed-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
(cherry picked from commit 31e060774cf5c3b9945f6f16d6c18d6eae18e4d9)
|
|
|
4a2fec |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
Conflicts:
|
|
|
4a2fec |
qapi/migration.json
|
|
|
4a2fec |
still in qapi-schema.json
|
|
|
4a2fec |
---
|
|
|
4a2fec |
migration/migration.c | 6 ++++++
|
|
|
4a2fec |
qapi-schema.json | 8 +++++++-
|
|
|
4a2fec |
2 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
4a2fec |
|
|
|
4a2fec |
diff --git a/migration/migration.c b/migration/migration.c
|
|
|
4a2fec |
index d4356a4..54db29f 100644
|
|
|
4a2fec |
--- a/migration/migration.c
|
|
|
4a2fec |
+++ b/migration/migration.c
|
|
|
4a2fec |
@@ -473,6 +473,8 @@ static bool migration_is_setup_or_active(int state)
|
|
|
4a2fec |
case MIGRATION_STATUS_ACTIVE:
|
|
|
4a2fec |
case MIGRATION_STATUS_POSTCOPY_ACTIVE:
|
|
|
4a2fec |
case MIGRATION_STATUS_SETUP:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_PRE_SWITCHOVER:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_DEVICE:
|
|
|
4a2fec |
return true;
|
|
|
4a2fec |
|
|
|
4a2fec |
default:
|
|
|
4a2fec |
@@ -547,6 +549,8 @@ MigrationInfo *qmp_query_migrate(Error **errp)
|
|
|
4a2fec |
case MIGRATION_STATUS_ACTIVE:
|
|
|
4a2fec |
case MIGRATION_STATUS_CANCELLING:
|
|
|
4a2fec |
case MIGRATION_STATUS_POSTCOPY_ACTIVE:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_PRE_SWITCHOVER:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_DEVICE:
|
|
|
4a2fec |
/* TODO add some postcopy stats */
|
|
|
4a2fec |
info->has_status = true;
|
|
|
4a2fec |
info->has_total_time = true;
|
|
|
4a2fec |
@@ -1102,6 +1106,8 @@ bool migration_is_idle(void)
|
|
|
4a2fec |
case MIGRATION_STATUS_ACTIVE:
|
|
|
4a2fec |
case MIGRATION_STATUS_POSTCOPY_ACTIVE:
|
|
|
4a2fec |
case MIGRATION_STATUS_COLO:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_PRE_SWITCHOVER:
|
|
|
4a2fec |
+ case MIGRATION_STATUS_DEVICE:
|
|
|
4a2fec |
return false;
|
|
|
4a2fec |
case MIGRATION_STATUS__MAX:
|
|
|
4a2fec |
g_assert_not_reached();
|
|
|
4a2fec |
diff --git a/qapi-schema.json b/qapi-schema.json
|
|
|
4a2fec |
index 9b9ec9a..de8c611 100644
|
|
|
4a2fec |
--- a/qapi-schema.json
|
|
|
4a2fec |
+++ b/qapi-schema.json
|
|
|
4a2fec |
@@ -674,12 +674,18 @@
|
|
|
4a2fec |
# @colo: VM is in the process of fault tolerance, VM can not get into this
|
|
|
4a2fec |
# state unless colo capability is enabled for migration. (since 2.8)
|
|
|
4a2fec |
#
|
|
|
4a2fec |
+# @pre-switchover: Paused before device serialisation. (since 2.11)
|
|
|
4a2fec |
+#
|
|
|
4a2fec |
+# @device: During device serialisation when pause-before-switchover is enabled
|
|
|
4a2fec |
+# (since 2.11)
|
|
|
4a2fec |
+#
|
|
|
4a2fec |
# Since: 2.3
|
|
|
4a2fec |
#
|
|
|
4a2fec |
##
|
|
|
4a2fec |
{ 'enum': 'MigrationStatus',
|
|
|
4a2fec |
'data': [ 'none', 'setup', 'cancelling', 'cancelled',
|
|
|
4a2fec |
- 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
|
|
|
4a2fec |
+ 'active', 'postcopy-active', 'completed', 'failed', 'colo',
|
|
|
4a2fec |
+ 'pre-switchover', 'device' ] }
|
|
|
4a2fec |
|
|
|
4a2fec |
##
|
|
|
4a2fec |
# @MigrationInfo:
|
|
|
4a2fec |
--
|
|
|
4a2fec |
1.8.3.1
|
|
|
4a2fec |
|