summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2017-12-18 07:53:29 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-18 08:53:29 +0100
commite16647c39d195804711a006667d5bce49c0ef73d (patch)
tree3d773c3231ffd4cf2405af1080dfb57307eed426 /man
parent292599e2ad2314fbf3a18d5f8371c6663fd58421 (diff)
downloadsystemd-e16647c39d195804711a006667d5bce49c0ef73d.tar.gz
systemd-e16647c39d195804711a006667d5bce49c0ef73d.tar.bz2
systemd-e16647c39d195804711a006667d5bce49c0ef73d.zip
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.
Diffstat (limited to 'man')
-rw-r--r--man/systemd.unit.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 445c26f3e5..005fdea73c 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -939,6 +939,7 @@
<term><varname>ConditionFileIsExecutable=</varname></term>
<term><varname>ConditionUser=</varname></term>
<term><varname>ConditionGroup=</varname></term>
+ <term><varname>ConditionControlGroupController=</varname></term>
<!-- We do not document ConditionNull=
here, as it is not particularly
@@ -1166,6 +1167,18 @@
auxiliary groups match the specified group or GID. This setting
does not have a special value <literal>@system</literal>.</para>
+ <para><varname>ConditionControlGroupController=</varname> takes a
+ cgroup controller name (eg. <option>cpu</option>), verifying that it is
+ available for use on the system. For example, a particular controller
+ may not be available if it was disabled on the kernel command line with
+ <literal>cgroup_disable=</literal><replaceable>controller</replaceable>.
+ Multiple controllers may be passed with a space separating them; in
+ this case the condition will only pass if all listed controllers are
+ available for use. Controllers unknown to systemd are ignored. Valid
+ controllers are <option>cpu</option>, <option>cpuacct</option>,
+ <option>io</option>, <option>blkio</option>, <option>memory</option>,
+ <option>devices</option>, and <option>pids</option>.</para>
+
<para>If multiple conditions are specified, the unit will be
executed if all of them apply (i.e. a logical AND is applied).
Condition checks can be prefixed with a pipe symbol (|) in
@@ -1204,6 +1217,7 @@
<term><varname>AssertFileIsExecutable=</varname></term>
<term><varname>AssertUser=</varname></term>
<term><varname>AssertGroup=</varname></term>
+ <term><varname>AssertControlGroupController=</varname></term>
<listitem><para>Similar to the <varname>ConditionArchitecture=</varname>,
<varname>ConditionVirtualization=</varname>, …, condition settings described above, these settings add