fix: add DNS resilience for BuildKit containers#109
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
fix: add DNS resilience for BuildKit containers#109devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- Add DNS health-check after systemd-resolved restart to verify resolution is working before handing the nameserver to BuildKit - Add a public DNS fallback (8.8.8.8) alongside the host IP in BuildKit's nameserver config for redundancy against transient systemd-resolved failures (EAI_AGAIN / ETIMEDOUT) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
This reverts to behavior that we saw in #63 which actually reduced the amount of these DNS errors. |
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.
Summary
Addresses recurring
EAI_AGAIN/ETIMEDOUTfailures during Docker builds when BuildKit containers can't resolve npm/Docker registry hostnames through the sole systemd-resolved nameserver. Observed ~103Docker - Build APIfailures for naboo-team in the last 30 days (eu-west ARM runners), all caused by transient DNS resolution failures inside BuildKit containers.Two changes:
DNS health-check after
systemd-resolvedrestart —waitForDnsReady()pollsgetent hostsagainstregistry.npmjs.org+registry-1.docker.iowith 500ms intervals up to 10s, ensuring the resolver is responsive before BuildKit starts issuing queries.Add a public DNS fallback to BuildKit's nameserver config —
getRoutableHostDns()now returns[hostIp, "8.8.8.8"]instead of[hostIp]. BuildKit round-robins across nameservers (not ordered fallback), so ~50% of queries still hit the local systemd-resolved cache while the other 50% go direct to Google DNS. This is a deliberate trade-off: we lose some cache efficiency but gain resilience when systemd-resolved is transiently unavailable.Link to Devin session: https://app.devin.ai/sessions/6d41a8230c874dcaa490df945caa2315
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled. (Staging)