Repository navigation
fix(worker): stop 4 s DNS stalls on the isolated bridge by giving its containers their own resolvers - #421
Conversation
… containers their own resolvers Docker's embedded resolver forwards a container's lookups from inside its network. When the daemon lists a LAN or tailnet resolver first, the rules that isolate cp-isolated reject it and every lookup waits about 4 s for the fall-through. Containers the worker puts on CASHPILOT_CONTAINER_NETWORK now get CASHPILOT_CONTAINER_DNS (default 1.1.1.1,9.9.9.9); everything else keeps the daemon's list. A bad value is refused before the running container is touched.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe worker now supports configurable DNS resolver addresses for containers on the configured bridge network. Deployment validates the addresses before replacing a running container and passes the resolved list to Docker. Tests and configuration guidance cover the setting and its behavior. ChangesContainer DNS configuration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The DNS setting appears ready to merge after normal checks. Existing containers will receive it on their next deployment. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #421 +/- ##
=======================================
Coverage 95.84% 95.84%
=======================================
Files 52 52
Lines 7598 7611 +13
=======================================
+ Hits 7282 7295 +13
Misses 316 316
🚀 New features to boost your workflow:
|
Every name lookup from a container on the isolated bridge stalled for about 4 seconds. Docker forwards those lookups from inside the container's network. When the host's Docker DNS list starts with a resolver the isolation rules block, such as Tailscale's 100.100.100.100, each lookup waits for Docker to fall through to the next server. On one fleet host that was thousands of stalls a day from five earners, plus a dockerd log line for each. Nothing failed outright.
Containers the worker puts on
CASHPILOT_CONTAINER_NETWORKnow get their own DNS servers. The newCASHPILOT_CONTAINER_DNSsetting controls them and defaults to1.1.1.1,9.9.9.9. Every other container, and the host itself, keeps Docker's list. Setting it empty brings back the old behaviour. A value that is not a list of IP addresses is refused before the running container is stopped.Containers that already exist keep their old DNS until their next deploy. The worker does not recreate them by itself.
This change touches no catalog entry, guide or README table, so no referral link is affected.
Summary by CodeRabbit