mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
cAdvisor bound a hardcoded /var/lib/docker/. When the daemon keeps its
data root elsewhere, swarm rejects the task because the bind source does
not exist ("invalid mount config for type bind: bind source path does not
exist: /var/lib/docker/") and the stack never converges. In main run
37856203791 all 18 swarm jobs that deploy Prometheus failed this way after
scripts/tests/deploy/utils/filesystem/docker_dataroot.sh moved every node's
data root to /mnt/docker-fs/docker, on ext4, btrfs and zfs alike.
The role now reads DockerRootDir from the daemon on STACK_HOST and binds
that path as source and target. cAdvisor v0.55.1 takes its storage dir from
docker info, so the target has to follow the daemon's root instead of
staying at /var/lib/docker. The probe needs the container CLI and a running
daemon, which a single-role compose deploy only gets later from
sys-svc-container inside sys-stk-backend, so the role loads it first under
the usual run-once guard.
Verified with a local compose deploy of variant 2: the rendered compose file
carries /var/lib/docker:/var/lib/docker:ro from the probe and cAdvisor runs
healthy.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>