← Back to Pull requests

MCO-2334: Implement AWS bootimage updates on CAPI #6447

Closed
unknown closed this pull request without merging on Nov 04, 2026 19:41 UTC
View on GitHub
unknown unknown commented on Aug 24, 2026 17:14 UTC
Author

- What I did

This PR implements boot image updates for CAPI MachineSets and MachineDeployments on AWS, building on the status population work in #6469.

MAPI MachineSets migrated to CAPI authority are skipped by the MAPI reconciler and handled through the CAPI path instead. CAPI informers are dynamically wired on AWS when ManagedBootImagesAWSCAPI is enabled, with a bounded cache sync timeout to avoid blocking MAPI/CPMS workers. AWS reconciliation resolves the target AMI (standard, marketplace, ROSA) and patches the referenced AWSMachineTemplate via server-side apply.

Skew enforcement in syncAll now aggregates skipped/errored counts across MAPI, CPMS, and CAPI resources before recording the cluster boot image version. Degraded condition reporting includes CAPI sync errors. RBAC was updated for CAPI resources in openshift-cluster-api. A design doc is included covering the architecture, enrollment model, and enforcement semantics.

- How to verify it

New unit tests cover the CAPI reconciliation paths. Existing MAPI/CPMS bootimage e2e tests should be retested for regressions.

Testing CAPI update path:

  • Install an AWS cluster in TechPreview mode - this will only have CAPI MachineSets.

  • Clone an existing infra template with an old AMI value appropriate for the cluster.

  • Edit one of the CAPI machinesets to reference the new infra template you created.

  • The MCO should attempt to update and reconcile the machineset to reference a new infra template with the new bootimage(it may re-use one of the install time ones as well).
  • Testing the CAPI/MAPI migration path:

  • Install an AWS cluster in non TechPreview mode and transition it to TechPreview

  • Next, edit the spec.authoritativeAPI field in the MAPI MachineSet to ClusterAPI; this will begin the conversion process of creation of a CAPI MachineSet based on the MAPI MachineSet. The process is complete when the status.authoritativeAPI states ClusterAPI.

  • The MCO should immediately begin to reconcile; but it should skip over the MAPI resource and only reconcile the CAPI resource instead. The CAPI update test process above can be used to test if an update successfully happens.
  • The bootimage skew enforcement version fields should be updated accordingly(including AWS marketplace cases) in both scenarios.

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

    Summary by CodeRabbit

    New Features
    Boot image updates now support AWS-backed Cluster API MachineSets and MachineDeployments, including their infrastructure templates.
    During Machine API migration, reconciliation respects which API manages each machine resource.
    Marketplace image version tracking includes supported Cluster API resources.
    Improvements
    Degraded status aggregates synchronization errors across supported machine resources.
    Boot image version tracking considers versions across MAPI and CAPI resources.
    AWS AMI updates use consistent resolution for standard, Marketplace, and ROSA images.
    Documentation
    Added a design document covering boot image reconciliation for Cluster API resources.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 410 lines (+307 / -103) across 5 files Reviewer: yuqi-zhang Review duration: 103826m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 410 lines diff across 5 files
    0.50
    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.360
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #6447"
    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: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    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: 19.7% · Safe to merge
    19.7%