diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2022-02-01 16:31:52 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-01 23:07:47 +0100 |
commit | 86838bf08be18cf8cd5a7332820623c1853532c0 (patch) | |
tree | 447309643079df7d7d3e2d0e8159c7e2a30e202e /src/core/service.c | |
parent | Merge pull request #22332 from yuwata/network-dhcp-server-dns-server-address (diff) | |
download | systemd-86838bf08be18cf8cd5a7332820623c1853532c0.tar.xz systemd-86838bf08be18cf8cd5a7332820623c1853532c0.zip |
core: warn on ExitType=cgroup with legacy cgroup setup
'cgroup empty' notifications are not reliable on v1, so log a warning.
See: https://github.com/systemd/systemd/issues/22320
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c index 905558af57..c767a38b29 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -624,6 +624,9 @@ static int service_verify(Service *s) { if (s->runtime_max_usec == USEC_INFINITY && s->runtime_rand_extra_usec != 0) log_unit_warning(UNIT(s), "Service has RuntimeRandomizedExtraSec= setting, but no RuntimeMaxSec=. Ignoring."); + if (s->exit_type == SERVICE_EXIT_CGROUP && cg_unified() < CGROUP_UNIFIED_SYSTEMD) + log_unit_warning(UNIT(s), "Service has ExitType=cgroup set, but we are running with legacy cgroups v1, which might not work correctly. Continuing."); + return 0; } |