-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CNI support for Windows #1585
Merged
Merged
CNI support for Windows #1585
Conversation
This file contains 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
TBBle
force-pushed
the
windows_cni_support
branch
2 times, most recently
from
July 20, 2020 15:20
05dbf97
to
8a16c0c
Compare
TBBle
force-pushed
the
windows_cni_support
branch
2 times, most recently
from
July 20, 2020 16:05
a3f2193
to
502f1e8
Compare
tonistiigi
reviewed
Jul 20, 2020
tonistiigi
reviewed
Jul 20, 2020
TBBle
force-pushed
the
windows_cni_support
branch
2 times, most recently
from
July 21, 2020 06:18
9a752c3
to
53a3b18
Compare
tonistiigi
reviewed
Jul 21, 2020
TBBle
force-pushed
the
windows_cni_support
branch
from
July 21, 2020 06:25
53a3b18
to
fe9ff30
Compare
This enforces the lack of host networking support on Windows. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
The Windows API is completely different, so the common code cannot create the unique identifier, but must accept what the OS-specific code does. For Linux, it's a pathname. In Windows, it's a GUID string. This pulls in direct usage of Microsoft/hcsshim, which previously was only an indirect usage via containerd calls from, e.g., localMounter on Windows. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
The `WithLoNetwork` and `WithConfFile` options consume the `WithPluginDir` and `WithInterfacePrefix` settings, so they must come first. This fixes the issue that the provided plugin directory was not used for the provided configuration file. This would have been more visible, but the default `InterfacePrefix` is already "eth". Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
There's no Loopback CNI plugin for Windows as far as I can see, so I'm assuming it's not needed. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
TBBle
force-pushed
the
windows_cni_support
branch
from
July 21, 2020 06:31
fe9ff30
to
50c5d4c
Compare
tonistiigi
approved these changes
Jul 21, 2020
4 tasks
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.
These changes get the CNI integration working on Windows:
--containerd-cni-binary-dir
option to be ignored when reading the config provided by--containerd-cni-config-path
.Tested using a hack-bug-fixed version of the
nat
plugin from https://github.com/microsoft/windows-container-networking (see microsoft/windows-container-networking#57), with the following config from their examples.This is only used by the containerd worker on on Windows, which is not currently activated. I'm locally using a heavily-hacked-upon
GenerateSpec
to get an OCI spec that doesn't trigger LCOW support.That's the last problem to solve, once the various underlying pieces are in-place and working.
Tested with the following Dockerfile:
and confirmed that Python had been installed in the resulting image.
Contributes towards #616