← Back to Pull requests

SPLAT-2703: Add read-only VMotion inventory planning for UPI clusters #228

Closed
unknown closed this pull request without merging on Nov 13, 2026 19:44 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 22:20 UTC
Author

Add the VMotion planning foundation for UPI clusters. Explicit VMotion selections now dispatch through eligibility checks and read-only inventory planning before the legacy MachineSet/CPMS path.

The planner:

  • Verifies cluster and node eligibility, VM identity, and machine ownership.

  • Resolves each VM’s source failure domain using vSphere resource-pool ownership, rejecting missing or ambiguous matches.

  • Verifies the source vCenter TLS certificate against the operator’s system trust roots.

  • Builds and reuses a frozen, sanitized plan using the effective failure-domain mapping and per-node placement data.
  • This PR does not submit VM shutdown, relocation, or power-on actions; the migration workflow and recovery enforcement remain follow-up work. For this release, topology.template remains required for every target failure domain, including VMotion, though relocation does not consume it.

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

    Summary by CodeRabbit

    New Features
    VMotion requests now require matching Hot or Cold selections for worker and control-plane roles, valid migration configuration, and eligible Nodes. Omitted selections and Recreate retain their existing behavior.
    The system checks VM identity, ownership, failure-domain mappings, and destination placement before creating a read-only plan. Plans preserve placement and scheduling details and block when frozen inputs change. Destination host selection remains with DRS; relocation and the full migration workflow are not yet supported.
    Documentation
    * Clarified VMotion eligibility, placement, ownership, plan contents, status reporting, and remaining implementation work, including certificate verification and handling uncertain submissions.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Planning review follow-up: approved B/C policy

  • 5d7e4dd50 — nested datacenters: derive the compute-resource and pool-owner boundary from the resolved datacenter inventory path. Preserve exact configured-path equality and isolation. The simulator regression reproduced the rejection before the fix, then discovered a real VM/owner with a fresh Finder under a tenant folder and rejected a real cross-datacenter resource.

  • 4f530a1bb — B, lifecycle and quiescence: check ownership before phase; reject uninitialized/unknown phases, inconsistent Running evidence, provisioning and deletion. Failed objects are historical candidates only after parent/remediation checks. Compare MachineSet/CPMS current intent, generation/status and actual children; retain settled zero-replica sets and Inactive CPMS. Resolve controller UID/name/kind/API identity and veto applicable remediation. An ownerless Failed Machine with native internal-only MHC remains eligible as residue because that native path skips it.

  • C, resolved-absent annotations: permit a parseable absent reference only after complete reads, unique identity, no other association/conflict, a non-terminating Node and settled B evidence. Preserve the annotation. Contradictory live identity and IPv4/IPv6 IP-only candidates are Indeterminate. Validate actual Kubernetes names, not just slash shape.

  • Re-read Node and Machine API eligibility after VM inventory before freezing. A regression reproduced a new phase-less Machine appearing during the inventory call and being missed by pre-call evidence; the fresh gate now blocks that candidate. Sequential reads remain observations, not atomic snapshots or fencing of other controllers.
  • Detailed policy, rationale, source revisions and qualification limits: docs/dev/vmotion-eligibility.md.

    Explicit scope decisions: engine-switch limitation A remains a documented deferred flaw. CAPI and API-authority handover are outside this release scope. This remains read-only planning; no VM actions, Machine-resource repair/adoption, annotation cleanup or execution reset is enabled.

    Verification after all changes: make test, make lint (0 issues), make build, focused controller and inventory race suites, and git diff --check pass. Generation produced no API/RBAC/bundle changes. A fresh review found no blocking defects; its inherited malformed-reference parser gap was reproduced and fixed to meet C. No actual cross-vCenter or maintenance-procedure qualification is claimed.

    The same planning commits are merged into dependent PR #231 without rewriting either published history; the combined executor branch passed the same checks.

    Diff: 586 lines (+439 / -147) across 7 files Reviewer: jcpowermac Review duration: 24323m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 586 lines diff across 7 files
    0.55
    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.381
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #228"
    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: 54.9% (MEDIUM) · Higher = larger blast radius
    54.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: 21.7% · Safe to merge
    21.7%