thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
9ae3a8
From 6bdff9954d46304a278bff833ecb15450c19c4f5 Mon Sep 17 00:00:00 2001
9ae3a8
From: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
9ae3a8
Date: Thu, 8 May 2014 11:52:12 +0200
9ae3a8
Subject: [PATCH 05/13] Disallow outward migration while awaiting incoming migration
9ae3a8
MIME-Version: 1.0
9ae3a8
Content-Type: text/plain; charset=UTF-8
9ae3a8
Content-Transfer-Encoding: 8bit
9ae3a8
9ae3a8
RH-Author: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
9ae3a8
Message-id: <1399549932-9977-1-git-send-email-dgilbert@redhat.com>
9ae3a8
Patchwork-id: 58747
9ae3a8
O-Subject: [RHEL7.1 qemu-kvm PATCH 1/1] Disallow outward migration while awaiting incoming migration
9ae3a8
Bugzilla: 1086987
9ae3a8
RH-Acked-by: Amos Kong <akong@redhat.com>
9ae3a8
RH-Acked-by: Juan Quintela <quintela@redhat.com>
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
9ae3a8
9ae3a8
bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1086987
9ae3a8
brew: https://brewweb.devel.redhat.com/taskinfo?taskID=7432751
9ae3a8
upstream: ca99993adc9205c905dba5dc1bb819959ada7200
9ae3a8
9ae3a8
QEMU will assert if you attempt to start an outgoing migration on
9ae3a8
a QEMU that's sitting waiting for an incoming migration (started
9ae3a8
with -incoming), so disallow it with a proper error.
9ae3a8
9ae3a8
(This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1086987 )
9ae3a8
9ae3a8
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
9ae3a8
Reviewed-by: Andreas Färber <afaerber@suse.de>
9ae3a8
Reviewed-by: Eric Blake <eblake@redhat.com>
9ae3a8
Signed-off-by: Juan Quintela <quintela@redhat.com>
9ae3a8
(cherry picked from commit ca99993adc9205c905dba5dc1bb819959ada7200)
9ae3a8
---
9ae3a8
 migration.c | 5 +++++
9ae3a8
 1 file changed, 5 insertions(+)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 migration.c |    5 +++++
9ae3a8
 1 files changed, 5 insertions(+), 0 deletions(-)
9ae3a8
9ae3a8
diff --git a/migration.c b/migration.c
9ae3a8
index 7efbd25..44b993a 100644
9ae3a8
--- a/migration.c
9ae3a8
+++ b/migration.c
9ae3a8
@@ -430,6 +430,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
9ae3a8
         return;
9ae3a8
     }
9ae3a8
 
9ae3a8
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
9ae3a8
+        error_setg(errp, "Guest is waiting for an incoming migration");
9ae3a8
+        return;
9ae3a8
+    }
9ae3a8
+
9ae3a8
     if (qemu_savevm_state_blocked(errp)) {
9ae3a8
         return;
9ae3a8
     }
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8