Skip to content

UPSTREAM: <carry>: OCPBUGS-39360: Fix ClusterIsIPv6() detection for dual-stack v6-primary clusters#2603

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
jluhrsen:fix-ClusterIsIPv6
Mar 19, 2026
Merged

UPSTREAM: <carry>: OCPBUGS-39360: Fix ClusterIsIPv6() detection for dual-stack v6-primary clusters#2603
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
jluhrsen:fix-ClusterIsIPv6

Conversation

@jluhrsen

@jluhrsen jluhrsen commented Feb 28, 2026

Copy link
Copy Markdown

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Summary by CodeRabbit

  • Tests
    • Cluster IP family (IPv4 or IPv6) is now automatically detected from the cluster configuration with improved error handling.

@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Feb 28, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@jluhrsen

Copy link
Copy Markdown
Author

/test e2e-openstack-dualstack-v6primary

@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@jluhrsen

Copy link
Copy Markdown
Author

/test e2e-openstack-dualstack-v6primary

@jluhrsen jluhrsen changed the title DNM/TEST: try to figure out v4/v6 before suites run OCPBUGS-39360: Fix ClusterIsIPv6() detection for dual-stack v6-primary clusters Mar 2, 2026
@openshift-ci-robot openshift-ci-robot added 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 Mar 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: This pull request references Jira Issue OCPBUGS-39360, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.20.z" instead

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:

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


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.

@jluhrsen

jluhrsen commented Mar 2, 2026

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Mar 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: This pull request references Jira Issue OCPBUGS-39360, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

Details

In response to this:

/jira refresh

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 2, 2026
@openshift-ci
openshift-ci Bot requested a review from anuragthehatter March 2, 2026 21:06
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: This PR has been marked as verified by https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_kubernetes/2603/pull-ci-openshift-kubernetes-master-e2e-openstack-dualstack-v6primary/2027840988675837952.

Details

In response to this:

/verified by https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_kubernetes/2603/pull-ci-openshift-kubernetes-master-e2e-openstack-dualstack-v6primary/2027840988675837952

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.

@jluhrsen

jluhrsen commented Mar 2, 2026

Copy link
Copy Markdown
Author

/retest-required

@jluhrsen

jluhrsen commented Mar 2, 2026

Copy link
Copy Markdown
Author

@benluddy @tkashem , could you help me with this PR please? do I not need any extra steps here (e.g., DROP/CARRY) since the change is in ./openshift-hack/ ?

I verified the fix with the openstack-dualstack-v6primary job. the 6 test failures I'm chasing:

: [sig-node] [FeatureGate:KubeletFineGrainedAuthz] [Beta] when calling kubelet API check /healthz enpoint is not accessible via nodes/configz RBAC expand_more	6s
: [sig-node] [FeatureGate:KubeletFineGrainedAuthz] [Beta] when calling kubelet API check /healthz enpoint is accessible via nodes/proxy RBAC expand_more	6s
: [sig-node] [FeatureGate:KubeletFineGrainedAuthz] [Beta] when calling kubelet API check /healthz enpoint is accessible via nodes/healthz RBAC expand_more	6s
: [sig-network] DNS should provide DNS for the cluster [Conformance] expand_more	10m5s
: [sig-network] DNS should resolve DNS of partial qualified names for services [LinuxOnly] [Conformance] expand_more	10m5s
: [sig-network] DNS should work with a search path containing an underscore and a search path with a single dot expand_more

they can be seen failing in this older job from this PR when I didn't have it right, and they are all passing now in the latest job.

@jluhrsen

jluhrsen commented Mar 2, 2026

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-techpreview-serial-1of2
/test e2e-openstack-dualstack-v6primary

@jluhrsen

jluhrsen commented Mar 3, 2026

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-runc
/test e2e-openstack-dualstack-v6primary

@jluhrsen
jluhrsen force-pushed the fix-ClusterIsIPv6 branch from 5297889 to f51e0f3 Compare March 4, 2026 06:12
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Mar 4, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@jluhrsen jluhrsen changed the title OCPBUGS-39360: Fix ClusterIsIPv6() detection for dual-stack v6-primary clusters UPSTREAM: <carry>: OCPBUGS-39360: Fix ClusterIsIPv6() detection for dual-stack v6-primary clusters Mar 4, 2026
@jacobsee

jacobsee commented Mar 4, 2026

Copy link
Copy Markdown
Member

/hold for #2523 please

@openshift-ci openshift-ci Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. labels Mar 9, 2026
testContext.IPFamily = "ipv6"
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't silently discard the errors... neither of these operations should fail, so return the error if they do.
otherwise lgtm

…imary clusters

  Detect cluster's primary IP family by querying kubernetes.default service
  ClusterIP instead of using HasIPv4/HasIPv6 flags. The previous logic
  incorrectly returned ipv4 for dual-stack v6-primary clusters because
  both HasIPv4 and HasIPv6 were true.

  This matches the upstream approach in test/e2e/e2e.go and fixes DNS tests
  that were querying for A records instead of AAAA records in v6-primary
  environments.
@jluhrsen
jluhrsen force-pushed the fix-ClusterIsIPv6 branch from f51e0f3 to 9bca251 Compare March 10, 2026 18:44
@openshift-ci-robot openshift-ci-robot added backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. and removed verified Signifies that the PR passed pre-merge verification criteria labels Mar 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 148a5b53-09bf-4c13-93c8-8ee3e55d3bbf

📥 Commits

Reviewing files that changed from the base of the PR and between ac14da2 and 9bca251.

📒 Files selected for processing (1)
  • openshift-hack/cmd/k8s-tests-ext/provider.go

Walkthrough

Changes the IP family detection in the test provider from static configuration-based determination to dynamic detection by querying the Kubernetes cluster's default service and examining its ClusterIP address type.

Changes

Cohort / File(s) Summary
IP Family Detection Refactoring
openshift-hack/cmd/k8s-tests-ext/provider.go
Replaces hard-coded IP family logic with dynamic detection via Kubernetes API. Adds imports for metav1 and utilnet, creates a client from loaded config, retrieves the default service, and determines IP family (ipv6/ipv4) based on the service's ClusterIP type. Includes error handling for client creation and service retrieval.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing ClusterIsIPv6() detection for dual-stack IPv6-primary clusters. It directly matches the core objective stated in the PR description and commit message.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Stable And Deterministic Test Names ✅ Passed File contains no Ginkgo test definitions; grep found no test name patterns. Changes implement IP family detection setup code, not test naming.
Test Structure And Quality ✅ Passed The file modified is a test framework initialization module without Ginkgo test blocks, so the check is not applicable and passes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@danwinship

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: This pull request references Jira Issue OCPBUGS-39360, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

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

Details

In response to this:

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Summary by CodeRabbit

  • Tests
  • Cluster IP family (IPv4 or IPv6) is now automatically detected from the cluster configuration with improved error handling.

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.

@jluhrsen

Copy link
Copy Markdown
Author

/retest-required

@bertinatto , do you think you could fix that unvalidated-commits label again please? I had to update this PR after Dan's review and it reverted your label change.

@bertinatto

Copy link
Copy Markdown
Member

/remove-label backports/unvalidated-commits

@jerpeter1

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci

openshift-ci Bot commented Mar 18, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, danwinship, jerpeter1, jluhrsen

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

The pull request process is described 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

@benluddy

Copy link
Copy Markdown

/remove-label backports/unvalidated-commits

@openshift-ci openshift-ci Bot removed the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Mar 18, 2026
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 19, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: This PR has been marked as verified by https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_kubernetes/2603/pull-ci-openshift-kubernetes-master-e2e-openstack-dualstack-v6primary/2027840988675837952.

Details

In response to this:

/verified by https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_kubernetes/2603/pull-ci-openshift-kubernetes-master-e2e-openstack-dualstack-v6primary/2027840988675837952

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.

@openshift-ci

openshift-ci Bot commented Mar 19, 2026

Copy link
Copy Markdown

@jluhrsen: 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/e2e-openstack-dualstack-v6primary 5297889 link false /test e2e-openstack-dualstack-v6primary
ci/prow/e2e-aws-ovn-runc 9bca251 link false /test e2e-aws-ovn-runc

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.

@jluhrsen

Copy link
Copy Markdown
Author

/retest-required

@openshift-merge-bot
openshift-merge-bot Bot merged commit a925ce0 into openshift:master Mar 19, 2026
23 of 24 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@jluhrsen: Jira Issue OCPBUGS-39360: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-39360 has not been moved to the MODIFIED state.

This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload.

Details

In response to this:

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR is related to:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Summary by CodeRabbit

  • Tests
  • Cluster IP family (IPv4 or IPv6) is now automatically detected from the cluster configuration with improved error handling.

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.

@jluhrsen

Copy link
Copy Markdown
Author

/cherry-pick release-4.21

@openshift-cherrypick-robot

Copy link
Copy Markdown

@jluhrsen: new pull request created: #2722

Details

In response to this:

/cherry-pick release-4.21

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants