[libvirt PATCH v2 5/6] qemu: add wait-unplug to qemu migration status enum

Laine Stump posted 6 patches 6 years ago
[libvirt PATCH v2 5/6] qemu: add wait-unplug to qemu migration status enum
Posted by Laine Stump 6 years ago
Aside from itinerant error (actually warning) messages due to an
unrecognized response from qemu, this isn't even necessary - the
migration proceeds successfully to completion anyway.

(I'm not sure where to see this status reported in the API though - do
we need to add an extra state, or recognition of a new event somewhere?)

Signed-off-by: Laine Stump <laine@redhat.com>
---
 src/qemu/qemu_migration.c    | 1 +
 src/qemu/qemu_monitor.c      | 1 +
 src/qemu/qemu_monitor.h      | 1 +
 src/qemu/qemu_monitor_json.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 46612a3c84..b56ccbdc3c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1457,6 +1457,7 @@ qemuMigrationUpdateJobType(qemuDomainJobInfoPtr jobInfo)
     case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
     case QEMU_MONITOR_MIGRATION_STATUS_ACTIVE:
     case QEMU_MONITOR_MIGRATION_STATUS_CANCELLING:
+    case QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG:
     case QEMU_MONITOR_MIGRATION_STATUS_LAST:
         break;
     }
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index ccd20b3740..4f547bf5ec 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -168,6 +168,7 @@ VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
               "device", "postcopy-active",
               "completed", "failed",
               "cancelling", "cancelled",
+              "wait-unplug",
 );
 
 VIR_ENUM_IMPL(qemuMonitorVMStatus,
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 3f3b81cddd..cca2cdcb27 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -767,6 +767,7 @@ typedef enum {
     QEMU_MONITOR_MIGRATION_STATUS_ERROR,
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLING,
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLED,
+    QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG,
 
     QEMU_MONITOR_MIGRATION_STATUS_LAST
 } qemuMonitorMigrationStatus;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e5164d218a..5d8c7e9b5e 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -3515,6 +3515,7 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
     case QEMU_MONITOR_MIGRATION_STATUS_INACTIVE:
     case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
     case QEMU_MONITOR_MIGRATION_STATUS_CANCELLED:
+    case QEMU_MONITOR_MIGRATION_STATUS_WAIT_UNPLUG:
     case QEMU_MONITOR_MIGRATION_STATUS_LAST:
         break;
 
-- 
2.24.1

Re: [libvirt PATCH v2 5/6] qemu: add wait-unplug to qemu migration status enum
Posted by Daniel P. Berrangé 6 years ago
On Fri, Jan 24, 2020 at 10:39:20AM -0500, Laine Stump wrote:
> Aside from itinerant error (actually warning) messages due to an
> unrecognized response from qemu, this isn't even necessary - the
> migration proceeds successfully to completion anyway.
> 
> (I'm not sure where to see this status reported in the API though - do
> we need to add an extra state, or recognition of a new event somewhere?)
> 
> Signed-off-by: Laine Stump <laine@redhat.com>
> ---
>  src/qemu/qemu_migration.c    | 1 +
>  src/qemu/qemu_monitor.c      | 1 +
>  src/qemu/qemu_monitor.h      | 1 +
>  src/qemu/qemu_monitor_json.c | 1 +
>  4 files changed, 4 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|