mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
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
This commit is contained in:
parent
6a8ab6dd1e
commit
86838bf08b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user