Comments (4)
I'm working on other projects but I'll try and slip this in this week.
from windows-container-networking.
@Keith-Mange FYI
from windows-container-networking.
Another option is to have the executables named to match the NetworkType, and then we can just use config.Type instead of config.Name, and there's little-to-no surprise, as long as no one renames their own executable. Again, this is really just one executable compiled three times, so not really a great approach, I feel.
FWIW this exact approach was marged in #94 as seen here.
Scratch that, that was an unrelated issue which doesn't fix the actual underlying problem, and the failure to map the binary names to the HCN types still occurs.
Will propose some sort of solution (or at least a proper workaround) soon.
from windows-container-networking.
I wrote this part before the above comment was modified. Looks like it was updated with the same conclusion.
Interesting. Poking around, it doesn't seem that the issue was resolved that the Makefile produces binaries named sdnbridge
and sdnoverlay
, but those are not documented NetworkMode values. The examples seem to mostly expect binaries named l2bridge
and l2tunnel
(which aren't output here), but the flannel and dual-stack examples still reference the sdn*
names, which I expect will still fail with the error in my original example.
Unless I'm overlooking some point where the sdn*
names are translated into the HCN expected enum values... I note that the in-tree test code is not using the executable names, but passing the expected NetworkType
values directly into util.MakeTestStruct
, so the executable-name part isn't being covered by the test suite.
That said, since we've already gone down this path, perhaps simply changing the Makefile (and whatever else is lying around like the examples) to output executables to match the NetworkType
enum is the shortest-path workaround.
Thinking further about it, and also in relation to this comment:
// getOrCreateNetwork
// TODO: Require network to be created beforehand and make it an error of the network is not found.
// Once that is done, remove this function.
perhaps the long-term solution is to complete this TODO, and then unifiy the plugins into a single type wincni
. AFAICT from GitHub-browsing the source, if the network already exists, the type from the CNI config file is not actually used, we trust the type of the existing HCN network.
The only place I can see accessing the CNI config's Type is GetHostComputeNetworkConfig
, itself only called during CreateNetwork
.
I'm not sure about the history of this comment or the decision to require pre-creating networks (That seems like CNI's role to my limited understanding) so this might not be a viable path. I also admit I don't know off-hand how I would pre-create the NAT network, for example.
Which suggests a different interesting issue: If you pre-create an Overlay
network, you can trivially use that network's name in your CNI config, and a network type of nat
(or NAT
, or nAt
, but that's a different issue), and it'll process it as an Overlay
network based on the details retrieved from HCN. I suspect this is how this issue has slipped under the radar, if the general users of this repo are pre-creating their networks, then there's no failure with calling the sdnoverlay
executable by CNI Config Type sdnoverlay
but referencing an Overlay (or L2Bridge, or NAT) network.
from windows-container-networking.
Related Issues (19)
- [BUG] [CNI v0.3.0] `master` key in CNI config seemingly not used anywhere.
- Resiliency Testing
- Finish Transition to Azure Pipelines HOT 1
- Make Network Creation in Testing Less "Magic" HOT 1
- Improve Documentation for Basic Usecases
- Refactor Code
- sdnoverlay + flannel should have extra EndpointPolicy in config HOT 2
- sdnbridge + flannel in host-gw mode: wrong endpoint default gateway HOT 5
- Problem with sdnbridge and transparent mode witout IP range for the network HOT 2
- Error when I use sdnbridge with host-local
- The v0.2.0 Alpha Release is outdated HOT 3
- err:hcnCreateNetwork failed in Win32: Invalid JSON document string HOT 2
- Windows Server run with `--cni` got [ctr: no network config found in /etc/cni/net.d: cni plugin not initialized] error HOT 2
- [BUG] Running many pods on a Windows node at the same will lead to failures of CNI HOT 1
- This repo is missing important files
- Wrong "dns capabilities" setting in many examples
- [BUG] [CNI v0.3.0] CNI Tests are failing HOT 1
- [BUG] [Any CNI ver] Validate/update pre-existing HCN network properties for mismatches with CNI config's expected properties. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-container-networking.