Skip to content
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

host-gw: add windows support #921

Closed
wants to merge 7 commits into from

Conversation

rakelkar
Copy link
Contributor

Description

Host GW support for windows (3a from #832) #833
Needs integration tests!!

Todos

  • Tests
  • Documentation

@rakelkar
Copy link
Contributor Author

@tomdee I am having trouble updating just the gonetsh vendor version. What is the correct way to do this - issues online appear to suggest editing the lock file manually. Do you have thoughts on how to do? I want to update to rakelkar/gonetsh@758b1f7

@tomdee
Copy link
Contributor

tomdee commented Jan 22, 2018

@rakelkar You can just update the lock file manually. I also don't mind if you end up updating other vendored libraries. If I think it's a problem to update other libraries then 'll introduce more pins in glide.yaml.

@rakelkar rakelkar force-pushed the windowsHostGw180115 branch from afa0df5 to 0dc90ba Compare February 4, 2018 06:26
@madhanrm madhanrm force-pushed the windowsHostGw180115 branch from 9944210 to f8f5fc8 Compare March 7, 2018 00:26
@ptylenda
Copy link

FYI I am sharing my Ansible playbooks for deploying windows/ubuntu cluster which has flannel with host-gw backend. Someone may find this useful I guess, unfortunately I am not able to focus on developing thexe in next weeks: https://github.com/ptylenda/kubernetes-for-windows

@rocky0001
Copy link

got the error: HNS failed with error : An adapter was not found.

I0711 13:57:07.141605 4872 main.go:422] Searching for interface using 10.126.79.218
2018-07-11 13:57:07.182620 I | Interfaces : [{0 vEthernet (Ethernet 2) 25 true 10.126.79.218 24 0 10.126.79.1} {0 Loopback Pseudo-Interface 1 75 false 127.0.0.1 8 0 } {0 vEthernet (nat) 5000 true 172.29.160.1 20 0 }]
2018-07-11 13:57:07.219603 I | Found Interface for 10.126.79.218 => {15 vEthernet (Ethernet 2) 25 true 10.126.79.218 24 0 10.126.79.1}
I0711 13:57:07.221603 4872 main.go:499] Using interface with name vEthernet (Ethernet 2) and address 10.126.79.218
I0711 13:57:07.234575 4872 main.go:516] Defaulting external address to interface address (10.126.79.218)
I0711 13:57:07.237603 4872 kube.go:131] Waiting 10m0s for node controller to sync
I0711 13:57:07.238604 4872 kube.go:294] Starting kube subnet manager
I0711 13:57:08.239596 4872 kube.go:138] Node controller sync successful
I0711 13:57:08.241573 4872 main.go:240] Created subnet manager: Kubernetes Subnet Manager - ip-10-126-79-218.us-west-2.compute.internal
I0711 13:57:08.241573 4872 main.go:243] Installing signal handlers
I0711 13:57:08.241573 4872 main.go:358] Found network config - Backend type: host-gw
I0711 13:57:08.257572 4872 hostgw_windows.go:151] Attempting to create HNS network, request: {"DNSServerList":"","Name":"cbr0","Subnets":[{"AddressPrefix":"192.168.3.0/24","GatewayAddress":"192.168.3.1"}],"Type":"l2bridge"}
E0711 13:57:08.317554 4872 main.go:285] Error registering network: unable to create network [cbr0], error: HNS failed with error : An adapter was not found.
I0711 13:57:08.320573 4872 main.go:338] Stopping shutdownHandler...

@pablodav
Copy link

What's the status of this possible support? would be great to have support for flannel plugin on windows.

Same for #922

@daschott
Copy link

@pablodav Flannel in host-gw mode works today on Windows with pre-built binaries that include the open PR's, but it's not an ideal situation. Right now we are targeting this PR and working together with the maintainers to try and get basic Windows CNI plugins in which can be used by Flannel. Afterwards we will cleanup these plugins and work on tests with @madhanrm and @dineshgovindasamy as maintainers (this is a Windows only plugin, so it shouldn't break any existing CNI's for Linux). VxLAN is still under active development, including from platform perspective.

@pablodav
Copy link

Thaks for the update @daschott ! Sounds good to have some news and clear information where it is going!

thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 3, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 3, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 3, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 3, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 3, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 10, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 11, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 12, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 12, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 12, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 17, 2018
@madhanrm
Copy link
Contributor

FYI @nagiesek

thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 18, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Sep 24, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
@tomdee
Copy link
Contributor

tomdee commented Oct 5, 2018

@rakelkar What is the status of this PR? Is it ready for review and merging?

@madhanrm
Copy link
Contributor

madhanrm commented Oct 5, 2018

@tomdee Integration test is pending. Can we follow that up in a separate PR & get this one reviewed and merged?

@nagiesek can take care of the review comments.

@madhanrm
Copy link
Contributor

@tomdee, there also seems to be another PR : #1042 which is doing similar to this PR. Can we get this PR merged & then work on top if it. The binaries out of this PR has been tested for over an year now

Copy link
Contributor

@rajatchopra rajatchopra left a comment

Choose a reason for hiding this comment

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

/lgtm

Real minor nits. The PR should be ready to merge, neverthless. We should do a cosmetic code rejig in another PR to have proper common code and overriding interface implementations for windows/linux.
Also, for the gonetsh library, is there a direct kernel syscall way of managing links and routes?

return n.extIface.Iface.MTU
}

func (n *network) Run(ctx context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function should be made common between linux/windows. The list of routes malloc can be part of the New/Register function itself.

Choose a reason for hiding this comment

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

we will move it in the next PR.

name string
extIface *backend.ExternalInterface
linkIndex int
rl []netroute.Route
Copy link
Contributor

Choose a reason for hiding this comment

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

A better name here possibly? 'routes'?

Choose a reason for hiding this comment

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

Will fix this in a subsequent PR.

@astrieanna
Copy link

I have a flannel/hostgw cluster on vsphere, with a linux node and a windows node. The one thing that doesn't work is that the linux node (the host, not a container) can't connect to windows service clusterips. This breaks accessing windows services through the NodePort on the linux node.

Does accessing a windows service via a nodeport on a linux node work for you with this PR?

ksubrmnn pushed a commit to ksubrmnn/flannel that referenced this pull request Oct 29, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Oct 31, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Oct 31, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922
@dineshgovindasamy
Copy link

Lets abandon this PR. We are taking PR#1042 which is merged PR.

@rakelkar , can u abandon this PR?

@rajatchopra
Copy link
Contributor

Closing this PR in favour of #1042. Please re-open if needed.

@rajatchopra rajatchopra closed this Nov 2, 2018
thxCode added a commit to thxCode/coreos-flannel that referenced this pull request Nov 6, 2018
    - Add Windows host-gw
        (*) patch for flannel-io#921
    - Add windows vxlan
        (*) patch for flannel-io#922

Co-authored-by: rakelkar <[email protected]>
Co-authored-by: madhanrm <[email protected]>
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.

10 participants