Skip to content

[release-4.22] OCPBUGS-112731: fix(certs): normalize IP SANs to stop dual-stack KAS cert churn - #9496

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-9286-to-release-4.22
Sep 24, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-9286-to-release-4.22

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #9286

/assign openshift-ci-robot

OCPBUGS-77781: ValidateKeyPair compared cert IP SANs with raw byte
slices. After X.509 round-trip, IPv4 SANs are 4 bytes while desired IPs
from net.ParseIP are 16-byte IPv4-mapped, so dual-stack SANs mis-sorted
and falsely failed validation. CPO then resigned kas-server-crt every
reconcile, churning the kube-apiserver Deployment.

Normalize IPs with net.IP.To16() before compare. Add a unit test that
reconciles twice for ipv4-only and dual-stack and asserts the cert is
not regenerated.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ram Lavi <ralavi@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Detected clone of Jira Issue OCPBUGS-77781 with correct target version. Will retitle the PR to link to the clone.
/retitle [release-4.22] OCPBUGS-112731: fix(certs): normalize IP SANs to stop dual-stack KAS cert churn

Details

In response to this:

This is an automated cherry-pick of #9286

/assign openshift-ci-robot

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

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0336b3c5-cb18-4c5d-b2ca-e49018499a58

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

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

@openshift-ci openshift-ci Bot changed the title [release-4.22] OCPBUGS-77781: fix(certs): normalize IP SANs to stop dual-stack KAS cert churn [release-4.22] OCPBUGS-112731: fix(certs): normalize IP SANs to stop dual-stack KAS cert churn Sep 3, 2026
@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 Sep 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-112731, which is invalid:

  • 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 dependent Jira Issue OCPBUGS-112730 to be in one of the following states: MODIFIED, ON_QA, VERIFIED, but it is New 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:

This is an automated cherry-pick of #9286

/assign openshift-ci-robot

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 requested review from bryan-cox and muraee September 3, 2026 09:50
@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release 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 Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.73%. Comparing base (3004374) to head (f5ba6ef).
⚠️ Report is 19 commits behind head on release-4.22.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-4.22    #9496      +/-   ##
================================================
+ Coverage         36.71%   36.73%   +0.01%     
================================================
  Files               777      777              
  Lines             95484    95496      +12     
================================================
+ Hits              35061    35082      +21     
+ Misses            57580    57571       -9     
  Partials           2843     2843              
Files with missing lines Coverage Δ
support/certs/tls.go 66.76% <100.00%> (+3.82%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muraee

muraee commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: muraee, openshift-cherrypick-robot

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2026
@RamLavi

RamLavi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

/verified by TestReconcileSignedCertIdempotentWithDualStackIPs,@RamLavi

Pre-merge verified via unit test rather than e2e: the failure mode is a reconcile-time false diff on IP SAN encoding, which is deterministic in ValidateKeyPair and hard to assert reliably in e2e (would mainly show up as KAS churn over time). The unit test reconciles twice for IPv4-only and dual-stack and asserts the cert is not regenerated.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@RamLavi: This PR has been marked as verified by TestReconcileSignedCertIdempotentWithDualStackIPs,@RamLavi.

Details

In response to this:

/verified by TestReconcileSignedCertIdempotentWithDualStackIPs,@RamLavi

Pre-merge verified via unit test rather than e2e: the failure mode is a reconcile-time false diff on IP SAN encoding, which is deterministic in ValidateKeyPair and hard to assert reliably in e2e (would mainly show up as KAS churn over time). The unit test reconciles twice for IPv4-only and dual-stack and asserts the cert is not regenerated.

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.

@bryan-cox

Copy link
Copy Markdown
Member

/lgtm

clean backport

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-aks-external-oidc
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@RamLavi

RamLavi commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

/retest-required

@bryan-cox

Copy link
Copy Markdown
Member

/retest

@red-hat-konflux

Copy link
Copy Markdown
Contributor

All PipelineRuns for this commit have already succeeded. Use /retest <pipeline-name> to re-run a specific pipeline or /test to re-run all pipelines.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown

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

7 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 New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-112730 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-112730 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
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.

@RamLavi

RamLavi commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@RamLavi: This pull request references Jira Issue OCPBUGS-112731, which is valid.

7 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)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-112730 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-112730 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
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.

@RamLavi

RamLavi commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

/retest-required

1 similar comment
@RamLavi

RamLavi commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

/retest-required

@csrwng csrwng added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 22, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5f96792 and 2 for PR HEAD f5ba6ef in total

@RamLavi

RamLavi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

it seems that aws lanes are blocked until #9600 is merged

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d516aea and 1 for PR HEAD f5ba6ef in total

@RamLavi

RamLavi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

/retest-required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD b415604 and 0 for PR HEAD f5ba6ef in total

@RamLavi

RamLavi commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

/retest-required

failure seems related to cleanup, but tests passed

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/hold

Revision f5ba6ef was retested 3 times: holding

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 24, 2026
@csrwng

csrwng commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

/override ci/prow/e2e-aws-upgrade-hypershift-operator

@csrwng

csrwng commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

/override-sticky ci/prow/e2e-aws-upgrade-hypershift-operator

@openshift-ci

openshift-ci Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@csrwng: Overrode contexts on behalf of csrwng: ci/prow/e2e-aws-upgrade-hypershift-operator

Details

In response to this:

/override ci/prow/e2e-aws-upgrade-hypershift-operator

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.

@openshift-ci

openshift-ci Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@csrwng: Overrode contexts on behalf of csrwng: ci/prow/e2e-aws-upgrade-hypershift-operator

These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use /override-cancel to remove them.

Details

In response to this:

/override-sticky ci/prow/e2e-aws-upgrade-hypershift-operator

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.

@RamLavi

RamLavi commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

/hold cancel

retest was due to unrelated issue

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 24, 2026
@openshift-ci

openshift-ci Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: The following test 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-aws-upgrade-hypershift-operator f5ba6ef link true /test e2e-aws-upgrade-hypershift-operator

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 315dff3 into openshift:release-4.22 Sep 24, 2026
26 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Jira Issue Verification Checks: Jira Issue OCPBUGS-112731
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-112731 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

This is an automated cherry-pick of #9286

/assign openshift-ci-robot

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-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 4.22.0-0.nightly-2026-09-25-072652

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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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.

7 participants