fix(docker): restart on the daemon.json change before any container exists #73

Merged
jfraeys merged 1 commit from jfraeys/fix/docker-restart-before-containers into main 2026-10-12 18:41:48 -04:00
Owner

Staging run 495 diagnostics: the first dockerd start used containerd-snapshotter=true / overlayfs (Docker 29 default); the Restart Docker handler, deferred to the first flush_handlers (inside the crowdsec role), brought it back with containerd-snapshotter=false / overlay2 (daemon.json pins overlay2). A separate store: docker ps -a showed 0 containers, so crowdsec's verify failed with No such container for the whole retry window even though the container existed a minute earlier.

Fix: flush_handlers right after the daemon.json task in roles/docker, which runs before any container-creating role in services.yml. Steady state is unchanged (no config change, no handler, no restart). A DR rebuild of production would have hit this too. Incident recorded in docs/incidents.md. ansible-lint, yamllint, syntax-check pass. 🤖 Generated with Claude Code

Staging run 495 diagnostics: the first dockerd start used containerd-snapshotter=true / overlayfs (Docker 29 default); the `Restart Docker` handler, deferred to the first flush_handlers (inside the crowdsec role), brought it back with containerd-snapshotter=false / overlay2 (daemon.json pins overlay2). A separate store: docker ps -a showed 0 containers, so crowdsec's verify failed with `No such container` for the whole retry window even though the container existed a minute earlier. Fix: `flush_handlers` right after the daemon.json task in roles/docker, which runs before any container-creating role in services.yml. Steady state is unchanged (no config change, no handler, no restart). A DR rebuild of production would have hit this too. Incident recorded in docs/incidents.md. ansible-lint, yamllint, syntax-check pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(docker): restart on the daemon.json change before any container exists
All checks were successful
Lint / lint (pull_request) Successful in 1m33s
Secret scan / scan (pull_request) Successful in 13s
bcfd240b64
Docker's containerd-snapshotter default vs the pinned overlay2 storage-driver: a deferred restart handler switched
backends after containers existed and hid them all (staging run 495). Flush handlers right after the daemon.json
task so the restart happens first. Incident recorded.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!73
No description provided.