From b43c09dba32d17d1e4056f3ad3d712cabf9c9a86 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 13 Jul 2015 13:42:04 +0200 Subject: [PATCH 24/58] Fail more cleanly in mismatched RAM cases Message-id: <1436794926-1598-16-git-send-email-dgilbert@redhat.com> Patchwork-id: 66986 O-Subject: [RHEL-7.2 qemu-kvm-rhev PATCH 15/17] Fail more cleanly in mismatched RAM cases Bugzilla: 1210715 RH-Acked-by: Marcel Apfelbaum RH-Acked-by: Laszlo Ersek RH-Acked-by: Juan Quintela From: "Dr. David Alan Gilbert" If the number of RAMBlocks was different on the source from the destination, QEMU would hang waiting for a disconnect on the source and wouldn't release from that hang until the destination was manually killed. Mark the stream as being in error, this causes the destination to die and the source to carry on. (It still gets a whole bunch of warnings on the destination, and I've not managed to complete another migration after the 1st one, still progress). Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela (cherry picked from commit ef4b722d19cab845eaa0d1f912018b09a9d8288b) Signed-off-by: Miroslav Rezanina --- migration/rdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index f3e0a82..9838a6d 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3327,6 +3327,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, "Your QEMU command line parameters are probably " "not identical on both the source and destination.", local->nb_blocks, nb_dest_blocks); + rdma->error_state = -EINVAL; return -EINVAL; } @@ -3342,6 +3343,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, "vs %" PRIu64, local->block[i].block_name, i, local->block[i].length, rdma->dest_blocks[i].length); + rdma->error_state = -EINVAL; return -EINVAL; } local->block[i].remote_host_addr = -- 1.8.3.1