Repository navigation
libnetwork: isolate TestDNSOptions from host DNS options - #54045
Merged
thaJeztah merged 1 commit intoOct 28, 2026
Merged
Conversation
Provide a temporary origin resolv.conf for both sandboxes so host options such as edns0 and trust-ad cannot affect the DNS option assertions Signed-off-by: akasakariko <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change isolating TestDNSOptions from host DNS settings.
No open issues 🎉
What changed in this PR
This follow-up to #54011 makes libnetwork’s TestDNSOptions independent of host DNS settings, preventing options such as edns0 and trust-ad from affecting its assertions.
Changes:
- Creates a temporary origin
resolv.confcontaining a fixed nameserver and no DNS options. - Uses that file for both test sandboxes, preserving existing assertions without changing production behavior.
| File | Description |
|---|---|
daemon/libnetwork/sandbox_dns_unix_test.go |
Isolates both TestDNSOptions sandboxes from host resolver settings. |
Review effort: Balanced
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.
Follow up to: #54011
Requested in: #54011 (comment)
Summary
Give both sandboxes in
TestDNSOptionsa temporary originresolv.confso host options such asedns0andtrust-adcannot leak into the assertionsExtract only the DNS test isolation change from faa2268, preserving all existing assertions and excluding the allocator test rename
Pi prepared the patch and PR draft and ran the local validation commands
Validation
options edns0 trust-adin the validation container's/etc/resolv.confnetgo journaldtags, focused race tests, lint, vet, formatting and Linux/amd64 cross-compilation pass locally through ColimaLocal validation commands
Executed on Linux/arm64 with Go 1.26.10
Full daemon integration tests and amd64 execution were not run
Created with: Pi