Skip to content

fix(api): [release-4.21] OCPBUGS-84303: add IPv6 OVN join subnet config to prevent dual-stack routing collision#8456

Open
orenc1 wants to merge 1 commit intoopenshift:release-4.21from
orenc1:cherry-pick-8421-to-release-4.21
Open

fix(api): [release-4.21] OCPBUGS-84303: add IPv6 OVN join subnet config to prevent dual-stack routing collision#8456
orenc1 wants to merge 1 commit intoopenshift:release-4.21from
orenc1:cherry-pick-8421-to-release-4.21

Conversation

@orenc1
Copy link
Copy Markdown
Contributor

@orenc1 orenc1 commented May 7, 2026

Cherry-pick of #8421 to release-4.21.

On KubeVirt dual-stack hosted clusters, the guest OVN-Kubernetes cluster shares the same default IPv6 join subnet (fd98::/64) as the management cluster. When external IPv6 LoadBalancer traffic is SNAT'd to a join switch IP, the guest cluster intercepts the response because both clusters own the same fd98::/64 range, causing a routing black hole.

This fix:

  • Defaults the guest cluster's IPv6 OVN join subnet to fd99::/64 for KubeVirt hosted clusters, avoiding the collision automatically
  • Adds OVNIPv6Config API type allowing users to explicitly configure IPv6 internalJoinSubnet and internalTransitSwitchSubnet
  • Extends CIDR overlap validation to cover IPv6 OVN subnets including the implicit KubeVirt default (fd99::/64)
  • Adds unit tests for all new IPv6 validation and reconciliation logic

Assisted-by: Claude Opus 4 (via Cursor)

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@orenc1: This pull request references Jira Issue OCPBUGS-84303, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "5.0.0" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-84303 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Cherry-pick of #8421 to release-4.21.

On KubeVirt dual-stack hosted clusters, the guest OVN-Kubernetes cluster shares the same default IPv6 join subnet (fd98::/64) as the management cluster. When external IPv6 LoadBalancer traffic is SNAT'd to a join switch IP, the guest cluster intercepts the response because both clusters own the same fd98::/64 range, causing a routing black hole.

This fix:

  • Defaults the guest cluster's IPv6 OVN join subnet to fd99::/64 for KubeVirt hosted clusters, avoiding the collision automatically
  • Adds OVNIPv6Config API type allowing users to explicitly configure IPv6 internalJoinSubnet and internalTransitSwitchSubnet
  • Extends CIDR overlap validation to cover IPv6 OVN subnets including the implicit KubeVirt default (fd99::/64)
  • Adds unit tests for all new IPv6 validation and reconciliation logic

Assisted-by: Claude Opus 4 (via Cursor)

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes

Special notes for your reviewer:

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 56a3818d-afe3-473c-b5ba-7ddb239f7331

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@orenc1 orenc1 changed the title fix(api): OCPBUGS-84303: add IPv6 OVN join subnet config to prevent dual-stack routing collision fix(api): [release-4.21] OCPBUGS-84303: add IPv6 OVN join subnet config to prevent dual-stack routing collision May 7, 2026
@openshift-ci openshift-ci Bot requested review from bryan-cox and muraee May 7, 2026 07:58
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: orenc1
Once this PR has been reviewed and has the lgtm label, please assign muraee for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels May 7, 2026
…ual-stack routing collision

Cherry-pick of openshift#8421 to release-4.21.

On KubeVirt dual-stack hosted clusters, the guest OVN-Kubernetes cluster
shares the same default IPv6 join subnet (fd98::/64) as the management
cluster. When external IPv6 LoadBalancer traffic is SNAT'd to a join
switch IP, the guest cluster intercepts the response because both
clusters own the same fd98::/64 range, causing a routing black hole.

This fix:
- Defaults the guest cluster's IPv6 OVN join subnet to fd99::/64 for
  KubeVirt hosted clusters, avoiding the collision automatically
- Adds OVNIPv6Config API type allowing users to explicitly configure
  IPv6 internalJoinSubnet and internalTransitSwitchSubnet
- Extends CIDR overlap validation to cover IPv6 OVN subnets including
  the implicit KubeVirt default (fd99::/64)
- Adds unit tests for all new IPv6 validation and reconciliation logic

Signed-off-by: Oren Cohen <ocohen@redhat.com>
Assisted-by: Claude Opus 4 (via Cursor)
Co-authored-by: Cursor <cursoragent@cursor.com>
@orenc1 orenc1 force-pushed the cherry-pick-8421-to-release-4.21 branch from 91b9354 to 37ca2cc Compare May 7, 2026 11:42
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

@orenc1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 37ca2cc link true /test verify
ci/prow/e2e-kubevirt-aws-ovn-reduced 37ca2cc link true /test e2e-kubevirt-aws-ovn-reduced

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants