diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-07 23:19:04 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-08 22:36:11 +0200 |
commit | 1cafbecabecc619b4e147abd9925282d0ff323bd (patch) | |
tree | d18a30279416d4fbad774cd0548c3085f5316da3 | |
parent | Merge pull request #34675 from poettering/dupfd-query (diff) | |
download | systemd-1cafbecabecc619b4e147abd9925282d0ff323bd.tar.xz systemd-1cafbecabecc619b4e147abd9925282d0ff323bd.zip |
core: suppress one debugging log
Otherwise, the log is shown even when getting properties.
Even though it is in the debug level, that's quite noisy.
[ 338.785847] TEST-55-OOMD.sh[1624]: Oct 07 16:35:15 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.786985] TEST-55-OOMD.sh[1624]: Oct 07 16:35:17 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.787412] TEST-55-OOMD.sh[1624]: Oct 07 16:35:20 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.791776] TEST-55-OOMD.sh[1624]: Oct 07 16:35:22 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.792938] TEST-55-OOMD.sh[1624]: Oct 07 16:35:24 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.793225] TEST-55-OOMD.sh[1624]: Oct 07 16:35:26 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.793424] TEST-55-OOMD.sh[1624]: Oct 07 16:35:28 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.796448] TEST-55-OOMD.sh[1624]: Oct 07 16:35:31 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.797997] TEST-55-OOMD.sh[1624]: Oct 07 16:35:33 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
[ 338.799206] TEST-55-OOMD.sh[1624]: Oct 07 16:35:35 H systemd[1]: TEST-55-OOMD-testmunch.service: Unit not running in private mount namespace, cannot live mount
-rw-r--r-- | src/core/service.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c index 7162016313..c008849b78 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -5309,7 +5309,11 @@ static int service_can_live_mount(const Unit *u, sd_bus_error *error) { /* Ensure that the unit runs in a private mount namespace */ if (!exec_needs_mount_namespace(unit_get_exec_context(u), /* params= */ NULL, unit_get_exec_runtime(u))) { - log_unit_debug(u, "Unit not running in private mount namespace, cannot live mount"); + + /* This is also called in property_get_can_live_mount(). Suppress the debugging log when called in it. */ + if (error) + log_unit_debug(u, "Unit not running in private mount namespace, cannot live mount"); + return sd_bus_error_setf( error, SD_BUS_ERROR_INVALID_ARGS, |