From 523950868c402507f90023e1d01020622a9311b2 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 5 Jul 2022 13:27:24 -0600 Subject: [PATCH] Force CgroupsV1 on Ubuntu PR #115 removed a force-cgroups-v2 setup for Ubuntu, possibly assuming that Ubuntu uses cgroups v1 by default? That doesn't seem to be the case: the Ubuntu I've looked at (via Cirrus rerun-with-terminal) seems to default to v2. End result is that we've been running CI for months without testing runc. This PR forces cgroups v1 on Ubuntu, via grub boot args. Signed-off-by: Ed Santiago --- cache_images/ubuntu_setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cache_images/ubuntu_setup.sh b/cache_images/ubuntu_setup.sh index 34dedfd8..de13f919 100644 --- a/cache_images/ubuntu_setup.sh +++ b/cache_images/ubuntu_setup.sh @@ -23,7 +23,8 @@ bash $SCRIPT_DIRPATH/ubuntu_packaging.sh if ! ((CONTAINER)); then warn "Making Ubuntu kernel to enable cgroup swap accounting" - SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1"/' + warn "Forcing CgroupsV1" + SEDCMD='s/^GRUB_CMDLINE_LINUX="(.*)"/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0"/' ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub.d/* ooe.sh $SUDO sed -re "$SEDCMD" -i /etc/default/grub ooe.sh $SUDO update-grub