From 196e2f041b1d8cd44b29a58741ff719fa46c5195 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 12 May 2023 17:40:38 -0400 Subject: [PATCH] Update the cgroups v2 toleration in local-up-cluster Signed-off-by: Davanum Srinivas --- hack/local-up-cluster.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 8b65fbb25c8..c0c943846ba 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -1086,13 +1086,14 @@ function update_packages { } function tolerate_cgroups_v2 { - # https://github.com/moby/moby/blob/ed89041433a031cafc0a0f19cfe573c31688d377/hack/dind#L28-L37 + # https://github.com/moby/moby/blob/be220af9fb36e9baa9a75bbc41f784260aa6f96e/hack/dind#L28-L38 # cgroup v2: enable nesting if [ -f /sys/fs/cgroup/cgroup.controllers ]; then - # move the init process (PID 1) from the root group to the /init group, + # move the processes from the root group to the /init group, # otherwise writing subtree_control fails with EBUSY. + # An error during moving non-existent process (i.e., "cat") is ignored. mkdir -p /sys/fs/cgroup/init - echo 1 > /sys/fs/cgroup/init/cgroup.procs + xargs -rn1 < /sys/fs/cgroup/cgroup.procs > /sys/fs/cgroup/init/cgroup.procs || : # enable controllers sed -e 's/ / +/g' -e 's/^/+/' < /sys/fs/cgroup/cgroup.controllers \ > /sys/fs/cgroup/cgroup.subtree_control