|
|
735c6b |
From 102efebe3cd2bfebace026744a7835309cf124fa Mon Sep 17 00:00:00 2001
|
|
|
735c6b |
Message-Id: <102efebe3cd2bfebace026744a7835309cf124fa@dist-git>
|
|
|
735c6b |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
Date: Fri, 27 Jan 2023 10:45:50 +0100
|
|
|
735c6b |
Subject: [PATCH] qemuProcessStop: Fix detection of outgoing migration for
|
|
|
735c6b |
external devices
|
|
|
735c6b |
MIME-Version: 1.0
|
|
|
735c6b |
Content-Type: text/plain; charset=UTF-8
|
|
|
735c6b |
Content-Transfer-Encoding: 8bit
|
|
|
735c6b |
|
|
|
735c6b |
When cleaning up host in qemuProcessStop(), our external helper
|
|
|
735c6b |
processes (e.g. swtpm) want to know whether the domain is being
|
|
|
735c6b |
migrated out or not (so that they restore seclabels on a device
|
|
|
735c6b |
state that's on a shared storage).
|
|
|
735c6b |
|
|
|
735c6b |
This fact is reflected in the @outgoingMigration variable which
|
|
|
735c6b |
is set to true if asyncJob is anything but
|
|
|
735c6b |
VIR_ASYNC_JOB_MIGRATION_IN. Well, we have a specific job for
|
|
|
735c6b |
outgoing migration (VIR_ASYNC_JOB_MIGRATION_OUT) and thus we
|
|
|
735c6b |
should check for that.
|
|
|
735c6b |
|
|
|
735c6b |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
735c6b |
(cherry picked from commit 88f0fbf63851c6ae80ad03b2a05a966d8a2f296c)
|
|
|
735c6b |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2161557
|
|
|
735c6b |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
---
|
|
|
735c6b |
src/qemu/qemu_process.c | 2 +-
|
|
|
735c6b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
735c6b |
|
|
|
735c6b |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
735c6b |
index 29716ecb19..2de87211fb 100644
|
|
|
735c6b |
--- a/src/qemu/qemu_process.c
|
|
|
735c6b |
+++ b/src/qemu/qemu_process.c
|
|
|
735c6b |
@@ -8397,7 +8397,7 @@ void qemuProcessStop(virQEMUDriver *driver,
|
|
|
735c6b |
qemuDomainCleanupRun(driver, vm);
|
|
|
735c6b |
|
|
|
735c6b |
outgoingMigration = (flags & VIR_QEMU_PROCESS_STOP_MIGRATED) &&
|
|
|
735c6b |
- (asyncJob != VIR_ASYNC_JOB_MIGRATION_IN);
|
|
|
735c6b |
+ (asyncJob == VIR_ASYNC_JOB_MIGRATION_OUT);
|
|
|
735c6b |
qemuExtDevicesStop(driver, vm, outgoingMigration);
|
|
|
735c6b |
|
|
|
735c6b |
qemuDBusStop(driver, vm);
|
|
|
735c6b |
--
|
|
|
735c6b |
2.39.1
|
|
|
735c6b |
|