Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NodeNetworkPolicy e2e test failure
In NodeNetworkPolicy e2e tests, we have the following cases: - Node to Node. We deploy two hostNetwork Pods on different Nodes. - Node to Pods. We deploy a hostNetwork Pod on a Node and two non-hostNetwork Pods on different Nodes. For the case of Node to Pods, after creating test Pods, a full mesh probing is run to ensure that all Pods can be reachable from each other. However, the UDP probing from a non-hostNetwork Pod, using the Node external IP that is the hostNetwork Pod as destination IP, to the hostNetwork Pod within on the same Node will get a failure. The reason is that due to UDP's connectionless nature, the reply traffic may use a source IP address determined by routing decisions or outgoing interfaces, which means that the local Antrea gateway IPs will be chosen as source IP address, rather than the destination IP address used in request traffic. As a result, the probing will get a failure because the source IP address of reply traffic is unexpected. To resolve the issue, we ensure that the probing from non-hostNetwork Pod to hostNetwork Pod deployed in the same Node uses the local Antrea gateway IPs as the destination IP, rather than the hostNetwork Pod IP (the Node external IP). Signed-off-by: Hongliang Liu <[email protected]>
- Loading branch information