From d31c0cb82d400c2057ace67cbd9d4c0638216ad0 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Fri, 27 Nov 2026 02:17:24 -0500 Subject: [PATCH] fix(ci-runners): no per-job memory limit on the Kata deploy runner Kata's guest cgroup root is 'domain threaded' and only cpuset/cpu/pids are delegated, so dockerd cannot apply --memory to a job container: every job died at 'docker run' with unable to apply cgroup configuration: cannot enter cgroupv2 "/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode (run 1442, first attempt on the Kata runner). Drop --memory/--memory-swap from deploy-arm64.toml only; the 2Gi dind limit sizes the microVM, so the blast radius is unchanged. The runc runners keep their per-job limits. --- apps/base/forgejo/runner-configmap.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/base/forgejo/runner-configmap.yaml b/apps/base/forgejo/runner-configmap.yaml index 5f6a944..c223201 100644 --- a/apps/base/forgejo/runner-configmap.yaml +++ b/apps/base/forgejo/runner-configmap.yaml @@ -82,13 +82,20 @@ data: privileged: false # Same injection as arm64.toml: the job container is node:20-bullseye, # which has no docker CLI and no buildx, and deploy-site.yml needs both. - # Both come from the dind sidecar's own filesystem. binfmt/QEMU is - # registered kernel-globally on the Pi (the POC pod's - # /proc/sys/fs/binfmt_misc was empty yet an amd64 build ran as x86_64), - # so the `--platform linux/amd64` cross build works inside the pod. - # --memory caps the job container only (sibling `docker run` containers a - # workflow spawns are outside the runner's control). - options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock --memory 3g --memory-swap 3g + # Both come from the dind sidecar's own filesystem. + # + # NO --memory/--memory-swap on this runner: under Kata the guest cgroup + # root is `domain threaded` (only cpuset/cpu/pids are delegated), so + # dockerd cannot apply a memory limit to a job container and every job + # dies at `docker run` with + # unable to apply cgroup configuration: cannot enter cgroupv2 + # "/sys/fs/cgroup/docker" with domain controllers -- it is in threaded mode + # (measured 2026-11-27, run 1442). The bound is now the microVM itself: + # the dind container's 2Gi limit sizes the VM, so a runaway job still + # cannot touch the Pi's memory, and an OOM kills the VM (visible pod + # restart) instead of one job container. Jobs on the runc runners keep + # their limits. + options: -v /usr/local/bin/docker:/usr/bin/docker:ro -v /usr/local/libexec/docker/cli-plugins:/usr/local/lib/docker/cli-plugins:ro -v /var/run/docker.sock:/var/run/docker.sock valid_volumes: - "**"