The Playbook That Said ok: A Silent containerd Misconfiguration on Debian 13
While rebuilding my homelab from scratch, the playbook that installs containerd finished green on a freshly installed Debian 13 node. Every task was ok, changed or skipped; nothing failed. Yet the one setting the playbook exists for, the systemd cgroup driver, had never been applied. This is how a correct-looking run hid a misconfiguration, and how it was caught before the node joined the cluster.
Impact
- Actual: none. The node had not joined a cluster yet, and the problem was caught by a manual check right after the run.
- Potential: once joined, the node would have run containerd with the
cgroupfsdriver while the kubelet usedsystemd. That mismatch typically shows up as unstable nodes and pods restarting in a loop, long after the playbook that caused it has been forgotten. - Blast radius: every node prepared with this playbook on Debian 13, since all of them install the same package.
Timeline
All times on 2026-11-21.
- 21:28 -
03-install-containerd.yamlruns on the new GPU node. Recap:ok=9 changed=2 failed=0 skipped=1. - 21:28 - Reading the output, two lines stand out: Generate default containerd config was skipped, and Configure SystemdCgroup was ok rather than changed. A fresh install should have changed both.
- 21:29 - Check on the node:
grep SystemdCgroup /etc/containerd/config.tomlfinds nothing; the file has 9 lines. containerd is1.7.24~ds1-6+deb13u1. - 21:30 - Playbook fixed (see Actions) and re-run: the config is regenerated, the flag is set, an assertion passes, containerd restarts.
- 21:30 -
grep SystemdCgroupshowstrue. Later,containerd config dumpconfirms it for both the runc and the NVIDIA runtime.
Root cause
Two reasonable steps combined into a silent no-op:
- The generation step was conditional on the file's absence. It ran
containerd config default > /etc/containerd/config.tomlonly when the file didn't exist. Debian's package ships a short stubconfig.tomlwithout a runc section, so the file existed and generation was skipped (see Debian's containerd Package Ships a Config Stub Without SystemdCgroup). - The edit step could not fail. An
ansible.builtin.replaceturnedSystemdCgroup = falseintotrue. With no such line in the stub, there was nothing to replace, and the module correctly reportedok: its desired state, "no line saysfalse", already held (see An Ansible replace Task That Matches Nothing Reports ok, So Assert the End State).
The playbook had been written and tested against nodes where the file either didn't exist or already held the full default config. The packaged stub was the case nobody had planned for.
Actions
- Generate the full default config whenever the file does not contain
SystemdCgroup, instead of only when the file is missing. - Add an assertion task (
grep -q 'SystemdCgroup = true') that fails the play if the setting is absent, so a no-op can't pass again. - Verify the effective configuration with
containerd config dump, since the NVIDIA toolkit later adds a drop-in file the main config doesn't show (see containerd Merges Drop-in Files Through imports, So config dump Shows the Real Config). - Add this failure pattern to the homelab repo's
docs/troubleshooting.md. - Review the other playbooks for
replaceandlineinfiletasks whose goal is never asserted.
Lessons learned
okmeans "nothing to do", not "done". A green recap shows that no task failed, not that the system reached the state the play exists for. For the settings that matter, end with a check that fails when they are missing.- Base conditions on content, not existence. "Does the file exist?" is a proxy. "Does the file contain what I need?" is the question.
- Distribution packages differ from upstream defaults. Guides written against upstream binaries can assume a file layout that a distro package changes.
- Read the boring lines. The clue was a
skippedand anokwherechangedwas expected. Knowing what a first run should print is part of reading it.
References
- An Ansible replace Task That Matches Nothing Reports ok, So Assert the End State - the Ansible behaviour behind the silence.
- Debian's containerd Package Ships a Config Stub Without SystemdCgroup - the packaging detail.
- containerd Merges Drop-in Files Through imports, So config dump Shows the Real Config - verifying what containerd really runs.
- kubelet Depends on containerd Through the CRI Socket - why the cgroup driver must match.
- Prepare a Debian Node for Kubernetes - the node preparation.
- Homelab v2 Rebuild - the lab this happened in.
- Kubernetes documentation: Container Runtimes - cgroup drivers and containerd.
- Ansible documentation: replace module - when the task reports a change.