OCPBUGS-39539: clear rogue controller ownerReferences during merge - #1445
OCPBUGS-39539: clear rogue controller ownerReferences during merge#1445savio87 wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@savio87: This pull request references Jira Issue OCPBUGS-39539, which is invalid:
Comment 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe owner-reference merge now clears conflicting existing controller flags when a required controller reference is added. Tests cover both conflicting controller references and preserved non-controller references. ChangesOwner reference reconciliation
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change is localized to owner-reference merging and adds focused unit coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@savio87: This pull request references Jira Issue OCPBUGS-39539, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jiajliu@redhat.com), skipping review request. 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. |
|
Hi @savio87. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: savio87 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 |
|
This clears rogue controller ownerReferences that cause CVO to wedge with "only one reference can have Controller set to true" during reconciliation. The rogue ref is preserved — only its controller claim is demoted. Could a maintainer check and run /ok-to-test? Thanks! |
Summary
Fixes OCPBUGS-39539: CVO wedges with
Failing=Truewhen reconciling a CRD that has a rogueownerReferencewithcontroller: trueset by another operator (e.g. OLM).The Kubernetes API rejects updates when two ownerReferences both claim
controller: true. ThemergeOwnerRefsfunction was additive-only — it never cleared conflicting controller flags on existing refs, so the rogue ref persisted alongside CVO's own controller ref, causing the update to fail indefinitely.This fix adds a post-merge pass: when a required ownerReference has
Controller=true, any existing ownerReference (not in the required set) that also hasController=truegets itsControllerfield cleared. The rogue reference itself is preserved — only its controller claim is demoted.Test plan
Controller=trueref is cleared when CVO's required ref claims controllerControllerare left untouchedTestMergeOwnerRefstests passSummary by CodeRabbit