我已经成功地创建主机和桥接模式马拉松的应用程序没有问题,并用l4lb和马拉松磅收留他们代理的工作。这一切都没有问题。DC/OS虚拟网络不能跨
我现在试图使用用户模式网络,使用默认的“DCOS” 9.0.0.0/8网络。在这种模式下,我的应用程序只能与同一个代理上的其他容器进行通信。主机操作系统只能与自己托管的容器进行通信。看起来,节点不能在虚拟网络上相互路由流量。
为了测试我使用泊坞窗“nginx的:高山”的容器,与2分的情况下,在不同的主机。他们的IP是9.0.6.130和9.0.3.130。没有L4LB或Marathon-LB配置,没有服务端点,没有端口暴露在主机网络上。基本上是:
"container": {
"docker": {
"image": "nginx:alpine",
"forcePullImage": false,
"privileged": false,
"network": "USER"
}
},
"labels": null,
"ipAddress": {
"networkName": "dcos"
},
}
在其中的一个壳,我有:
/ # ip addr list | grep 'inet 9'
inet 9.0.6.130/25 scope global eth0
/# nc -vz 9.0.6.130:80
9.0.6.130:80 (9.0.6.130:80) open
/# nc -vz 9.0.3.130:80
nc: 9.0.3.130:80 (9.0.3.130:80): Operation timed out
/# traceroute to 9.0.3.130 (9.0.3.130), 30 hops max, 46 byte packets
traceroute to 9.0.3.130 (9.0.3.130), 30 hops max, 46 byte packets
1 9.0.6.129 (9.0.6.129) 0.006 ms 0.002 ms 0.001 ms
2 44.128.0.4 (44.128.0.4) 0.287 ms 0.272 ms 0.100 ms
3 * * *
4 * * *
从另一面:
/ # ip addr list | grep 'inet 9'
inet 9.0.3.130/25 scope global eth0
/# nc -vz 9.0.3.130:80
9.0.3.130:80 (9.0.3.130:80) open
/# nc -vz 9.0.6.130:80
/# traceroute 9.0.6.130
traceroute to 9.0.6.130 (9.0.6.130), 30 hops max, 46 byte packets
1 9.0.3.129 (9.0.3.129) 0.005 ms 0.003 ms 0.001 ms
2 44.128.0.7 (44.128.0.7) 0.299 ms 0.241 ms 0.098 ms
3 * * *
4 * * *
有趣的是,我可以ping我认为应该是下一个(虚拟)跳和所有中间跳,尽管traceroute没有显示它。唯一不能ping的是终端容器的虚拟IP。 (这些来自其中一个容器)
64 bytes from 44.128.0.7: seq=0 ttl=63 time=0.269 ms
64 bytes from 44.128.0.4: seq=0 ttl=64 time=0.094 ms
64 bytes from 9.0.3.129: seq=0 ttl=64 time=0.072 ms
64 bytes from 9.0.6.129: seq=0 ttl=63 time=0.399 ms
PING 9.0.6.130 (9.0.6.130): 56 data bytes (no response)
任何想法?