about summary refs log tree commit diff
path: root/rc.conf
diff options
context:
space:
mode:
authorap4y <mail@ap4y.me>2020-09-30 21:54:59 +1300
committerAndrew J. Hesford <48421688+ahesford@users.noreply.github.com>2021-03-13 19:27:18 -0500
commit42ca737148ea530dad5945af1a4eb7e471e8b637 (patch)
tree32125d283a4d85ba8661943959ee3a2a12b8eb12 /rc.conf
parent288f526f23eb6270f6c902883e9a3092dc4972fa (diff)
downloadrunit-void-42ca737148ea530dad5945af1a4eb7e471e8b637.tar.gz
runit-void-42ca737148ea530dad5945af1a4eb7e471e8b637.tar.xz
runit-void-42ca737148ea530dad5945af1a4eb7e471e8b637.zip
Support pure v2 cgroup mounts 20210314
Some of the tooling that rely on cgroups (notably podman, runc and
crun) enable cgroup2 mode only if /sys/fs/cgroup has a v2 magic
number. This commit introduces configuration option that controls the
way cgroup is mounted, 3 modes are supported:
- hybrid: current mode with v1 and v2 mounted
- unified: v2 only mode
- legacy: v1 only mode

This is modeled after OpenRC:
https://github.com/OpenRC/openrc/blob/72df51e17ba0e1a0f94451b4bbfb338288c4625c/init.d/cgroups.in#L121-L129
Diffstat (limited to 'rc.conf')
-rw-r--r--rc.conf7
1 files changed, 7 insertions, 0 deletions
diff --git a/rc.conf b/rc.conf
index db59f84..2c4cf64 100644
--- a/rc.conf
+++ b/rc.conf
@@ -33,3 +33,10 @@
 
 # Amount of ttys which should be setup.
 #TTYS=
+
+# Set the mode for cgroup mounts.
+# hybrid: mount cgroup v1 under /sys/fs/cgroup and
+#         cgroup v2 under /sys/fs/cgroup/unified
+# legacy: mount cgroup v1 /sys/fs/cgroup
+# unified: mount cgroup v2 under /sys/fs/cgroup
+#CGROUP_MODE=hybrid