]> git.ipfire.org Git - thirdparty/systemd.git/commit
condition: Create AssertControlGroupController (#7630)
authorChris Down <chris@chrisdown.name>
Mon, 18 Dec 2017 07:53:29 +0000 (07:53 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 Dec 2017 07:53:29 +0000 (08:53 +0100)
commite16647c39d195804711a006667d5bce49c0ef73d
tree3d773c3231ffd4cf2405af1080dfb57307eed426
parent292599e2ad2314fbf3a18d5f8371c6663fd58421
condition: Create AssertControlGroupController (#7630)

Up until now, the behaviour in systemd has (mostly) been to silently
ignore failures to action unit directives that refer to an unavailble
controller. The addition of AssertControlGroupController and its
conditional counterpart allow explicit specification of the desired
behaviour when such a situation occurs.

As for how this can happen, it is possible that a particular controller
is not available in the cgroup hierarchy. One possible reason for this
is that, in the running kernel, the controller simply doesn't exist --
for example, the CPU controller in cgroup v2 has only recently been
merged and was out of tree until then. Another possibility is that the
controller exists, but has been forcibly disabled by `cgroup_disable=`
on the kernel command line.

In future this will also support whatever comes out of issue #7624,
`DefaultXAccounting=never`, or similar.
man/systemd.unit.xml
src/core/load-fragment-gperf.gperf.m4
src/shared/condition.c
src/shared/condition.h
src/test/test-condition.c