OCPBUGS-83492: Auto-append :ref suffix to additionalLayerStores in storage.conf #5888
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 534 lines diff across 6 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.376
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5888"
general
weight: 0.35
BhargaviGudi
Description
Automatically append
:refsuffix toadditionalLayerStorespaths when generatingstorage.conf.This allows users to provide clean paths in
ContainerRuntimeConfigwhile MCO automatically transforms them to include the:refsuffix in the generated/etc/containers/storage.confon nodes.Why
The
:refsuffix is required by containers/storage for reference-based layer resolution. Previously, we attempted to add validation in the API layer (openshift/api#2806) to require users to include the:refsuffix. However, this exposes an implementation detail in the user-facing API and makes it harder to use.The correct approach is to handle this transformation transparently in the MCO controller.
Changes
pkg/controller/container-runtime-config/helpers.go:
- Modified
updateStorageConfig()to append:refsuffix to alladditionalLayerStorespaths- Applies to ALL layer stores (not specific to any storage type)
pkg/controller/container-runtime-config/helpers_test.go:
- Updated test expectations to include
:refsuffix for all layer stores- Renamed test to "path with :ref suffix is not doubled" for clarity
Example
User creates ContainerRuntimeConfig:
MCO generates storage.conf:
Testing
All existing tests pass. Added new test case for
:refsuffix idempotency.Verified manually:
Step 1: Create ContainerRuntimeConfig
Created a ContainerRuntimeConfig with a clean path (no :ref suffix):
Step 2: Post-MCP Rollout Validation
After the MCP rollout completed, verified that :ref was automatically appended in storage.conf:
Result: MCO automatically appended the :ref suffix to the configured path.
Step 3: Functional Verification
Result: Lazy image pulling with snapshot reuse is working as expected.
Related PRs
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Additional layer store entries now automatically include the
:refsuffix when missing; entries already containing:refare preserved unchanged to ensure consistent storage path formatting.Tests
Added/updated tests to verify
:refis appended only when absent and not duplicated.<!-- end of auto-generated comment: release notes by coderabbit.ai -->