Closed markusboehme closed 12 months ago
With the approach in #76 being insufficient for non-superpowered admin containers that cannot mount filesystems on their own, another approach is needed.
Untested idea: Some of the compatibility work spills over into host-ctr
that mounts a cgroup v1 root in /sys/fs/cgroup
on demand instead of the default bind mount of the host's /sys/fs/cgroup
. The functionality could hide behind a flag for host-ctr
that is passed by host-containers
exclusively for the admin container.
The elephant in the room is the unattractive special-casing of the admin container. It could be removed once the admin container image moves to a base image that supports cgroup v2. Alternatively, the host-ctr
flag could generically be exposed via the settings model, but there would be no good choice for a default that fits both now and in a cgroup v2-only future.
Untested idea: Some of the compatibility work spills over into host-ctr that mounts a cgroup v1 root in
/sys/fs/cgroup
on demand instead of the default bind mount of the host's/sys/fs/cgroup
. The functionality could hide behind a flag forhost-ctr
that is passed byhost-containers
exclusively for the admin container.
After hacking a bit on this and looking at code of containerd and runc, this appears to not be a great idea. cgroup filesystems are understandably special-cased in both of them.
Cleaning up loose ends: #76 was merged (see more discussion there) and released with v0.10.0.
Image I'm using: any Bottlerocket variant, any admin container image
Issue or Feature Request:
The admin container should be able to run on Bottlerocket hosts that use cgroup v2/the unified cgroup hierarchy. Currently, the admin container cannot start on such hosts and will exit with the following errors:
The reason is Amazon Linux 2 in the base image shipping with systemd v219. This version of systemd does not support cgroup v2.