Skip to content

Runner must wait for dockerd on host reboot, not just on compose up - #12

Merged
NubsCarson merged 1 commit into
mainfrom
fix/runner-waits-for-dockerd-on-boot
Aug 7, 2026
Merged

Runner must wait for dockerd on host reboot, not just on compose up#12
NubsCarson merged 1 commit into
mainfrom
fix/runner-waits-for-dockerd-on-boot

Conversation

@NubsCarson

Copy link
Copy Markdown
Member

Follow-up to #7, found by rebooting the live host — a test worth doing while the instance has no DNS and therefore no users.

depends_on: condition: service_healthy only governs docker compose up. After a host reboot, Docker's restart policy starts both containers simultaneously and ignores depends_on, so the startup race came back in precisely the situation nobody watches. The runner logged three failed daemon pings before recovering. It recovered because the poller retries — but a job claimed during that window would have failed.

The entrypoint now waits for the daemon before starting. It probes the Docker API's /_ping over HTTP rather than shelling out to docker, because the runner image ships no docker CLI (my first attempt used docker info and would have failed immediately), and it gives up after two minutes instead of hanging forever.

Verified across two reboots of the live host:

race errors post-reboot CI job
before 3 success (by retry)
after 0 success

bun run validate green.

🤖 Generated with Claude Code

The healthcheck added in #7 governs docker compose up. After a host
reboot the restart policy starts both containers at once and ignores
depends_on conditions, so the race returned in the one situation where it
is least observed. A reboot test showed the runner logging three failed
daemon pings before recovering; a job claimed in that window would fail.

The runner entrypoint now waits for the daemon before starting, probing
the Docker API ping endpoint over HTTP because the runner image ships no
docker CLI, and giving up after two minutes rather than hanging forever.

Verified by rebooting the live host twice: three race errors before the
change, zero after, with a CI job dispatched post-reboot succeeding both
times.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NubsCarson
NubsCarson merged commit 9da3de1 into main Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant