[release-4.22] OCPBUGS-105447: fix nil pointer panic in IRI controller informer race - #6390
Conversation
The InternalReleaseImage controller's New() constructor registered informer event handlers before assigning the listers. When an informer is already started, AddEventHandler replays synthetic Add events on a separate goroutine, which could invoke isControlPlaneNode/isNodeReady before ctrl.nodeLister was assigned, causing a nil pointer panic. Move all lister and HasSynced assignments ahead of the AddEventHandler registrations (pure reordering, no logic change), and add defensive nil guards in isControlPlaneNode and isNodeReady that log a warning and return false when the nodeLister is not yet initialized. The guard warnings intentionally omit the node name to avoid logging potentially sensitive infrastructure identifiers. Add TestNewWithAlreadyStartedInformers, a regression test that starts and preloads the informers before calling New() to exercise the replayed-event path and assert construction completes without panicking. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-105432 has been cloned as Jira Issue OCPBUGS-105447. Will retitle bug to link to clone. 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. |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-105447, 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. |
|
/jira refresh |
|
@bfournie: This pull request references Jira Issue OCPBUGS-105447, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
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. |
|
/lgtm |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, zaneb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/label backport-risk-assessed |
|
/test ? |
|
/test e2e-agent-compact-ipv4-iso-no-registry |
|
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
/verified by ci/prow/e2e-agent-compact-ipv4-iso-no-registry |
|
@bfournie: This PR has been marked as verified by 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. |
3ca7121
into
openshift:release-4.22
|
@openshift-cherrypick-robot: Jira Issue Verification Checks: Jira Issue OCPBUGS-105447 Jira Issue OCPBUGS-105447 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
|
Fix included in release 4.22.0-0.nightly-2026-08-10-215205 |
This is an automated cherry-pick of #6385
/assign bfournie