Bingshen Wang
Bingshen Wang
@hackerain @crazytaxii Kube-proxy的 iptables 模式是可以访问通的 两个对比下来发现的区别是在: __xfrm_policy_check -> nf_nat_decode_session 取到的flow 信息的差异 * iptables中能取到原始的 flow的 src ip和 dst ip,然后在xfrm_policy_lookup 就能找到 raven 设置的规则 * ipvs 中取到的flow 信息只有 dst ip 是对的,src ip 不对,然后在后续的xfrm_policy_lookup时就找不到规则,从而增加了/proc/net/xfrm_stat中的XfrmInNoPols的计数...
ipvs 和 ipsec 一起使用的时候应该都有这种问题
related issues: https://github.com/flannel-io/flannel/issues/1131 https://github.com/strongswan/strongswan/discussions/1605
@hackerain 这样的话要求了上面的 CNI 网络必须是 overlay 的了,很多 flannel和 calico 的用户有的是 bgp 的方式就没办法支持了。raven 尽量做到对 CNI 的模式无要求。
> @BSWANG can you file a PR against https://github.com/containernetworking/cni.dev to document this please? `cni.dev` PR https://github.com/containernetworking/cni.dev/pull/110
The pod ip can be route in vpc, so SNAT is not needed for terway pod.
看起来应该是机器上有socket泄露, 可以看看netstat -nap命令的输出吗?
@rhinoceros Pls run with root account or use `sudo`.
@rhinoceros 感谢
@readlnh 赞,方便的话可以把适配代码提交PR到项目中,感谢!