← Back to Pull requests

OCPBUGS-100366: Re-queue ContainerRuntimeConfig on status update failure #6415

Closed
unknown closed this pull request without merging on Sep 21, 2026 18:39 UTC
View on GitHub
unknown unknown commented on Aug 18, 2026 04:46 UTC
Author

<!--
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 syncStatusOnly function silently swallows status write failures. When the status write fails with a 409 Conflict (caused by a concurrent finalizer patch bumping the resourceVersion), the function logs a warning but returns nil. The workqueue considers the item done and never re-queues it. The CR is left without .status (observedGeneration=0 while generation=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 statusUpdateErr when original sync error is nil - 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's RetryOnConflict - the informer cache may still have the old resourceVersion, 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 to error so the workqueue can re-queue on status write failure.

Note: addAnnotation, popFinalizerFromContainerRuntimeConfig, and addFinalizerToContainerRuntimeConfig also use lister reads inside RetryOnConflict and 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 on UpdateStatus and verifies syncHandler returns an error (fails without the fix, passes with it)

  • All existing container-runtime-config tests pass (no regressions)

  • Deploy on a 5.0 cluster, create a ContainerRuntimeConfig, simulate stuck status with 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

  • Status updates now use the latest resource state, preventing stale updates.

  • Status update failures are reported instead of being silently ignored.

  • Conflicts during status updates now return an error so the operation can be retried.

  • Original synchronization errors are preserved when applicable.

  • Runtime configuration status update failures now propagate correctly.
  • Tests

  • Added regression coverage for status update conflicts and related API interactions.

  • <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 407 lines (+305 / -102) across 5 files Reviewer: QiWang19 Review duration: 49792m
    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
    0.68
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 68% (HIGH) · Higher = larger blast radius
    68%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.4% · Safe to merge
    29.4%