Added support for dns-search and fixes #30102#30117
Added support for dns-search and fixes #30102#30117vdemeester merged 2 commits intomoby:masterfrom msabansal:natfix
Conversation
|
This will require latest windows platforms to work. It will not throw any error on older builds but the option will be silently ignored. This is the present behavior. Do we want to change it so that specifying --dns-search throws error on unsupported platforms? |
daemon/container_operations.go
Outdated
There was a problem hiding this comment.
Can remove the else here and just have a second if-statement
vendor.conf
Outdated
There was a problem hiding this comment.
Can we get this tagged with a version?
There was a problem hiding this comment.
Just realized - this should be omitempty. Sorry 😇
There was a problem hiding this comment.
(Nit, not sure if it makes sense), but consider updating the example at the top of libcontainerd/client_windows.go to include this.
daemon/daemon_windows.go
Outdated
There was a problem hiding this comment.
This change looks unrelated. Could you update the comment (or is that still accurate?)
There was a problem hiding this comment.
The comment includes that it fixes #30102. Should I do a separate PR for that?
There was a problem hiding this comment.
Ah, I was referring to the comment immediate above this line of code.
libcontainerd/types_windows.go
Outdated
There was a problem hiding this comment.
Could/should lthis be combined with the existing NetworkEndpointsOption to avoid more proliferations to this pattern of side-band options? Not a problem if it doesn't make sense, just asking the question 😇
There was a problem hiding this comment.
Yes it can be. I just thought It would be better to have it as a separate option. I will combine them
There was a problem hiding this comment.
Thanks - yes, I'm trying to figure out how to get rid of side-band options and have everything in OCI.
I think that would probably be a good idea. |
|
Does this also require any doc updates? |
Signed-off-by: msabansal <[email protected]>
Signed-off-by: Sandeep Bansal <[email protected]>
|
@jhowardmsft Not sure if it requires a doc update. Perhaps we can add somewhere that dns-search is only supported for rs2. Since we are now throwing an error it should be alright. |
|
LGTM. Thanks for doing the updates @msabansal |
| // encountered if it doesn't already exist | ||
| if !defaultNetworkExists && | ||
| runconfig.DefaultDaemonNetworkMode() == containertypes.NetworkMode(strings.ToLower(v.Type)) && | ||
| n == nil { |
There was a problem hiding this comment.
Maybe check n == nil first, or at least second.
|
@jhowardmsft @johnstep Can we merge or do I split these? The test failures don't look related to this change. Can we rerun or should I triage? |
|
@msabansal looks like @johnstep has minor comment for you |
|
@LK4D4 code looks good and the comment is really a nit. Let's merge this and do a quick follow-up 👼 |
Reuse existing structures and rely on json serialization to deep copy Container objects. Also consolidate all "save" operations on container.CheckpointTo, which now both saves a serialized json to disk, and replicates state to the ACID in-memory store. Signed-off-by: Fabio Kung <[email protected]> (cherry picked from commit edad527) Signed-off-by: Kir Kolyshkin <[email protected]> Conflicts: - daemon/container_operations.go: missing moby#30117 - daemon/daemon.go: missing moby#32821 - daemon/list.go: missing moby#27557, moby#33241 etc.
Fix a deadlock caused by re-entrant locks on container objects. Signed-off-by: Fabio Kung <[email protected]> (cherry picked from commit 37addf0) Signed-off-by: Kir Kolyshkin <[email protected]> Conflicts: - daemon/container_operations.go: missing moby#30117
- What I did
This PR adds support for --dns-search option for windows. It also fixes #30102 Support for dns-search requires platform support and will only work with the next version of windows.
- How I did it
- How to verify it
Verified the bug fix using the steps Jason mentioned and also validated that dns-suffix is set on the latest builds.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)