|
|
4a2fec |
From 2b263ba2282ac34afa1f9fd1892db868d8b91dba Mon Sep 17 00:00:00 2001
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
Date: Wed, 7 Feb 2018 12:24:49 +0100
|
|
|
4a2fec |
Subject: [PATCH 01/15] migration: Recover block devices if failure in device
|
|
|
4a2fec |
state
|
|
|
4a2fec |
|
|
|
4a2fec |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Message-id: <20180207122449.11675-2-dgilbert@redhat.com>
|
|
|
4a2fec |
Patchwork-id: 78915
|
|
|
4a2fec |
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 1/1] migration: Recover block devices if failure in device state
|
|
|
4a2fec |
Bugzilla: 1538494
|
|
|
4a2fec |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
In e91d895 I added the new pause-before-switchover mechanism
|
|
|
4a2fec |
to allow migration completion to be delayed; this changes the
|
|
|
4a2fec |
last state prior to completion to MIGRATE_STATUS_DEVICE rather
|
|
|
4a2fec |
than MIGRATE_STATUS_ACTIVE.
|
|
|
4a2fec |
|
|
|
4a2fec |
Fix the failure path in migration_completion to recover the block
|
|
|
4a2fec |
devices if it fails in MIGRATE_STATUS_DEVICE, not just the
|
|
|
4a2fec |
MIGRATE_STATUS_ACTIVE that it previously had.
|
|
|
4a2fec |
|
|
|
4a2fec |
This corresponds to rh bz:
|
|
|
4a2fec |
https://bugzilla.redhat.com/show_bug.cgi?id=1538494
|
|
|
4a2fec |
whose symptom is an occasional source crash on a failed migration.
|
|
|
4a2fec |
|
|
|
4a2fec |
Fixes: e91d8951d59d483f085f
|
|
|
4a2fec |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Reviewed-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
(cherry picked from commit 6039dd5b1c45d76403b9dcadd2afd7efd8f42330)
|
|
|
4a2fec |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
---
|
|
|
4a2fec |
migration/migration.c | 3 ++-
|
|
|
4a2fec |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
4a2fec |
|
|
|
4a2fec |
diff --git a/migration/migration.c b/migration/migration.c
|
|
|
4a2fec |
index cd33718..38d4d9f 100644
|
|
|
4a2fec |
--- a/migration/migration.c
|
|
|
4a2fec |
+++ b/migration/migration.c
|
|
|
4a2fec |
@@ -1990,7 +1990,8 @@ fail_invalidate:
|
|
|
4a2fec |
/* If not doing postcopy, vm_start() will be called: let's regain
|
|
|
4a2fec |
* control on images.
|
|
|
4a2fec |
*/
|
|
|
4a2fec |
- if (s->state == MIGRATION_STATUS_ACTIVE) {
|
|
|
4a2fec |
+ if (s->state == MIGRATION_STATUS_ACTIVE ||
|
|
|
4a2fec |
+ s->state == MIGRATION_STATUS_DEVICE) {
|
|
|
4a2fec |
Error *local_err = NULL;
|
|
|
4a2fec |
|
|
|
4a2fec |
qemu_mutex_lock_iothread();
|
|
|
4a2fec |
--
|
|
|
4a2fec |
1.8.3.1
|
|
|
4a2fec |
|