Multi-OS swarm networking. Should this work?

Before i spend too much time wondering why i can’t get this to work i thought i’d ask whether it is expected to work currently…

I have a 2 node swarm, node leader is linux, node worker is windows.

Create an overlay network on the swarm.

Start 2 Linux services on the swarm and overlay network, both containers can ping each other using both hostname and IP address.

Start 2 Windows services on the swarm and overlay network, both containers can ping each other using IP address but not hostname.

However, the Windows containers can’t ping the Linux ones or vice versa, using either hostname or IP address.

I see this as a pretty useful scenario whereby, for example, a Windows app/web-site can use a Linux-backed database container.

Is this something that should work now, or will work in the future?

Thanks

Docker info

Windows

Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 2
Server Version: 17.06.0-ce-rc1
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: active
NodeID: iy4ko5j84yeb8r0tljhsha310
Is Manager: false
Node Address: 192.168.2.96
Manager Addresses:
192.168.2.98:2377
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1066.amd64fre.rs1_release_sec.170327-1835)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 6GiB

Linux:

Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.03.1-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 15
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: active
NodeID: bbzaarinfu24ynch8c6ie7xm9
Is Manager: true
ClusterID: sn7teu3ui1gtuxf7tbmuzufo5
Managers: 1
Nodes: 2
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.2.98
Manager Addresses:
192.168.2.98:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-78-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 2.871 GiB
Name: ubuntu
ID: JBMK:B637:IDFL:LYAY:S2Z7:OORW:YBUU:7DHF:GS7E:HSXA:HIOC:XA32
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Yes, this should work - do you have more details on your setup? Please make sure you’re on the latest Windows patch

Thanks for the help. Updated on windows and i’ve gotten an improvement.

docker network inspect only shows the linux container on the network

“Containers”: {
“2d7a95cdd145d02a569abb07d9cc7948c54c6ca09f31a254bc79ed360ea02d7b”: {
“Name”: “dev-database.1.7qak4aser6uqi0b70igyorazn”,
“EndpointID”: “d156d2b8e04a0b32f44475781b8de87b449a7773c059392942fb0fe9fd7e4b00”,
“MacAddress”: “02:42:0a:00:00:05”,
“IPv4Address”: “10.0.0.5/24”,
“IPv6Address”: “”
}
}

but i do seem to be able to:

ping linux -> windows using IP and hostname
ping windows -> linux using IP

I think hostname is not working because the hostname is resolving to 10.0.0.4 which i can’t ping, but i can ping 10.0.0.5. Any ideas why i have multiple IP addresses on the linux container? How do i get the hostname to resolve to the correct one?

root@2d7a95cdd145:/# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
51: eth0@if52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default
link/ether 02:42:0a:00:00:05 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.5/24 scope global eth0
valid_lft forever preferred_lft forever
inet 10.0.0.4/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:aff:fe00:5/64 scope link
valid_lft forever preferred_lft forever
53: eth1@if54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:12:00:03 brd ff:ff:ff:ff:ff:ff
inet 172.18.0.3/16 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe12:3/64 scope link
valid_lft forever preferred_lft forever