[Fix] Self-hosted Docker tasks fail after two minutes when SleepCheck cannot reach Docker#618
Closed
roomote-roomote[bot] wants to merge 2 commits into
Closed
Conversation
Installer/proxy compose only gave controller DOCKER_HOST; SleepCheck in bullmq mapped failed inspect to unknown and force-failed healthy runs. Wire bullmq through docker-proxy, harden getInstanceStatus, skip destructve recovery on probe errors.
Contributor
Author
3 tasks
Member
|
Thanks for putting this together. Closing it for two reasons:
The CI assertions guarding bullmq's Docker-proxy wiring are a good idea on their own and would be welcome as a separate, focused PR. |
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.
Related issue
Fixes #616
Why this PR exists
On self-hosted Docker compute with the installer-generated
docker-socket-proxycompose path, SleepCheck runs inside bullmq but only controller could reach Docker. Everydocker inspectfailed, mapped to statusunknown, and healthy task runs were force-failed within ~WORKER_HEARTBEAT_STALE_MS(2 minutes) — verified operator workaround was giving bullmq the same proxy access.What changed
DOCKER_HOST=tcp://docker-proxy:2375, membership on the internaldocker-apinetwork, anddepends_onthe proxy (still no raw/var/run/docker.sockon bullmq).stopped; daemon/CLI connectivity failures throw instead of becomingunknown.Impact: Self-hosted Docker task runs can stay alive past the SleepCheck heartbeat window when using the proxy-based install path. Misconfigured Docker access no longer silently fails every run.
How it was tested
deploy/scripts/validate-compose-security.sh— passednode deploy/ci/validate-deployment-artifacts.mjs— passedpnpm --filter @roomote/compute-providers exec vitest run src/adapters/docker.test.ts— 5 passedpnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/bullmq exec vitest run src/scheduled-jobs/__tests__/sleep-check.test.ts— 36 passedOperator follow-up after upgrade: recreate
bullmq, confirmDOCKER_HOST+docker inspectsucceed, and run a task past 2 minutes without force-fail.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changesetLinked work items
Closes #616