forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (antrea-io#6172)
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 or SCTP probing from a non-hostNetwork Pod, using the Node external IP (the IP in the hostNetwork Pod object) 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, when the target Pod is a hostNetwork Pod, we use 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
1 parent
142a9e7
commit 7acc1c2
Showing
3 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters