Lorenz Brun | c2e3b1b | 2021-11-11 11:06:41 +0100 | [diff] [blame] | 1 | From fcd48e672489f41c9977e092937ff806a7e772bd Mon Sep 17 00:00:00 2001 |
| 2 | From: Lorenz Brun <lorenz@monogon.tech> |
| 3 | Date: Thu, 11 Nov 2021 13:58:50 +0100 |
| 4 | Subject: [PATCH] Make systemd cgroup optional |
| 5 | |
| 6 | This breaks gVisor on systems that use custom inits/cgroup setups which |
| 7 | don't have this cgroup and don't need it. |
| 8 | --- |
| 9 | runsc/cgroup/cgroup.go | 2 +- |
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 11 | |
| 12 | diff --git a/runsc/cgroup/cgroup.go b/runsc/cgroup/cgroup.go |
| 13 | index 0eb5821a9..2116bddca 100644 |
| 14 | --- a/runsc/cgroup/cgroup.go |
| 15 | +++ b/runsc/cgroup/cgroup.go |
| 16 | @@ -58,7 +58,7 @@ var controllers = map[string]controller{ |
| 17 | "freezer": &noop{}, |
| 18 | "perf_event": &noop{}, |
| 19 | "rdma": &noop{isOptional: true}, |
| 20 | - "systemd": &noop{}, |
| 21 | + "systemd": &noop{isOptional: true}, |
| 22 | } |
| 23 | |
| 24 | // IsOnlyV2 checks whether cgroups V2 is enabled and V1 is not. |
| 25 | -- |
| 26 | 2.25.1 |
| 27 | |