daemon: Fix DNS config corruption on reload#52060
Merged
thaJeztah merged 1 commit intomoby:masterfrom Feb 19, 2026
Merged
Conversation
The copystructure library uses reflection to deep-copy structs, but cannot access unexported fields in netip.Addr, resulting in zero-value copies. This caused DNS configuration to be corrupted after daemon reload (SIGHUP), with containers getting "invalid IP" in /etc/resolv.conf. Register a custom copier for netip.Addr that returns the value as-is, which works because netip.Addr is an immutable value type. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
robmry
approved these changes
Feb 19, 2026
Contributor
Author
|
Yeah I think we should just move off copystructure as it's archived and unmaintained now. |
Member
|
Yeah, I was checking if there was a "blessed" fork, but doesn't appear to be for this one; https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc |
Member
|
Ignoring the oracle failure; maybe we need to raise the timeout somewhere; |
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.
The copystructure library uses reflection to deep-copy structs, but cannot access unexported fields in netip.Addr, resulting in zero-value copies.
This caused DNS configuration to be corrupted after daemon reload (SIGHUP), with containers getting "invalid IP" in /etc/resolv.conf.
Register a custom copier for netip.Addr that returns the value as-is, which works because netip.Addr is an immutable value type.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)