← Back to Pull requests

OCPBUGS-132754: Handle restrictive policies for layered OS updates #6670

Closed
unknown closed this pull request without merging on Oct 26, 2026 14:07 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 16:03 UTC
Author

Fixes: OCPBUGS-132754

Add exact temporary containers-storage exceptions for layered imports and local rebases.

Preserve the host policy and cover tag- and digest-based references with regression tests.

What I did
Added exact, temporary containers-storage policy exceptions for layered OS imports and local rebases, without modifying the host policy. Added support and regression coverage for tag-based import references and digest-based local rebases, including cleanup.

How to verify it

  • go test ./pkg/daemon -run 'Test(CreateLayeredImportPolicy_TaggedOSImageWithRestrictivePolicy|PatchPoliciesForContainerStorage_RestrictivePolicy|BuildTransportPolicyKey|ContainerStoragePolicyRequiresPatch)$' -count=1
  • go test ./pkg/daemon -count=1 — passed.
  • all cluster upgrade paths should pass
  • Description for the changelog
    Support layered OS updates with restrictive image policies using an exact, temporary per-image exception, while preserving the host policy.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Summary

    New Features
    Layered container image imports can now use a temporary, image-specific exception when a restrictive container-storage policy would otherwise block the import.
    The temporary policy is applied only during the import and cleaned up afterward; the host policy remains unchanged.
    Bug Fixes
    Policy exceptions preserve existing rules and avoid incomplete or overly broad entries.
    Improved validation and error reporting for image references, metadata, and Podman access.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 216 lines (+162 / -54) across 2 files Reviewer: yuqi-zhang Review duration: 7083m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 216 lines diff across 2 files
    0.37
    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%
    60%
    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.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6670"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 14.5% · Safe to merge
    14.5%