Skip to content

OCPBUGS-74931: fix(hcco): gate image registry workaround to pre-4.20 releases - #7634

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:OCPBUGS-74931
Feb 9, 2026
Merged

OCPBUGS-74931: fix(hcco): gate image registry workaround to pre-4.20 releases#7634
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:OCPBUGS-74931

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Feb 4, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Fixes constant updates to the openshift-controller-manager-config ConfigMap in OCP 4.20+, which was causing openshift-controller-manager pods to restart every minute.

The OCM config update logic (which disabled the serviceaccount-pull-secrets controller when image registry managementState was Removed) is no longer needed because CPOv2 manages this ConfigMap in 4.20+. This PR removes that logic entirely from HCCO, preventing the unnecessary updates that trigger pod restarts.

Which issue(s) this PR fixes:

Fixes OCPBUGS-74931

Special notes for your reviewer:

  • The image registry reconciliation logic was extracted into a dedicated reconcileImageRegistry function to improve testability
  • The capability check is now performed at the call site in Reconcile, matching the pattern used for ingress capability
  • The TestReconcileOcmConfigChange test was updated to verify that OCM config remains unchanged for all platforms

Checklist:

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

🤖 Generated with Claude Code

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 4, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This pull request references Jira Issue OCPBUGS-74931, 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)

No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request.

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

Details

In response to this:

What this PR does / why we need it:

Fixes constant updates to the openshift-controller-manager-config ConfigMap in OCP 4.20+, which was causing openshift-controller-manager pods to restart every minute.

The OCM config update logic (which disables the serviceaccount-pull-secrets controller when image registry managementState is Removed) is only needed for releases < 4.20. CPOv2 manages this ConfigMap in 4.20+, so HCCO should not be modifying it.

This PR gates the OCM config update to only run on pre-4.20 releases, preventing the unnecessary updates that trigger pod restarts.

Which issue(s) this PR fixes:

Fixes OCPBUGS-74931

Special notes for your reviewer:

To enable unit testing of the image registry reconciliation logic, it was extracted from the main Reconcile method into a dedicated reconcileImageRegistry function. This refactoring does not change behavior - the capability check is now performed at the call site, matching the pattern used for ingress capability.

Checklist:

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

🤖 Generated with Claude Code

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 Feb 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

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.

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

  • 🔍 Trigger a full review
✨ 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.

@openshift-ci openshift-ci Bot added do-not-merge/needs-area do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 4, 2026
@openshift-ci

openshift-ci Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@bryan-cox

Copy link
Copy Markdown
Member Author

/test verify
/test unit

@openshift-ci openshift-ci Bot added the area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release label Feb 4, 2026
@openshift-ci

openshift-ci Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Feb 4, 2026
@bryan-cox

Copy link
Copy Markdown
Member Author

/test all

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@bryan-cox

Copy link
Copy Markdown
Member Author

/auto-cc

@openshift-ci
openshift-ci Bot requested review from csrwng and muraee February 5, 2026 11:30
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This pull request references Jira Issue OCPBUGS-74931, 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)

No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request.

Details

In response to this:

What this PR does / why we need it:

Fixes constant updates to the openshift-controller-manager-config ConfigMap in OCP 4.20+, which was causing openshift-controller-manager pods to restart every minute.

The OCM config update logic (which disabled the serviceaccount-pull-secrets controller when image registry managementState was Removed) is no longer needed because CPOv2 manages this ConfigMap in 4.20+. This PR removes that logic entirely from HCCO, preventing the unnecessary updates that trigger pod restarts.

Which issue(s) this PR fixes:

Fixes OCPBUGS-74931

Special notes for your reviewer:

  • The image registry reconciliation logic was extracted into a dedicated reconcileImageRegistry function to improve testability
  • The capability check is now performed at the call site in Reconcile, matching the pattern used for ingress capability
  • The TestReconcileOcmConfigChange test was updated to verify that OCM config remains unchanged for all platforms

Checklist:

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

🤖 Generated with Claude Code

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
bryan-cox force-pushed the OCPBUGS-74931 branch 2 times, most recently from b658c66 to 0227244 Compare February 5, 2026 14:44
@bryan-cox

Copy link
Copy Markdown
Member Author

/test verify
/test unit

Remove the OCM config update logic that disabled the
serviceaccount-pull-secrets controller when image registry
managementState was Removed. This logic caused constant updates to
the openshift-controller-manager-config ConfigMap, triggering
unnecessary OCM pod restarts every minute.

CPOv2 manages this ConfigMap in 4.20+, so HCCO should not modify it.

Changes:
- Remove OCM config update logic from image registry reconciliation
- Extract image registry reconciliation into dedicated function for testability
- Add unit tests for image registry reconciliation scenarios
- Update TestReconcileOcmConfigChange to verify OCM config is unchanged

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryan-cox

Copy link
Copy Markdown
Member Author

/test verify
/test unit

@muraee

muraee commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

/lgtm

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

Copy link
Copy Markdown

Scheduling required tests:
/test verify-deps

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-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@bryan-cox
bryan-cox marked this pull request as ready for review February 6, 2026 20:08
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2026
@bryan-cox

Copy link
Copy Markdown
Member Author

/verified later @YuLi517

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Feb 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: This PR has been marked to be verified later by @YuLi517.

Details

In response to this:

/verified later @YuLi517

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 a review from sjenning February 6, 2026 20:11
@openshift-ci

openshift-ci Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: 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-aks-4-21 6204f31 link true /test e2e-aks-4-21

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.

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@openshift-merge-bot
openshift-merge-bot Bot merged commit ceb16d3 into openshift:main Feb 9, 2026
22 checks passed
@bryan-cox
bryan-cox deleted the OCPBUGS-74931 branch February 9, 2026 17:29
@bryan-cox

Copy link
Copy Markdown
Member Author

/jira backport release-4.21,release-4.20

@openshift-ci-robot

Copy link
Copy Markdown

@bryan-cox: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.21
/cherrypick release-4.20

Details

In response to this:

/jira backport release-4.21,release-4.20

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

Copy link
Copy Markdown

@openshift-ci-robot: #7634 failed to apply on top of branch "release-4.20":

Applying: fix(hcco): remove OCM config update for image registry managementState
Using index info to reconstruct a base tree...
M	control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
M	control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources_test.go
Falling back to patching base and 3-way merge...
Auto-merging control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources_test.go
CONFLICT (content): Merge conflict in control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources_test.go
Auto-merging control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix(hcco): remove OCM config update for image registry managementState

Details

In response to this:

@bryan-cox: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.21,release-4.20

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.

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

Copy link
Copy Markdown

@openshift-ci-robot: new pull request created: #7684

Details

In response to this:

@bryan-cox: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.21
/cherrypick release-4.20

In response to this:

/jira backport release-4.21,release-4.20

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.

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

Copy link
Copy Markdown
Contributor

Fix included in accepted release 4.22.0-0.nightly-2026-02-17-112443

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 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 verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants