OCPBUGS-100366: Re-queue ContainerRuntimeConfig on status update failure #6415
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.68) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.68 · 407 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.068
Real PR Conversation Timeline
1 comments
"Review active on #6415"
general
weight: 0.35
QiWang19
<!--
If this is a bug fix, make sure your description includes "Fixes: #xxxx", or
"Closes: #xxxx"
Please provide the following information:
-->
Fixes: OCPBUGS-100366
- What I did
During SNO bootstrap, the ContainerRuntimeConfig controller's
syncStatusOnlyfunction silently swallows status write failures. When the status write fails with a 409 Conflict (caused by a concurrent finalizer patch bumping theresourceVersion), the function logs a warning but returnsnil. The workqueue considers the item done and never re-queues it. The CR is left without.status(observedGeneration=0whilegeneration=1), causing the render controller to loop forever on:"status for ContainerRuntimeConfig enable-crun-master is being reported for 0, expecting it for 1".Fixes:
1. Return
statusUpdateErrwhen original sync error isnil- so the item is re-queued and the status write succeeds on the next attempt.2. Read from API server instead of lister cache inside
syncStatusOnly'sRetryOnConflict- the informer cache may still have the oldresourceVersion, causing every retry to hit the same 409. Getting from the API server ensures each retry uses the latest object.3. Apply the same error-return fix to
syncCRIOCredentialProviderConfigStatusOnly- this function had the same silent-swallow pattern on its success path. Changed the return type toerrorso the workqueue can re-queue on status write failure.Note:
addAnnotation,popFinalizerFromContainerRuntimeConfig, andaddFinalizerToContainerRuntimeConfigalso use lister reads insideRetryOnConflictand have the same stale-cache risk. These are left as-is to keep the PR scoped to the reported bug; they can be addressed in a follow-up if desired.- How to verify it
TestStatusUpdateConflictRequeues— injects a 409 Conflict onUpdateStatusand verifiessyncHandlerreturns an error (fails without the fix, passes with it)container-runtime-configtests pass (no regressions)oc patch ctrcfg <name> --type=merge --subresource=status -p '{"status":{"observedGeneration":0,"conditions":[]}}', verify the controller recovers- Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
Fix ContainerRuntimeConfig controller silently swallowing status update failures, which could permanently block the render controller during SNO bootstrap.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Tests
<!-- end of auto-generated comment: release notes by coderabbit.ai -->