Skip to content

Added support for dns-search and fixes #30102#30117

Merged
vdemeester merged 2 commits intomoby:masterfrom
msabansal:natfix
Jan 31, 2017
Merged

Added support for dns-search and fixes #30102#30117
vdemeester merged 2 commits intomoby:masterfrom
msabansal:natfix

Conversation

@msabansal
Copy link
Contributor

- 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)

@msabansal msabansal changed the title Added support for dns-suffix and fixes #30102 Added support for dns-search and fixes #30102 Jan 13, 2017
@msabansal
Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove the else here and just have a second if-statement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted

vendor.conf Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get this tagged with a version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.5.10 just released

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized - this should be omitempty. Sorry 😇

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating hcsshim

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Nit, not sure if it makes sense), but consider updating the example at the top of libcontainerd/client_windows.go to include this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks unrelated. Could you update the comment (or is that still accurate?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment includes that it fixes #30102. Should I do a separate PR for that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I was referring to the comment immediate above this line of code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😇

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can be. I just thought It would be better to have it as a separate option. I will combine them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - yes, I'm trying to figure out how to get rid of side-band options and have everything in OCI.

@lowenna
Copy link
Member

lowenna commented Jan 13, 2017

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?

I think that would probably be a good idea.

@lowenna
Copy link
Member

lowenna commented Jan 13, 2017

Does this also require any doc updates?

msabansal and others added 2 commits January 13, 2017 12:01
@msabansal
Copy link
Contributor Author

@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.

@lowenna
Copy link
Member

lowenna commented Jan 13, 2017

LGTM. Thanks for doing the updates @msabansal

Copy link
Member

@johnstep johnstep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

It might be better to separate the fix for #30102, though.

// encountered if it doesn't already exist
if !defaultNetworkExists &&
runconfig.DefaultDaemonNetworkMode() == containertypes.NetworkMode(strings.ToLower(v.Type)) &&
n == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe check n == nil first, or at least second.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @msabansal

@msabansal
Copy link
Contributor Author

@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?

@LK4D4
Copy link
Contributor

LK4D4 commented Jan 30, 2017

@msabansal looks like @johnstep has minor comment for you

@vdemeester
Copy link
Member

@LK4D4 code looks good and the comment is really a nit. Let's merge this and do a quick follow-up 👼

@vdemeester vdemeester merged commit c0a1d2e into moby:master Jan 31, 2017
@GordonTheTurtle GordonTheTurtle added this to the 1.14.0 milestone Jan 31, 2017
kolyshkin pushed a commit to kolyshkin/moby that referenced this pull request May 4, 2020
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.
kolyshkin pushed a commit to kolyshkin/moby that referenced this pull request May 4, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot connect container to user-defined NAT network on Windows

7 participants