[16.0] Interleave DNS servers across interfaces inside resolv.conf to mitigate resolver limit issues#5385
Merged
eriknordmark merged 1 commit intoNov 12, 2025
Conversation
…te resolver limit issues The Go (and also system) resolver only use up to 3 nameservers from resolv.conf. Previously, we wrote all nameservers for one interface before moving to the next, which could result in a single interface with 3 DNS entries consuming the entire limit. This caused other interfaces to fail DNS lookups with error 'no DNS server available'. To mitigate this, change the resolv.conf generation logic to interleave nameservers across interfaces: first nameserver from each interface, then the second from each, and so on. For up to 3 mgmt ports, this ensures that each interface gets at least one usable DNS entry within the resolver's limit. Duplicate nameservers are still commented out as before. The order of interfaces is kept deterministic to maintain stable output. This is a temporary mitigation of the underlying issue; the long-term plan is to implement our own resolver that can use all configured DNS servers without this 3-entry limit. Signed-off-by: Milan Lenco <[email protected]> (cherry picked from commit 78bf514)
Merged
7 tasks
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.
Description
Backport of #5357
How to test and validate this PR
ZInfoDevicemessage (port info is undersystemAdapter)/run/nim/DeviceNetworkStatus/global.json, looking at theLastErrorfield for each interface.no DNS server availablemessages./etc/resolv.conf.Changelog notes
Interleave DNS servers across interfaces in
resolv.confto mitigate resolver 3-entry limit issues.Checklist