Hi,
Does anyone have experience working with overlay networks in swarm mode on Windows? As I understand it, this is supported on Windows Server Core 1709 and Win10 1709 (fall creators update.) - If so, is there a HOWTO on overlay networks because I think I’m missing something.
I have Docker set up and it works. I can say:
docker run -ti microsoft/windowsservercore:1709 powershell
and I can ping 8.8.8.8 just fine.
I can set up a swarm with:
docker swarm init --advertise-addr 192.168.my.ip
docker network create -d overlay swarmtest
If I say: (note, no overlay network)
docker service create -d --replicas 1 --name pinger microsoft/windowsservercore:1709 ping -t localhost
the service replicates and I can exec powershell within the cointainer and ping 8.8.8.8.
If I say:
docker service create -d --replicas 1 --name pinger --network swarmtest microsoft/windowsservercore:1709 ping -t localhost
I end up with a container that constantly restarts. In the event log says:
fatal task error [module=node/agent/taskmanager node.id=4780g0h0r1i74i5yar94dck2e task.id=qz340cpeacn6dgzwq6s510rud service.id=y3mewjin7uvt6s9ipsanjd4hl error=HNS failed with error : Unspecified error ]
or:
fatal task error [module=node/agent/taskmanager node.id=4780g0h0r1i74i5yar94dck2e task.id=oahevqcqzh9ljcvgy8viwto4t service.id=9ny1tjbzz681eeod1lyd10jp6 error=HNS failed with error : An adapter was not found. ]
or, sometimes I end up with a running container with no network access. (ping 8.8.8.8 fails.) - In this case, if I run ipconfig within the container I see a default gateway of 10.0.0.1. I can’t ping this either.
version:
Client:
Version: 17.11.0-ce-rc3
API version: 1.34
Go version: go1.8.4
Git commit: 5b4af4f
Built: Wed Nov 8 03:03:30 2017
OS/Arch: windows/amd64
Server:
Version: 17.11.0-ce-rc3
API version: 1.34 (minimum version 1.24)
Go version: go1.8.5
Git commit: 5b4af4f
Built: Wed Nov 8 03:13:48 2017
OS/Arch: windows/amd64
Experimental: true
docker network inspect nat:
[
{
"Name": "nat",
"Id": "774bed6bc7540bf66c661ada06c2e96b04195c57f24e4795e17d66faf1cc5d7d",
"Created": "2017-11-16T12:05:44.0374593Z",
"Scope": "local",
"Driver": "nat",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": null,
"Config": [
{
"Subnet": "0.0.0.0/0",
"Gateway": "0.0.0.0"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {
"com.docker.network.windowsshim.hnsid": "234c1b80-dc92-47e6-a820-ab239550080d",
"com.docker.network.windowsshim.networkname": "nat"
},
"Labels": {}
}
]
docker network inspect swarmtest
[
{
"Name": "swarmtest",
"Id": "vo4chg3xe1zs4v9u183r5jrkc",
"Created": "2017-11-16T12:36:42.1182509Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.0.0.0/24",
"Gateway": "10.0.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"a9f7414fe144ab2d6d19aca199115c22972ee50067d733c1eeba22daaa2e3d98": {
"Name": "pinger.1.m7gylby2za9dv2u4tri49hd4j",
"EndpointID": "8d97ff2ff403d76a79ef45bd44d243383133377ea5b0e191462886907779ae4c",
"MacAddress": "00:15:5d:e5:02:cf",
"IPv4Address": "10.0.0.36/24",
"IPv6Address": ""
},
"swarmtest-sbox": {
"Name": "swarmtest-endpoint",
"EndpointID": "494c5ded0725e38c1f39c42834124e1bc9589bda3b00a0cb113519f744fde457",
"MacAddress": "00:15:5d:e5:0e:2c",
"IPv4Address": "10.0.0.2/24",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "4097",
"com.docker.network.windowsshim.hnsid": "1e1ec50d-3df6-4e67-8497-e14bb7a799b1"
},
"Labels": {},
"Peers": [
{
"Name": "b4969417aa35",
"IP": "192.168.my.ip"
}
]
}
]
Any ideas, please?