New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SCTP default-deny test #110395
Fix SCTP default-deny test #110395
Conversation
The test is about SCTP and the accessed service only forwarded SCTP traffic to the server Pod but the client Pod used TCP protocol, so the test traffic never reached the server Pod and the test NetworkPolicy was never enforced, which lead to test success even if the default-deny policy was implemented wrongly. In some cases it may got failure result if there was an external server having same IP as the cluster IP and listening to TCP 80 port. Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
besides the protocol thing, how can not be a failure if there is a deny-all? |
The test client Pod accessed TCP/80 port of the service while kube-proxy (or similar proxies) only proxied SCTP/80 traffic. The traffic didn't reach the backend Pod and was routed to external network. If there is an server configured with this IP, the test would be a failure (it got response). I found this issue because of this case. Besides, even when the test is a success, it's not because of the enforcement of the deny-all policy, but because the traffic was routed to external network and dropped there. |
wow, what are the odds? so you have an overlapping network with connectivity and the packet unfortunately hits the other network /test pull-kubernetes-e2e-ubuntu-gce-network-policies
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, tnqn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yes, I guess it's normal that the underlay network has overlapping with the default service CIDR as the former could use 10.0.0.0/8 and the latter is 10.96.0.0/12. When the test failed, the allocated service IP was "10.110.83.242", which looked like a very normal priviate IP and it was indeed used by a server in my corporate network. |
/hold I'm holding just to check that the job that test the network policies doesn't fail, it is not required and we can merge with it failing pull-kubernetes-e2e-ubuntu-gce-network-policies |
/hold cancel |
What type of PR is this?
/kind cleanup
/kind flake
What this PR does / why we need it:
The test is about SCTP and the accessed service only forwarded SCTP traffic to the server Pod but the client Pod used TCP protocol, so the test traffic never reached the server Pod and the test NetworkPolicy was never enforced, which lead to test success even if the default-deny policy was implemented wrongly. In some cases it may got failure result if there was an external server having same IP as the cluster IP and listening to TCP 80 port.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: