From 4cfb89c7f686d3af33490aafe94f2beec46ee7eb Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 10 Mar 2025 19:42:05 +0100 Subject: [PATCH] semaphore-runner: disable cgroup setup in lxc lxc tries to mount /sys/fs/cgroup/ following host hierarchy by default, which is problematic for us since we want to unconditionally use cgroup v2 in cgns. Disable it hence and let pid1 figure it out. --- .semaphore/semaphore-runner.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.semaphore/semaphore-runner.sh b/.semaphore/semaphore-runner.sh index 6b4aedbd09f..8c99b68156a 100755 --- a/.semaphore/semaphore-runner.sh +++ b/.semaphore/semaphore-runner.sh @@ -23,9 +23,19 @@ create_container() { sudo lxc-create -n "$CONTAINER" -t download -- -d "$DISTRO" -r "$RELEASE" -a "$ARCH" # unconfine the container, otherwise some tests fail - echo 'lxc.apparmor.profile = unconfined' | sudo tee -a "/var/lib/lxc/$CONTAINER/config" + # + # disable automatic cgroup setup, instead let pid1 figure it out in mount_setup(). + # This is especially important to ensure we get unified cgroup hierarchy + # + # FIXME: remove cgroup workarounds once the host runs on unified hierarchy + sudo tee "/var/lib/lxc/$CONTAINER/config.systemd_upstream" <