From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhPXy-00081y-Hv for qemu-devel@nongnu.org; Mon, 05 May 2014 16:31:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhPXt-00013Z-HO for qemu-devel@nongnu.org; Mon, 05 May 2014 16:31:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhPXt-00013K-2V for qemu-devel@nongnu.org; Mon, 05 May 2014 16:31:29 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s45KVRv9022372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 5 May 2014 16:31:28 -0400 From: Juan Quintela Date: Mon, 5 May 2014 22:30:24 +0200 Message-Id: <1399321834-31310-27-git-send-email-quintela@redhat.com> In-Reply-To: <1399321834-31310-1-git-send-email-quintela@redhat.com> References: <1399321834-31310-1-git-send-email-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 26/36] Disallow outward migration while awaiting incoming migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" From: "Dr. David Alan Gilbert" QEMU will assert if you attempt to start an outgoing migration on a QEMU that's sitting waiting for an incoming migration (started with -incoming), so disallow it with a proper error. (This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=3D1086987 = ) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Andreas F=C3=A4rber Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- migration.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/migration.c b/migration.c index bd1fb91..ac23275 100644 --- a/migration.c +++ b/migration.c @@ -419,6 +419,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool= blk, return; } + if (runstate_check(RUN_STATE_INMIGRATE)) { + error_setg(errp, "Guest is waiting for an incoming migration"); + return; + } + if (qemu_savevm_state_blocked(errp)) { return; } --=20 1.9.0