New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows libnetwork integration #20478
Conversation
Related engine-API PR is here docker/engine-api#88 |
@msabansal looks like you need to |
also; ping @mavenugo if you have time to check if this LGTY |
@thaJeztah Thanks. Done |
@@ -56,6 +56,7 @@ type Command struct { | |||
Isolation string `json:"isolation"` // Isolation technology for the container | |||
ArgsEscaped bool `json:"args_escaped"` // True if args are already escaped | |||
HvPartition bool `json:"hv_partition"` // True if it's an hypervisor partition | |||
EpList []string `json:"endpoints"` // List of network endpoitns for HNS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo 'endpoitns'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@msabansal @thaJeztah will get to this PR soon. |
@msabansal looks like this needs a rebase 😢 |
@thaJeztah done. How can we restart the experimental & windowsTP4 tests? They seem to failing for some configuration issues and look to be transient errors |
@msabansal done. |
@cpuguy83 :) These tests will take some effort to pass |
Screenshot of CI passing, complete with timestamp, included for posterity... Jenkins flakiness has been troublesome for getting a clean run, but that's being worked on independently by multiple people. @icecrime @calavera @cpuguy83 @tiborvass @thaJeztah @powersplay @friism Can we please get this moved to code review? This is a super critical PR to get merged ASAP in support of the HNS/libnetwork integration for TP5. All issues have been resolved - it LGTM from my review. @mavenugo @mrjana - Madhu/Jana, please can you code review as a priority? |
ping @mavenugo PTAL |
It's not completely related to the PR but I feel like |
return nil | ||
} | ||
|
||
func getEndpointPortMapInfo(ep libnetwork.Endpoint) (nat.PortMap, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI. There is a design change happening on this one via moby/libnetwork#810.
As you can see in the review, we are trying to have no impact to existing functionalities or drivers.
I will let @aboch review this piece of code and confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a note that all these changes to the port-mapping handling are just moving the code
from container_unix.go to container.go so that it is equally applicable to windows platform as well.
So, that makes it a bit more easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mavenugo I am not planning to make big changes to this code anymore, as we need to still send the exp ports and port mapping to the drivers during create endpoint.
And yes this PR's change does not affect that, as it is only moving the code to platform independent files.
@msabansal could you please confirm that the functions added back to |
bulk of these changes LGTM. I agree with @vdemeester that this is a perfect opportunity to structure those functions a little bit better.
I like this. |
@calavera @vdemeester Can I suggest the restructuring comes in a follow-up PR? |
@msabansal yes. we are planning on the vendoring shortly. BTW, am +1 with @calavera & @vdemeester as well. |
@mavenugo Yes most of the code is just refactoring and moving it to the common location. I have addressed the one concern we had and renamed Subnet to FixedCIDR |
Thanks @msabansal. I don't have any other comment. We just have to wait for the next libnetwork vendor in. We are planning on pulling in a bunch of fixes BTW, am fine with doing the container_network.go code reshuffling in a follow up PR. |
@@ -38,7 +33,7 @@ func (daemon *Daemon) setupLinkedContainers(container *container.Container) ([]s | |||
var env []string | |||
children := daemon.children(container) | |||
|
|||
bridgeSettings := container.NetworkSettings.Networks["bridge"] | |||
bridgeSettings := container.NetworkSettings.Networks[runconfig.DefaultDaemonNetworkMode().NetworkName()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not assigning runconfig.DefaultDaemonNetworkMode().NetworkName()
to a var instead of calling it several time 👼
@jhowardmsft I would think it's not that big a deal to just move the piece of code brought back into non Few nits comments, but overall I'm LGTM 🐰 too . |
This depends on #21019 Please, do not merge until that PR is merged. |
@msabansal #21019 is now merged! Can you please rebase? |
Please note that concept of execdrivers is being replaced with OCI compliant binaries executed through containerd. There is an ongoing effort for switching to containerd in #20662 . Please consider porting the changes in your PR to this branch instead. |
Signed-off-by: msabansal <sabansal@microsoft.com>
@msabansal Ignore the Gordon comment. I've asked Darren to talk to you about that, and will catch up internally if you have more questions. For other reviewers/maintainers, this change is completely independent of the containerd effort and should be merged into master in its own right to support progress on TP5 before the containerd work is complete. |
ping @calavera @vdemeester @mavenugo please review |
bulk of the changes are simply code re-organizing to make most of the networking code relevant for windows. As agreed earlier in the thread, we can consolidate better, but that doesn't block this PR. still LGTM. |
Is this good now? |
All good 🎉 Thanks! |
Windows libnetwork integration
Thanks :) |
Congrats on your first PR merged in Docker @msabansal ! |
@thaJeztah Thanks :) |
This commit brings in the initial version of the windows libnetwork integration for networking.