render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c401cc
From 8c0140804b2ec68878f1028dfd193e8f4484d49b Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <8c0140804b2ec68878f1028dfd193e8f4484d49b.1390394206.git.jdenemar@redhat.com>
c401cc
From: Michael Avdienko <whitearchey@gmail.com>
c401cc
Date: Mon, 20 Jan 2014 15:21:24 +0100
c401cc
Subject: [PATCH] Fix migration with QEMU 1.6
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1053405
c401cc
c401cc
QEMU 1.6.0 introduced new migration status: setup
c401cc
Libvirt does not expect such string in QMP and refuses to migrate with error
c401cc
"unexpected migration status in setup"
c401cc
c401cc
This patch fixes it.
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
(cherry picked from commit d35ae4143d11f45856ae002fcd419da0eb9bba9f)
c401cc
---
c401cc
 src/qemu/qemu_migration.c | 4 ++++
c401cc
 src/qemu/qemu_monitor.c   | 2 +-
c401cc
 src/qemu/qemu_monitor.h   | 1 +
c401cc
 3 files changed, 6 insertions(+), 1 deletion(-)
c401cc
c401cc
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
c401cc
index a598d5e..8fd3c9e 100644
c401cc
--- a/src/qemu/qemu_migration.c
c401cc
+++ b/src/qemu/qemu_migration.c
c401cc
@@ -1647,6 +1647,10 @@ qemuMigrationUpdateJobStatus(virQEMUDriverPtr driver,
c401cc
                        _("%s: %s"), job, _("is not active"));
c401cc
         break;
c401cc
 
c401cc
+    case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
c401cc
+        ret = 0;
c401cc
+        break;
c401cc
+
c401cc
     case QEMU_MONITOR_MIGRATION_STATUS_ACTIVE:
c401cc
         priv->job.info.fileTotal = priv->job.status.disk_total;
c401cc
         priv->job.info.fileRemaining = priv->job.status.disk_remaining;
c401cc
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
c401cc
index 46b6d1a..6df494a 100644
c401cc
--- a/src/qemu/qemu_monitor.c
c401cc
+++ b/src/qemu/qemu_monitor.c
c401cc
@@ -113,7 +113,7 @@ VIR_ONCE_GLOBAL_INIT(qemuMonitor)
c401cc
 
c401cc
 VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
c401cc
               QEMU_MONITOR_MIGRATION_STATUS_LAST,
c401cc
-              "inactive", "active", "completed", "failed", "cancelled")
c401cc
+              "inactive", "active", "completed", "failed", "cancelled", "setup")
c401cc
 
c401cc
 VIR_ENUM_IMPL(qemuMonitorMigrationCaps,
c401cc
               QEMU_MONITOR_MIGRATION_CAPS_LAST,
c401cc
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
c401cc
index c694e1c..dec1bcc 100644
c401cc
--- a/src/qemu/qemu_monitor.h
c401cc
+++ b/src/qemu/qemu_monitor.h
c401cc
@@ -353,6 +353,7 @@ enum {
c401cc
     QEMU_MONITOR_MIGRATION_STATUS_COMPLETED,
c401cc
     QEMU_MONITOR_MIGRATION_STATUS_ERROR,
c401cc
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLED,
c401cc
+    QEMU_MONITOR_MIGRATION_STATUS_SETUP,
c401cc
 
c401cc
     QEMU_MONITOR_MIGRATION_STATUS_LAST
c401cc
 };
c401cc
-- 
c401cc
1.8.5.3
c401cc