OCPBUGS-85529:Fix IPv6 prefix in MultiNetworkPolicy test (/32 → /64)#31407
OCPBUGS-85529:Fix IPv6 prefix in MultiNetworkPolicy test (/32 → /64)#31407weliang1 wants to merge 1 commit into
Conversation
The MultiNetworkPolicy IPv6 test has been failing ~2-5% of the time since introduction in May 2023 due to incorrect IPv6 prefix length. IPv6 addresses use /32 (regional allocation size) instead of /64 (standard LAN subnet). This causes L2 adjacency to fail, preventing pod-to-pod communication over the macvlan secondary network. Root cause: - With /32: Kernel believes entire 2001:db8::/32 block is local - Routing gets confused about L2 adjacency - No Neighbor Discovery Protocol (NDP) attempted - Connection fails immediately (0 ms timeout) With /64 (this fix): - All pods in same 2001:db8::/64 subnet - NDP resolves MAC addresses - Direct macvlan L2 communication succeeds - Test proceeds to policy enforcement validation The IPv4 variant uses correct /24 prefix and has 100% pass rate. Sippy data (release 5.0): - IPv6 test: 97.95% pass (3 failures / 146 runs) - IPv4 test: 100% pass (0 failures / 142 runs) References: - Original PR (introduced bug): openshift#27795 - Restoration PR (restored with bug): openshift#27927 - Jira: OCPBUGS-6917, OCPBUGS-13788 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughThe IPv6 multinetpolicy test now assigns ChangesIPv6 Multinetpolicy Test Inputs
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@weliang1: The label(s) DetailsIn response to this:
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-sigs/prow repository. |
|
@weliang1: GitHub didn't allow me to request PR reviews from the following users: dcbw. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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-sigs/prow repository. |
|
@weliang1: This pull request references Jira Issue OCPBUGS-85529, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
pre merge test passed. |
|
@weliang1: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Risk analysis has seen new tests most likely introduced by this PR. New tests seen in this PR at sha: 292b6a5
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: weliang1, zeeke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retest-required |
| C: mustParseIPAndMask("2001:db8::3/32"), | ||
| // Use /64 (standard IPv6 LAN subnet) - NOT /32 (regional allocation) | ||
| // All three pods must be in the same L2 subnet for macvlan connectivity | ||
| // Matches IPv4 pattern: /24 subnet contains multiple hosts |
There was a problem hiding this comment.
Someone reading this comment in the future is not going to understand why it says "NOT /32", so the comment becomes more confusing than helpful.
I'm not sure a comment is really helpful here. IPv6 subnets should basically always be /64, but if someone just copies the code from this test case then they'll get that automatically, and if they don't copy the code from this test case then they probably won't see any comment here...
// All three pods must be in the same L2 subnet for macvlan connectivity
That comment applies to the IPv4 test case too, so it should go before line 103. Except, it would be better to just redo the test so you can't screw that up... have just g.Entry("192.0.2.0/24", "2001:db8::/64") and then create pod IPs 1, 2, and 3 based on those subnets?
|
@weliang1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Summary
Fixes a 3-year-old test bug causing the MultiNetworkPolicy IPv6 test to fail ~2-5% of the time.
Problem
The test uses
/32prefix for IPv6 addresses instead of the correct/64:Root Cause
With
/32, the kernel believes the entire2001:db8::/32block is local, which confuses routing and prevents L2 adjacency detection. Pods cannot discover each other via NDP, so macvlan connectivity fails immediately.The IPv4 test correctly uses
/24(LAN subnet) and has 100% pass rate.Impact
Sippy data (release 5.0):
This is NOT a product bug — all components (Multus, Whereabouts, MultiNetworkPolicy, macvlan) work correctly. Only the test code is broken.
Fix