fix(bootstrap): use host cgroup namespace for gateway container#329
Merged
fix(bootstrap): use host cgroup namespace for gateway container#329
Conversation
Docker Desktop 29.x defaults to private cgroupns which prevents k3s kubelet from accessing cgroup v2 controllers (cpu, cpuset, memory, pids, hugetlb). This causes ContainerManager to fail during startup. Explicitly set cgroupns_mode to host, which is backwards compatible with all Docker versions and matches what k3s-in-Docker tooling (k3d) requires.
8c88ac0 to
84675dd
Compare
pimlock
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cgroupns_mode: hoston the gateway Docker container to fix k3s startup failures on Docker Desktop 29.x with cgroup v2cgroup ["kubepods"] has some missing controllers: cpu, cpuset, hugetlb, memory, pidsRoot Cause
Docker Desktop 29.x (Docker Engine 28.x+) defaults to
cgroupns: private. With cgroup v2, a private cgroup namespace doesn't delegate the required controllers into the container's namespace. The k3s kubelet then fails to create QoS cgroup hierarchy for pod management.Fix
Explicitly set
cgroupns_mode: hostinHostConfigwhen creating the gateway container. This is:privileged: trueTesting
openshell gateway starton Docker Desktop 29.2.1 / macOS 26.2 / cgroup v2cargo check -p openshell-bootstrappassesmise run pre-commitpasses