|
|
735c6b |
From 99f69000a1ecacc2f064043993ece8ddba366976 Mon Sep 17 00:00:00 2001
|
|
|
735c6b |
Message-Id: <99f69000a1ecacc2f064043993ece8ddba366976@dist-git>
|
|
|
735c6b |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
Date: Tue, 7 Feb 2023 10:34:40 +0100
|
|
|
735c6b |
Subject: [PATCH] qemu_process: Produce better debug message wrt domain
|
|
|
735c6b |
namespaces
|
|
|
735c6b |
|
|
|
735c6b |
When going through debug log of a domain startup process, one can
|
|
|
735c6b |
meet the following line:
|
|
|
735c6b |
|
|
|
735c6b |
debug : qemuProcessLaunch:7668 : Building mount namespace
|
|
|
735c6b |
|
|
|
735c6b |
But this is in fact wrong. Firstly, domain namespaces are just
|
|
|
735c6b |
enabled in domain's privateData. Secondly, the debug message says
|
|
|
735c6b |
nothing about actual state of namespace - whether it was enabled
|
|
|
735c6b |
or not.
|
|
|
735c6b |
|
|
|
735c6b |
Therefore, move the debug printing into
|
|
|
735c6b |
qemuProcessEnableDomainNamespaces() and tweak it so that the
|
|
|
735c6b |
actual value is reflected.
|
|
|
735c6b |
|
|
|
735c6b |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
|
|
|
735c6b |
(cherry picked from commit 697c16e39ae9a9e18ce7cad0729bf2293b12a307)
|
|
|
735c6b |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167302
|
|
|
735c6b |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
735c6b |
---
|
|
|
735c6b |
src/qemu/qemu_process.c | 8 ++++++--
|
|
|
735c6b |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
735c6b |
|
|
|
735c6b |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
735c6b |
index 1217fb1856..32083de563 100644
|
|
|
735c6b |
--- a/src/qemu/qemu_process.c
|
|
|
735c6b |
+++ b/src/qemu/qemu_process.c
|
|
|
735c6b |
@@ -7377,11 +7377,17 @@ qemuProcessEnableDomainNamespaces(virQEMUDriver *driver,
|
|
|
735c6b |
virDomainObj *vm)
|
|
|
735c6b |
{
|
|
|
735c6b |
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
|
|
735c6b |
+ const char *state = "disabled";
|
|
|
735c6b |
|
|
|
735c6b |
if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) &&
|
|
|
735c6b |
qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0)
|
|
|
735c6b |
return -1;
|
|
|
735c6b |
|
|
|
735c6b |
+ if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
|
|
|
735c6b |
+ state = "enabled";
|
|
|
735c6b |
+
|
|
|
735c6b |
+ VIR_DEBUG("Mount namespace for domain name=%s is %s",
|
|
|
735c6b |
+ vm->def->name, state);
|
|
|
735c6b |
return 0;
|
|
|
735c6b |
}
|
|
|
735c6b |
|
|
|
735c6b |
@@ -7705,8 +7711,6 @@ qemuProcessLaunch(virConnectPtr conn,
|
|
|
735c6b |
|
|
|
735c6b |
qemuDomainLogContextMarkPosition(logCtxt);
|
|
|
735c6b |
|
|
|
735c6b |
- VIR_DEBUG("Building mount namespace");
|
|
|
735c6b |
-
|
|
|
735c6b |
if (qemuProcessEnableDomainNamespaces(driver, vm) < 0)
|
|
|
735c6b |
goto cleanup;
|
|
|
735c6b |
|
|
|
735c6b |
--
|
|
|
735c6b |
2.39.1
|
|
|
735c6b |
|