Compare commits

...
Author SHA1 Message Date
9430ab051c Merge pull request #81 from wt/t_8aa4af50-kata-cgroup into master 2026-11-27 07:17:30 +00:00
Sirius DevOps
d31c0cb82d 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.
2026-11-27 02:17:24 -05:00

View file

@ -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:
- "**"