render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
fbe740
From 614ff7c7faf6ad46bb3b44ff5b57e839b00af4a4 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <614ff7c7faf6ad46bb3b44ff5b57e839b00af4a4@dist-git>
fbe740
From: Laine Stump <laine@redhat.com>
fbe740
Date: Thu, 30 Jan 2020 14:12:43 -0500
fbe740
Subject: [PATCH] qemu: add wait-unplug to qemu migration status enum
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Aside from itinerant error (actually warning) messages due to an
fbe740
unrecognized response from qemu, this isn't even necessary - the
fbe740
migration proceeds successfully to completion anyway.
fbe740
fbe740
(I'm not sure where to see this status reported in the API though - do
fbe740
we need to add an extra state, or recognition of a new event somewhere?)
fbe740
fbe740
Signed-off-by: Laine Stump <laine@redhat.com>
fbe740
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
fbe740
(cherry picked from commit 8a226ddb3602586a2ba2359afc4448c02f566a0e)
fbe740
fbe740
https://bugzilla.redhat.com/1693587
fbe740
Signed-off-by: Laine Stump <laine@redhat.com>
fbe740
Message-Id: <20200130191244.24174-6-laine@redhat.com>
fbe740
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
fbe740
---
fbe740
 src/qemu/qemu_migration.c    | 1 +
fbe740
 src/qemu/qemu_monitor.c      | 1 +
fbe740
 src/qemu/qemu_monitor.h      | 1 +
fbe740
 src/qemu/qemu_monitor_json.c | 1 +
fbe740
 4 files changed, 4 insertions(+)
fbe740
fbe740
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
fbe740
index 46612a3c84..b56ccbdc3c 100644
fbe740
--- a/src/qemu/qemu_migration.c
fbe740
+++ b/src/qemu/qemu_migration.c
fbe740
@@ -1457,6 +1457,7 @@ qemuMigrationUpdateJobType(qemuDomainJobInfoPtr jobInfo)
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_ACTIVE:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_CANCELLING:
fbe740
+    case QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_LAST:
fbe740
         break;
fbe740
     }
fbe740
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
fbe740
index ccd20b3740..4f547bf5ec 100644
fbe740
--- a/src/qemu/qemu_monitor.c
fbe740
+++ b/src/qemu/qemu_monitor.c
fbe740
@@ -168,6 +168,7 @@ VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
fbe740
               "device", "postcopy-active",
fbe740
               "completed", "failed",
fbe740
               "cancelling", "cancelled",
fbe740
+              "wait-unplug",
fbe740
 );
fbe740
 
fbe740
 VIR_ENUM_IMPL(qemuMonitorVMStatus,
fbe740
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
fbe740
index 3f3b81cddd..cca2cdcb27 100644
fbe740
--- a/src/qemu/qemu_monitor.h
fbe740
+++ b/src/qemu/qemu_monitor.h
fbe740
@@ -767,6 +767,7 @@ typedef enum {
fbe740
     QEMU_MONITOR_MIGRATION_STATUS_ERROR,
fbe740
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLING,
fbe740
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLED,
fbe740
+    QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG,
fbe740
 
fbe740
     QEMU_MONITOR_MIGRATION_STATUS_LAST
fbe740
 } qemuMonitorMigrationStatus;
fbe740
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
fbe740
index e5164d218a..5d8c7e9b5e 100644
fbe740
--- a/src/qemu/qemu_monitor_json.c
fbe740
+++ b/src/qemu/qemu_monitor_json.c
fbe740
@@ -3515,6 +3515,7 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_INACTIVE:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_CANCELLED:
fbe740
+    case QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG:
fbe740
     case QEMU_MONITOR_MIGRATION_STATUS_LAST:
fbe740
         break;
fbe740
 
fbe740
-- 
fbe740
2.25.0
fbe740