forked from rpms/libvirt
18102c088b
- qemuProcessStop: Fix detection of outgoing migration for external devices (rhbz#2161557) - qemuExtTPMStop: Restore TPM state label more often (rhbz#2161557) - qemuProcessLaunch: Tighten rules for external devices wrt incoming migration (rhbz#2161557) - qemu_process: Produce better debug message wrt domain namespaces (rhbz#2167302) - qemu_namespace: Deal with nested mounts when umount()-ing /dev (rhbz#2167302) - qemuProcessRefreshDisks: Don't skip filling of disk information if tray state didn't change (rhbz#2166411) Resolves: rhbz#2161557, rhbz#2166411, rhbz#2167302
47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
From 102efebe3cd2bfebace026744a7835309cf124fa Mon Sep 17 00:00:00 2001
|
|
Message-Id: <102efebe3cd2bfebace026744a7835309cf124fa@dist-git>
|
|
From: Michal Privoznik <mprivozn@redhat.com>
|
|
Date: Fri, 27 Jan 2023 10:45:50 +0100
|
|
Subject: [PATCH] qemuProcessStop: Fix detection of outgoing migration for
|
|
external devices
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
When cleaning up host in qemuProcessStop(), our external helper
|
|
processes (e.g. swtpm) want to know whether the domain is being
|
|
migrated out or not (so that they restore seclabels on a device
|
|
state that's on a shared storage).
|
|
|
|
This fact is reflected in the @outgoingMigration variable which
|
|
is set to true if asyncJob is anything but
|
|
VIR_ASYNC_JOB_MIGRATION_IN. Well, we have a specific job for
|
|
outgoing migration (VIR_ASYNC_JOB_MIGRATION_OUT) and thus we
|
|
should check for that.
|
|
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
(cherry picked from commit 88f0fbf63851c6ae80ad03b2a05a966d8a2f296c)
|
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2161557
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
---
|
|
src/qemu/qemu_process.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
index 29716ecb19..2de87211fb 100644
|
|
--- a/src/qemu/qemu_process.c
|
|
+++ b/src/qemu/qemu_process.c
|
|
@@ -8397,7 +8397,7 @@ void qemuProcessStop(virQEMUDriver *driver,
|
|
qemuDomainCleanupRun(driver, vm);
|
|
|
|
outgoingMigration = (flags & VIR_QEMU_PROCESS_STOP_MIGRATED) &&
|
|
- (asyncJob != VIR_ASYNC_JOB_MIGRATION_IN);
|
|
+ (asyncJob == VIR_ASYNC_JOB_MIGRATION_OUT);
|
|
qemuExtDevicesStop(driver, vm, outgoingMigration);
|
|
|
|
qemuDBusStop(driver, vm);
|
|
--
|
|
2.39.1
|
|
|