← Back to Pull requests

[Feature][Volcano] Populate SubGroupPolicy from Ray worker replicas #5249

Closed
unknown closed this pull request without merging on Sep 22, 2026 21:53 UTC
View on GitHub
unknown unknown commented on Sep 07, 2026 07:22 UTC
Author

Why are these changes needed?

A global Volcano minMember can be satisfied by surplus elastic CPU workers even when a GPU worker group is below its minimum. This PR populates PodGroup.spec.subGroupPolicy from existing Ray replica settings to express each worker group's minimum number of complete replicas, including multi-host replicas. No Ray API fields are added; volcano.sh/apis is updated to v1.15.2.

| Volcano field | Ray mapping |
| --- | --- |
| name / labelSelector.matchLabels | Worker group name / ray.io/group: <groupName> |
| subGroupSize | numOfHosts |
| minSubGroups | Autoscaling: minReplicas; otherwise: effective desired logical replicas |
| matchLabelKeys | Single-host: ray.io/worker-group-replica-index; multi-host: ray.io/worker-group-replica-name |

For example, minReplicas: 2 and numOfHosts: 2 require two complete two-Pod replicas, not merely four arbitrary Pods.

The head contributes one required single-Pod subgroup. Suspended worker groups and the RayJob submitter are excluded; active zero-minimum groups retain their policies. Policies synchronize alongside minMember and minResources for standalone RayClusters and follow the existing RayJob initialization and terminal-cleanup lifecycle.

Requirements and compatibility

  • Uses the existing, default-enabled RayMultiHostIndexing gate for replica identity labels; no new feature gate is added.

  • Requires a supporting Volcano scheduler and CRD for subgroup guarantees. Volcano v1.14+ CRDs store this field; live scheduling was validated with v1.15.2 and gang plugin options enabledSubJobReady, enabledSubJobPipelined, and enabledSubJobOrder enabled.

  • Older CRDs prune the field and retain global gang behavior. Each reconciliation then sends a redundant PodGroup PUT. Upgrade Volcano and its matching CRDs to use subgroup guarantees and avoid this overhead. We accept this overhead on older CRDs to avoid the long-term maintenance cost of capability detection, cached or persistent state, and upgrade invalidation/re-detection logic. Keeping this path stateless also allows policies to be persisted on the next reconciliation after a CRD upgrade without restarting KubeRay.

  • Existing top-level Volcano network-topology configuration retains legacy behavior without generated subgroup policies. Per-group topology configuration is outside this PR.
  • Related issue number

    Related to #4656; topology work in #4843 is outside this PR.

    Labels

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [x] Unit tests
    - [x] Manual tests
    - [ ] This PR is not tested :(

    Unit tests cover policy generation, synchronization, and legacy-CRD pruning; targeted tests, race checks, vet, and CI passed.

    On KIND with Volcano v1.15.2, KubeRay-equivalent PodGroups/Pods with minMember: 7, one head, four CPU Pods, and three GPU Pods remained Pending: the GPU group required two complete two-host replicas. Adding the missing GPU host allowed all nine Pods to run. This validates the scheduler contract; KubeRay's generation path is tested separately.

    Volcano v1.13.0 CRD checks confirmed pruning preserves global fields and an otherwise identical PUT leaves resourceVersion unchanged. Maintainer tests also verified legacy scheduling and policy adoption after a CRD upgrade (results).

    Diff: 455 lines (+341 / -114) across 5 files Reviewer: win5923 Review duration: 22470m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 455 lines diff across 5 files
    0.45
    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.366
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5249"
    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: 45.5% (MEDIUM) · Higher = larger blast radius
    45.5%
    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: 18.0% · Safe to merge
    18.0%