Skip to content

feat(validator): GPU allocation capability inspection and hardening - #1620

Merged
yuanchen8911 merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:issue-1327-capability-validators
Jul 8, 2026
Merged

yuanchen8911 merged 1 commit into
NVIDIA:mainfrom
yuanchen8911:issue-1327-capability-validators

Conversation

@yuanchen8911

@yuanchen8911 yuanchen8911 commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Foundation PR (1 of 3) for the GPU allocation policy contract in #1327:
capability inspection (validators/internal/allocmode: what does the
cluster actually expose — device-plugin scalar allocatable vs full-GPU
gpu.nvidia.com DeviceClass with usable node-local ResourceSlices, and which
resource.k8s.io API version), standalone automatic selection (with no
recipe context, secure-accelerator-access and inference-perf exercise the
detected mechanism; dra-support validates the DRA capability itself and
never falls back), and validator execution hardening (read-error
classification, watch-based waits, cleanup lifecycle, failure-path evidence).

Interim behavior, by design: until the stacked follow-up PR lands, checks
select by detected capability (DRA preferred where usable). The follow-up
(policy resolution from hydrated recipe values + fail-closed
configuration-vs-state gates) converts selection to configuration-driven;
this PR's detector becomes its verification half, and automatic selection
remains permanently for recipe-less standalone runs. Preferred merge order is
back-to-back with that follow-up; merging this PR alone is a maintainer call
accepting the interim capability-selected behavior (it independently fixes
the live false failure where validators hard-require gpu.nvidia.com and
fail supported ComputeDomain-only clusters).

This PR deliberately does NOT include: recipe-configured allocation
selection (follow-up PR), full DRA-only support (experimental; graduation
checklist in #1327), or KEP-5004 mapped-extended-resource validation
(dra-extended-resource, future). Scope is limited to capability inspection, standalone selection, and validator hardening; review corrections land as narrow fixes within that boundary.

Motivation / Context

The NVIDIA DRA driver's supported co-installation with the standard device plugin — AICR's production configuration — is ComputeDomain-only (its chart rejects resources.gpus.enabled=true alongside the standard device plugin by default until KEP-5004 is GA; current AICR values bypass that guard with gpuResourcesEnabledOverride=true, producing the transitional dual-advertised configuration), so managed clusters commonly expose no gpu.nvidia.com DeviceClass — yet AICR's secure-accelerator-access/dra-support checks and the inference-perf workload hard-require it. The CNCF secure_accelerator_access requirement explicitly permits mediation by "device plugin or DRA". This is PR 1 of 3 from the plan in #1327: PR 2 (stacked on this branch) adds recipe-configured allocation-policy resolution and verification; PR 3 then flips the production default and carries ALL kai-scheduled workload conversions (the four static manifests kept in DRA form here, UAT phase_serve, and docs/contributor/uat.md), landing atomically with the flip. Live validation on a dual-advertised GB200/EKS cluster (see Testing) proved conformance works on both today's dual-advertised clusters and post-flip clusters, and that inference-perf requires mode dispatch there: kai-scheduler v0.14.1 marks nodes DRA-only when it attributes raw spec.nodeName ResourceSlices from "gpu"-named drivers to them (unvalidated — its counting ignores pool completeness, device taints, and non-nodeName topologies) and rejects scalar device-plugin GPU requests there (pkg/scheduler/api/node_info/node_info.go:310, upstream-marked "temporary fix"), so device-plugin-only workers can never schedule on dual-advertised nodes — hence the capability-driven worker wiring. The same gap was fixed in the upstream CNCF conformance test in kubernetes-sigs/ai-conformance#75, and the capability-probe semantics here mirror that implementation (complete current-generation ResourceSlice pools, inline device-taint filtering, all four slice topologies, Ready/schedulable node resolution).

Fixes: N/A (partial — first of three PRs for #1327)
Related: #1327, kubernetes-sigs/ai-conformance#75

Type of Change

  • New feature (non-breaking change that adds functionality)

Component(s) Affected

  • Validator (pkg/validator) — production changes live under validators/** (validator images), plus pkg/evidence/cncf descriptions
  • Other: validator catalog images (validators/conformance, validators/performance), demo/evidence/test manifests

Implementation Notes

Shared capability probe (validators/internal/allocmode, bridged into the conformance package by allocmode_bridge.go aliases): allocmode.Detect discovers the served resource.k8s.io version (v1, v1beta2, v1beta1 — the set the driver chart accepts) and reads DeviceClasses/ResourceSlices at that version via the dynamic client, normalizing the v1beta1 per-device basic wrapper for taints and topology. DRA usable = gpu.nvidia.com DeviceClass exists AND a ResourceSlice from that driver, in a complete current-generation pool (obsolete generations and pools with missing/inconsistent resourceSliceCount ignored — matching the scheduler's allocator), advertises ≥1 device without inline NoSchedule/NoExecute taints, reachable from a Ready, schedulable node (all four slice topologies resolved; the slice validation is driver-parameterized and applied to ComputeDomain slices too). Device plugin usable = Ready, schedulable node with scalar allocatable nvidia.com/gpu — per Kubernetes KEP-5004 semantics such a node is device-plugin-backed even when a DeviceClass maps the extended resource (DRA serves the request only where scalar allocatable is absent), so the spec.extendedResourceName mapping is recorded as attribution evidence rather than clearing usability (DeviceClass-list errors other than "API not served" still propagate, fail closed). Dual advertisement (DRA slices + scalar allocatable on the same nodes) logs a warning about GPU over-admission — promotion of the deterministic recipe-level one-advertiser invariant to an error is deliberately deferred to PR 3, since today's default recipes produce exactly that configuration (broader runtime detector warnings remain a separate follow-up). NodeSelector matching uses a minimal local matcher (k8s.io/component-helpers is not vendored) with Kubernetes NotIn absent-key semantics; Gt/Lt fail closed, documented.

secure-accelerator-access: dispatches on the probe — DRA path when usable; otherwise a device-plugin isolation test (GPU via resources.limits, no resourceClaims, no hostPath /dev/nvidia*). Both modes run the same three isolation assertions, including a multi-container subtest (only the first container is granted the GPU; an identical sibling container must see no accelerator — upstream kubernetes-sigs/ai-conformance#75 parity). The granted container must observe exactly one GPU (nvidia-smi UUID count, logged as evidence) — a container exposing every GPU, or only control devices like /dev/nvidiactl, now fails; request-less negative probes stay device-file based. The device-plugin test pod uses required node affinity over all detected scalar-capacity nodes (the scheduler picks a free one), keeping device-plugin attribution deterministic even under a KEP-5004 mapping; DRA test claims are built in the served API version's shape (v1beta1 uses direct request fields, not exactly). The previous hard failure for pods using nvidia.com/gpu is now scoped to the DRA-mode test only, diagnostics are mechanism-neutral, and the exercised mode is recorded in check artifacts.

dra-support: never falls back to the device plugin. Scoping comes from the recipe: skip only when the recipe's componentRefs exclude or disable nvidia-dra-driver-gpu (nil refs fall back to live-driver detection for standalone runs); when the recipe enables the driver, a missing Deployment/DaemonSet or DRA API is a failure — a failed installation can no longer skip validation. Driver probes (pod inventory, controller Deployment, kubelet-plugin DaemonSet) target the namespace resolved from the enabled nvidia-dra-driver-gpu componentRef — e.g. the Talos mixin's privileged-nvidia-dra-driver-gpu override — falling back to the default nvidia-dra-driver when the ref carries no namespace or in standalone runs (no componentRefs); the probed namespace and its source are recorded as check evidence. ResourceSlices from any NVIDIA driver count only after the same pool-generation/completeness/taint/topology validation as GPU slices (compute-domain.nvidia.com suffices when it validates). The API gate accepts any served resource.k8s.io version (v1, v1beta2, v1beta1 — matching the driver chart), validating slices via the dynamic client on beta-only clusters (K8s 1.32/1.33); the behavioral full-GPU allocation subtest runs on any served version (version-correct claim shapes) whenever full-GPU DRA is usable. The behavioral GPU-allocation subtest runs only when full-GPU DRA is usable, otherwise recorded as not-applicable; behaviorally exercising the MNNVL ComputeDomain→ResourceClaimTemplate→IMEX flow is tracked as follow-up #1649.

inference-perf: worker GPU wiring is mode-dispatched NODE-LOCALLY on the shared capability probe (validators/internal/allocmode, extracted verbatim from the conformance package so both validator binaries share one detector) and supports exactly two GPU allocation configurations — the two states real AICR clusters occupy: (1) node-local gpu.nvidia.com ResourceSlices (dual-advertised, today's default): workers bind a ResourceClaimTemplate (ExactCount=1 per worker; created at the probe's SERVED resource.k8s.io version via allocmode.GVRAt, with a v1beta1-shaped template for clusters without exactly: — built-in recipes floor K8s 1.34/v1, so the beta paths are reachable only through custom validation catalogs) — mandatory because kai-scheduler rejects scalar GPU requests on nodes to which it attributes raw spec.nodeName ResourceSlices from "gpu"-named drivers (see Motivation) — and the worker count sizes from the chosen node's VALIDATED DRA device count (Mode.DRANodeDevices), never scalar allocatable, which on dual-advertised nodes can differ and would oversize; a node bearing raw node-local gpu.nvidia.com slices AICR could NOT validate is ineligible for plugin wiring (kai would reject scalar pods there) and the no-eligible-node fail-fast names it. (2) ComputeDomain-only / no full-GPU slices (the driver-supported, post-PR-3 configuration): resources.limits["nvidia.com/gpu"] is injected on worker main containers, requiring no gpu.nvidia.com DeviceClass, sized from scalar allocatable. Everything outside those two states fails fast with ErrCodeInvalidRequest and an actionable message instead of guessing: full-GPU ResourceSlices from a non-NVIDIA "gpu"-named driver, allocated ResourceClaims requesting a non-NVIDIA "gpu"-named DeviceClass (kai classifies claim demand by the Exactly request's class name — its only processed request shape — independent of the backing driver; AICR screens firstAvailable shapes too as deliberate conservative policy), gpu.nvidia.com slices with non-node-local topologies (nodeSelector/allNodes/per-device node selection), pools published by node-local slices of multiple nodes (ambiguous attribution), and allocated ResourceClaims from pools no node-local slice publishes — each rejection cites #1327 and the generalization follow-up #1652. This is a deliberate design decision the review rounds converged on: the validator validates AICR's supported configurations; it does not emulate kai-scheduler's raw accounting for arbitrary topologies and drivers. Candidates are scored capacity-first as (node, mechanism) pairs by FREE GPUs; ties prefer DRA, then the lexicographically smaller node name — the winning pair decides both the node and the wiring, matching the documented "picks the candidate with the most free GPUs" contract. Eligibility is TOCTOU-guarded: a candidate must be Ready on the fresh node object, not just in the probe's earlier snapshot. So a --node-selector onto a device-plugin-only node of a heterogeneous cluster gets plugin wiring even when DRA exists elsewhere. The chosen node, wiring, and probe summary are recorded in the check's evidence output. Occupancy accounting counts effective nvidia.com/gpu requests of bound non-terminal pods (full K8s effective-request rules — one-shot init containers are counted together with preceding restartable sidecars, and RuntimeClass spec.overhead GPUs are added) plus DRA gpu.nvidia.com allocations (excluding adminAccess results), deduplicating KEP-5004 DRA-backed extended-resource claims per claim request via pod.status.extendedResourceClaimStatus.requestMappings, and fails closed on list errors (sole exception: DRA API not served = deterministically zero DRA usage); DRA allocations are attributed to nodes through the slice-derived pool → node map (the K8s API does not require pool names to be node names, so name equality would mis-attribute a pool named after a different existing node); an allocation from a pool no node-local slice publishes is one of the fail-fast rejected states above, not silently attributed. One documented, accepted divergence: kai counts AdminAccess (monitoring) claim requests in its demand vector while the occupancy count correctly excludes them — a legitimate monitoring claim must not fail validation (noted under "Known accepted divergences" in #1652).

Manifests: only the default-scheduled vllm-metrics-test.yaml converts to device-plugin GPU requests. It is intended for the recommended AKS device-plugin configuration (and the post-flip production default) — no automated consumer references it; docs/integrator/aks-gpu-setup.md's recommended flow disables full-GPU DRA, where the prior claim form is unschedulable. It also schedules on dual-advertised clusters via the default scheduler, but the two allocators keep independent ledgers there, so co-resident gpu.nvidia.com claim workloads can collide with its plugin-assigned GPU — the manifest header documents this caveat. DRA-only clusters remain unsupported by AICR validation. The kai-scheduled STATIC entry points — demos/workloads/inference/vllm-agg.yaml (applied directly by the CUJ doc), the dynamo-vllm-agg + gang-scheduling-test evidence manifests (applied by --cncf-submission), and tests/manifests/dynamo-vllm-smoke-test.yaml — deliberately KEEP main's DRA-claims form: kai rejects scalar GPU requests on nodes to which it attributes raw spec.nodeName ResourceSlices from "gpu"-named drivers (unvalidated), so a scalar conversion breaks these user-facing files on today's dual-advertised default clusters, while keeping main's form is zero regression in either direction. Each carries a header note; their conversion lands atomically with PR 3's recipe flip. ComputeDomain/IMEX and RoCE DRA paths untouched.

Test-resource cleanup containment (local to the two GPU checks): each run creates a per-run namespace (128-bit random name token, doubling as the aicr.run/gpu-test-run ownership-label value) and the deferred cleanup deletes only that exact namespace: UID-preconditioned deletes, DELETE 409s re-verified via Get (only NotFound or a different UID proves absence), definitive create rejections (Forbidden/Invalid) distinguished from ambiguous writes (which get a settle loop), and a terminal CLEANUP FAILED state that fails an otherwise-passing check instead of reporting PASS over a leak. To guarantee cleanup room without touching the validator execution model, both checks derive their work budget dynamically from the check context's remaining deadline minus a 90s cleanup reserve (one bounded 30s namespace cleanup + 60s scheduling-skew/result-flush margin), so a --data catalog-timeout override scales the budget instead of eroding the reserve, and time spent before check entry charges work, never cleanup. A deadline too short to fit the reserve plus a 30s work floor fails fast with ErrCodeTimeout before any resource is created; dra-support's recipe/standalone scoping decision runs before that gate, so out-of-scope recipes and absent drivers still skip rather than time out. The fixed 3m30s/8m30s budgets remain only as deadline-less fallbacks (standalone/library use) mirroring the embedded 5m/10m catalog timeouts — that arithmetic stays pinned by TestGPUCheckWorkBudgetsFitCatalogTimeouts, and the derivation itself by TestGPUCheckWorkBudget. Known limitation: this is containment, not an absolute guarantee — pod scheduling/image-pull skew beyond the 60s margin, or a SIGKILL, can still cut cleanup off; leaked per-run namespaces carry the ownership label for external sweeping. Validator-wide lifecycle hardening (signal-aware cancellation, Job-deadline headroom) is deliberately out of scope here and is tracked as #1632.

Review hardening (applied after the initial draft, based on a multi-pass review): recipe-scoped dra-support gating, driver-parameterized NVIDIA slice validation on the ComputeDomain pass path, multi-container isolation subtests in both modes, DRAExtendedResource attribution guard + KEP-5004 occupancy dedup, sidecar-aware init-container GPU accounting, Kubernetes NotIn absent-key semantics, mechanism-neutral diagnostics, and refreshed CNCF evidence descriptions (pkg/evidence/cncf) + docs/user/validation.md. Validator RBAC for the new cluster-wide pod list is confirmed covered (per-run ServiceAccount binds cluster-admin; pkg/validator/job/rbac.go). Later rounds added: a shared K8s read-error classifier (NotFound/Timeout/Internal, covering context, apiserver, transport, and client-go rate-limiter timeout forms), a bounded retry for the fresh-namespace default-ServiceAccount admission race (default-SA-only, with honest generic-vs-SA timeout classification), watch-based terminal-pod waits with bounded exponential restart backoff (replacing 500ms GET polling), failure-path log/artifact capture ordered before pass/fail verdicts, read-only cleanup evidence commands (no executable kubectl delete equivalents), and — the final convergence of the kai-compatibility review thread — the simplification of inference-perf's GPU-allocation handling to exactly two supported configurations with fail-fast rejection of generalized topologies/drivers (#1652), replacing the interim kai-emulation heuristics (kai-visible capacity caps, topology-invisibility plugin preference) explored in earlier rounds. The final pre-merge cross-review added: per-allocator occupancy separation — DRA allocations subtract from DRA capacity, and a DRA candidate carrying scalar nvidia.com/gpu workloads is skipped outright because physical-device ownership cannot be reconciled across the two allocators (cross-ledger subtraction could double-book a plugin-held GPU); transient watch-SETUP failures join the bounded restart loop while permanent authorization/validation failures surface immediately, and a 410 ResourceExpired refreshes the next watch from a fresh List's COLLECTION resourceVersion — an unchanged pod's object RV can sit outside the watch window — with bounded re-Get polling as the fallback; all-zero-device ResourceSlices no longer enter the kai-attributable node map (false kai-rejection evidence on GKE/COS-style empty slices); and the saturation diagnostic no longer counts excluded nodes as saturated.

Status: at the merge head 1b0b31a3: 149 checks pass, 0 test failures; one KWOK Tier-1 job hit the workflow's 15-minute limit and was cancelled (environmental — rerun dispatched). Earlier draft-exit gates: make qualify passed, the live GB200 matrix (dual-mode + ComputeDomain-only, both recipes, all phases) and per-head confirmation runs are recorded in Testing, and the contributor docs are updated (docs/contributor/validator.md, docs/contributor/uat.md; docs/user/validation.md earlier). The MNNVL behavioral subtest moved to #1649 (maintainer decision 2026-07-07) and does not block un-drafting. The simplified two-configuration fail-fast model is unit-gated (race suite, lint, module build all green) and live-confirmed fully clean at the merge head 1b0b31a3 — full 12/12 matrix, 2 recipes × 2 DRA modes × 3 phases with deployment 4/4 everywhere (see Testing: runs 20260708-111053 through 20260708-114842; earlier per-head runs 20260707-214843/20260707-220350) — the PR exits draft on reviewer sign-off.

Follow-up work tracked outside this PR:

  • validator(dra-support): behavioral MNNVL ComputeDomain IMEX allocation subtest #1649 — dedicated behavioral MNNVL ComputeDomain → generated-ResourceClaimTemplate → IMEX-channel subtest in dra-support (the flow has live behavioral coverage today via the NCCL validator on every GB200 NVLS/NCCL training performance run; the in-code marker is TODO(#1649))
  • evidence: collect-evidence.sh hardcodes full-GPU DRA in dra-support and secure-access paths #1629 — mode-aware CNCF evidence collection (pkg/evidence/cncf/scripts/collect-evidence.sh dra/secure sections + dra-gpu-test.yaml; the gang/dynamo sections apply the static manifests, which stay in main's DRA-claims form until PR 3 converts them with the flip). Non-blocking for this PR: the --cncf-submission evidence script is self-contained and still runs correctly on full-GPU-DRA-enabled clusters; its DRA-only wording/limitation is documented in docs/conformance/cncf/index.md until the script becomes mode-aware
  • validator lifecycle: guarantee cleanup and result integrity across Job deadline, SIGTERM, and orchestrator timeout #1632 — validator lifecycle: guarantee cleanup and result integrity across Job deadline, SIGTERM, and orchestrator timeout (covers the pre-existing expected-resources reaper symptom seen in every live run above, and the broader lifecycle hardening declared out of scope in the cleanup-containment notes)
  • validator(inference-perf): generalized DRA topologies/drivers are fail-fast #1652 — validator(inference-perf): generalized DRA topologies/drivers are fail-fast today (non-NVIDIA "gpu"-named slice drivers and DeviceClasses, non-node-local gpu.nvidia.com topologies, and allocations from pools no node-local slice publishes — or that multiple nodes publish — all reject with ErrCodeInvalidRequest; arbitrary pool names are supported via the slice-derived pool → node map); generalizing support — including any kai-scheduler raw-accounting emulation — is deliberately deferred there to keep this PR scoped to GPU allocation policy: device-plugin production default with recipe-configured DRA opt-in #1327's real problem
  • PR 3 of GPU allocation policy: device-plugin production default with recipe-configured DRA opt-in #1327 (after the stacked configured-policy PR 2) — recipe default flip plus all kai-scheduled workload conversions, landing atomically: disable full-GPU DRA in nvidia-dra-driver-gpu values, pin ComputeDomain and devicePlugin.enabled: true explicitly, remove the nine inference-overlay overrides, rendered-output regression test, promote the deterministic recipe-level one-advertiser invariant to an error (broader runtime detector warnings remain a separate follow-up), AND convert the kai-scheduled workloads kept in DRA form by this PR (the four static manifests — vllm-agg demo CUJ, dynamo-vllm-agg + gang-scheduling evidence, dynamo-vllm-smoke-test — plus tests/uat/{aws,gcp}/run phase_serve and docs/contributor/uat.md; pre-flip, a scalar conversion of any kai-scheduled workload recreates the dual-advertisement scheduling failure). Forward constraint established by this PR: post-flip, dra-support's validateNVIDIAResourceSlices hard-fails when no NVIDIA ResourceSlice validates — so PR 3's live validation must confirm the compute-domain kubelet plugin publishes ResourceSlices on each non-MNNVL platform whose recipe enables the driver (the committed H100 nim-eks evidence shows it does on at least H100/EKS)
  • Full-GPU DRA opt-in deferred to KEP-5004 maturity — scope and revisit triggers in this #1327 comment
  • Upstream CNCF conformance-test parity: Add device-plugin allocation mode to secure accelerator access test kubernetes-sigs/ai-conformance#75

Testing

GOFLAGS=-mod=vendor go build ./...                                   # clean
GOFLAGS=-mod=vendor go test -race ./validators/...                   # all packages ok
golangci-lint run -c .golangci.yaml ./validators/...                 # 0 issues
gofmt -l validators/                                                  # clean
yamllint (repo config) on the converted vllm-metrics-test.yaml and the
four reverted (main-form + header note) kai manifests                # clean

New table-driven tests: capability probe (topologies, pool generations/completeness, device taints, NotReady/cordoned nodes, dual-advertisement warning), secure-access device-plugin path end-to-end via fake clients, dra-support fail-closed scoping matrix, inference-perf worker wiring over both allocation modes (DRA claims vs device-plugin limits, per-mode podspec assertions) + combined occupancy accounting + fail-closed errors + effective-GPU-request rules + the fail-fast rejection matrix for unsupported GPU DRA configurations (foreign gpu-named drivers, non-node-local topologies, unknown-pool allocations — TestRejectUnsupportedGPUTopology, TestScanGPUSliceTopology, and the unknown-pool occupancy case).

Live validation (EKS GB200 p6e-gb200.36xlarge ×2, dual-advertised: gpu.nvidia.com DeviceClass + ResourceSlices + scalar allocatable; PR-built binary + multi-arch validator images):

  • Run 20260707-114343 (inference-dynamo recipe, dual mode): deployment 3/4 (expected-resources "other" — pre-existing and now fully root-caused: the check correctly detects real recipe-vs-cluster drift (recipe renders Skyhook CR tuning; the cluster runs tuning-new), but the framework's Job activeDeadlineSeconds equals the catalog timeout equals the silent poll budget, so the job controller reaps the pod before the check can report — tracked as validator lifecycle: guarantee cleanup and result integrity across Job deadline, SIGTERM, and orchestrator timeout #1632; identical in every run below), conformance 10/10 passed (incl. dra-support, secure-accelerator-access), inference-perf failed with every worker Pending — root-caused to kai-scheduler's DRA-only node classification above; this run motivated the mode-dispatched wiring.
  • Run 20260707-121825 (kubeflow-training recipe, dual mode): deployment 3/4 (same pre-existing "other"), conformance 8/8 passed, performance 2/2 passed (NCCL all-reduce — default-scheduled TrainJob unaffected by kai).
  • Run 20260707-123528 (inference-dynamo, ComputeDomain-only — resources.gpus.enabled=false, no gpu.nvidia.com DeviceClass/ResourceSlices; the driver-supported / post-PR-3 config): deployment 3/4 (same "other"), conformance 10/10 passed (dra-support records the full-GPU subtest N/A while still validating ComputeDomain DRA; secure-accelerator-access takes the device-plugin path), inference-perf passed — device-plugin workers schedule through kai (no GPU slices → no DRA-only classification).
  • Run 20260707-125326 (kubeflow-training, ComputeDomain-only): deployment 3/4, conformance 8/8 passed, performance 2/2 passed.
  • Head 5099d355 full re-run (mode-dispatched inference-perf; rebuilt multi-arch images pr1620-5099d355):
    • ComputeDomain-only: inference 20260707-130600 — conformance 10/10 + inference-perf passed (device-plugin branch); training 20260707-132401 — 8/8 + 2/2.
    • Dual-mode restored (original release values): inference 20260707-133617 — conformance 10/10 + inference-perf PASSED (6m49s) via the DRA-claims branch on the same dual-advertised nodes that rejected scalar workers in -114343, proving the kai fix; training 20260707-135342 — 8/8 + 2/2.
    • Allocation-sensitive conformance/performance matrix — 2 recipes × 2 DRA modes — fully green at 5099d355 (the then-current head; behavioral evidence carried forward per the per-head confirmation runs listed here; deployment phases 3/4 everywhere due to the pre-existing drift/reaper item above).

Per-head confirmation chain after the 5099d355 matrix:

  • Head a6c213fc confirmation (micro-fix round; images pr1620-a6c213fc, dual-advertised): run 20260707-155024 — deployment 3/4 (known pre-existing item), conformance 10/10 passed, inference-perf passed (7m31s) — node-local DRA wiring scheduled through kai.

The 5099d355 matrix plus the a6c213fc and 0b66f53f confirmation runs are the behavioral evidence for this PR; the delta at the later heads is the review rounds' changes (capacity-first (node, mechanism) pair scoring with TOCTOU Ready guard in worker node selection; SA-race context bounding with default-SA-only retry and honest generic-vs-SA timeout classification; watch-restart backoff; revert of the four kai-scheduled static manifests to main's DRA form with header rationale — only vllm-metrics-test stays converted), each unit-gated (go test -race ./validators/..., golangci-lint, whole-module build). Final confirmation run at head 0b66f53f (, pr1620-0b66f53f images, live EKS GB200 dual-advertised): run 20260707-162702 — deployment 3/4 (the known pre-existing expected-resources drift/reaper item), conformance 10/10 passed, inference-perf passed (7m10s) via the capacity-first pair-scoring selection (DRA wiring on the freer dual-advertised node, workers scheduled by kai through ResourceClaims). CI at that head: 151 pass / 0 fail; the cross-review fix heads (515f5ce3, 8eae49c9, 1b0b31a3 — the last rebased onto current main per pre-push policy) re-run the full suite. Cross-review fixes are unit-gated locally: go test -race ./validators/... ./pkg/evidence/... all ok; golangci-lint 0 issues (fresh cache). Round 2 adds: 410 watch recovery from a List collection resourceVersion + permanent-error fast-fail (tests pin second-watch establishment while still Pending, and Forbidden failing promptly), submission-collector feature descriptions relabeled DRA-only until #1629 (the shell collector exercises gpu.nvidia.com ResourceClaims), and the troubleshooting guide's saturation-message sample updated to the per-ledger diagnostic.

Heads after 0b66f53f (2560230f, 048922fc, e20c1d12) are comments/docs/PR-body-only deltas — no code behavior change. A full confirmation matrix at e20c1d12 (images pr1620-e20c1d12, live EKS GB200) then re-validated all four cells:

  • Dual-advertised: inference 20260707-183818 — conformance 10/10 + inference-perf passed (7m06s, DRA-claims wiring via kai); training 20260707-185558 — 8/8 + NCCL 2/2.
  • ComputeDomain-only: inference 20260707-190817 — conformance 10/10 + inference-perf passed (6m54s, device-plugin wiring); training 20260707-192541 — 8/8 + 2/2.
  • Deployment phases 3/4 in all cells (the known pre-existing expected-resources drift/reaper item).

Head 94eedb79 (kai-compatibility guard in worker selection, centralized probe error classification, fail-closed DRA health getters) was then confirmed live on the dual-advertised cluster with pr1620-94eedb79 images: run 20260707-193833 — deployment 3/4 (same known item), conformance 10/10 passed, inference-perf passed (7m21s) through the kai-guarded capacity-first selection. CI at 94eedb79: 151 pass / 0 fail.

Head f3e7bd1a (the simplified two-configuration + fail-fast model above, replacing the interim kai-emulation heuristics; images pr1620-f3e7bd1a) was unit-gated at that tree and live-confirmed fully clean (both supported states were already proven live at e20c1d12/94eedb79): inference run 20260707-214843 — deployment 4/4 passed in 2m44s (expected-resources passes after the cluster's Skyhook CR name drift was remediated to the recipe-conformant tuning), conformance 10/10, inference-perf passed (7m26s, DRA-claims wiring), clean CLI exit; training run 20260707-220350 — deployment 4/4 (2m26s), conformance 8/8, NCCL 2/2, clean CLI exit. CI at that head: 151 pass / 0 fail.

Head cffbc04b (round 12; images pr1620-cffbc04b) tightens the fail-fast boundary's correctness on edge paths: slice-derived pool → node occupancy attribution (the K8s API does not require pool names to be node names) with fail-fast on unknown or multi-node pools, rejection of allocated claims requesting foreign "gpu"-named DeviceClasses (kai classifies claim demand by request class name), occupancy error classification through the shared timeout classifier, and the documented AdminAccess divergence. These paths are unreachable on the GB200 validation cluster — the NVIDIA driver names its per-node pools after the nodes and no foreign-class claims exist there — so the f3e7bd1a live run's behavior is unchanged by this delta; the round is unit-gated (go test -race ./validators/... all packages ok, golangci-lint 0 issues, gofmt clean, whole-module build clean, yamllint clean on the touched manifests).

Head cffbc04b (round 13) was comments/docs-only — precision relabels (kai v0.14.1 reads only Exactly request classes, countGPUDevicesFromClaim dra.go:164-184; AICR's firstAvailable screening is a deliberately conservative AICR policy, not kai behavior) and a documented known limitation (the class screen assumes the driver-provided gpu.nvidia.com DeviceClass retains its NVIDIA selector; an admin-replaced class is outside the supported matrix, #1652). No functional code change: the pr1620-cffbc04b images and the f3e7bd1a live evidence carry unchanged.

A final full confirmation matrix at the merge head 1b0b31a3 (post-rebase onto current main; multi-arch images pr1620-1b0b31a3, live EKS GB200, 2026-07-08, runs 20260708-111053 through 20260708-114842) re-validated every cell directly at this head — 2 recipes × 2 DRA modes × 3 phases = 12/12 passed, including deployment 4/4 in every cell (the expected-resources drift item remains remediated):

  • Dual-advertised: inference — conformance 10/10, inference-perf passed (6m52s, DRA-claims wiring chosen node-locally, workers scheduled by kai via ResourceClaims); training — conformance 8/8, NCCL 2/2 (net 329.65 GB/s, nvls 842.15 GB/s).
  • ComputeDomain-only: inference — conformance 10/10, inference-perf passed (6m47s, device-plugin wiring sized from scalar allocatable; dra-support records the full-GPU behavioral subtest N/A while still validating ComputeDomain DRA); training — conformance 8/8, NCCL 2/2 (net 311.71 GB/s, nvls 840.80 GB/s).
  • The cluster was restored to its original dual-advertised configuration afterward (helm values byte-identical to the pre-run record; gpu.nvidia.com ResourceSlices and DeviceClasses re-verified present).

Full make qualify passed at c57ddc50 (exit 0; an earlier in-sandbox failure was sandbox port-bind/TUF-cache restrictions, not test failures). The c57ddc50→5099d355 delta (validators + docs) is gated by go test -race ./validators/... + golangci-lint + whole-module build (all clean).

Risk Assessment

  • Medium — Touches multiple components or has broader impact

Rollout notes: On clusters with full-GPU DRA enabled (today's AICR default), the conformance checks keep exercising DRA — but the DRA path is deliberately stricter than before, so some previously-passing clusters may now fail on genuine defects: robust ResourceSlice validation (complete current-generation pools, device taints, Ready/schedulable node resolution), an exactly-one-GPU visibility gate on the granted container, and a multi-container isolation subtest whose unauthorized sibling also fails clusters using the legacy envvar device-list strategy (a true isolation violation — upstream ai-conformance#75 semantics). Occupancy accounting still counts DRA allocations. On ComputeDomain-only clusters, secure-accelerator-access and inference-perf allocate via the device plugin, while dra-support continues validating ComputeDomain DRA (driver health + validated ResourceSlices) — it never falls back to the device plugin. On dual-advertised clusters, inference-perf's workers bind DRA claims — a NODE-LOCAL decision: the wiring follows the chosen worker node's advertised mechanism, not a cluster-global flag (kai-scheduler rejects scalar GPU requests on nodes to which it attributes raw spec.nodeName ResourceSlices from "gpu"-named drivers (unvalidated) — see Motivation). DRA-only clusters (device plugin disabled) remain unsupported: the worker wiring could bind claims, but GPU-capacity discovery requires scalar nvidia.com/gpu allocatable (the one converted default-scheduled demo manifest, vllm-metrics-test.yaml, is likewise unschedulable there; see #1327 for the KEP-5004 path). GPU DRA configurations outside the two supported states (foreign "gpu"-named slice drivers and DeviceClasses, non-node-local gpu.nvidia.com topologies, allocations from unpublished or multi-node-published pools — arbitrary pool names themselves are supported via the slice-derived pool → node map) fail fast with actionable ErrCodeInvalidRequest errors rather than being heuristically emulated — generalization is tracked in #1652. PR 3 (recipe default flip + deterministic one-advertiser invariant error) lands only after this PR and the stacked configured-policy PR merge.

Known detection scope bound (deliberate): the capability probe does not evaluate DeviceClass CEL selectors or external DeviceTaintRule objects — both are scheduler territory; the limitation is documented in code and surfaces diagnostically (selector presence is recorded in DRADetail), and a selector/taint-rule-excluded configuration fails noisily (pod Pending → timeout), never silently.

Flag semantics & forward plan: the DRA chart flag truth table (resources.gpus.enabled is the switch that decides what deploys; gpuResourcesEnabledOverride is only the install-guard waiver; the chart has no working out-of-the-box default until KEP-5004 GA), the verified kai-scheduler/dual-advertisement analysis, the KEP-5004 timeline (beta on-by-default in K8s 1.36; targeted for Stable in 1.37 — 1.37 is unreleased), PR 3's target values (gpus.enabled=false, explicit override: false, explicit computeDomains.enabled: true, GPU Operator device plugin stays), and the version policy (≤1.35 off; 1.36 documented experimental DRA-only opt-in; 1.37+ reconsider after GA + NVIDIA chart update + AICR end-to-end DRA-only validation) are consolidated as the decision record in #1327 (comment).

Checklist

  • Tests pass locally (make test with -race) — full make qualify passed (see Testing); validators race suite re-run green at every head
  • Linter passes (make lint) — golangci-lint + yamllint clean; full gate covered by the passing make qualify
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed — docs/user/validation.md, docs/integrator/aks-gpu-setup.md, docs/conformance/cncf/index.md, docs/contributor/{validator,uat}.md
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@yuanchen8911 yuanchen8911 added the theme/validation Constraint evaluation, health checks, and conformance evidence label Jul 6, 2026
@yuanchen8911 yuanchen8911 changed the title feat(validator): capability-driven GPU allocation (device plugin or DRA) feat(validator): capability-driven GPU allocation mode Jul 6, 2026
@yuanchen8911 yuanchen8911 changed the title feat(validator): capability-driven GPU allocation mode WIP: feat(validator): capability-driven GPU allocation mode Jul 6, 2026
@yuanchen8911 yuanchen8911 changed the title WIP: feat(validator): capability-driven GPU allocation mode WIP: feat(validator): GPU allocation via device plugin or DRA Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Recipe evidence check

No leaf overlays affected by this PR.

This gate is warning-only and never blocks merge.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR migrates GPU allocation across manifests, docs, and validators to support both NVIDIA DRA and the standard device plugin, introducing a shared allocmode package that detects cluster GPU allocation capability. Conformance checks (CheckDRASupport, CheckSecureAcceleratorAccess) are reworked to scope by recipe, discover served DRA API versions, validate NVIDIA ResourceSlices, and dispatch behavior based on detected mode. The inference-perf performance validator now computes combined pod/DRA GPU occupancy with KEP-5004 deduplication and wires workers via DRA ResourceClaimTemplate or device-plugin GPU limits depending on node capability. Extensive new tests, constants, error-classification helpers, and documentation updates accompany these changes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Suggested reviewers: mchmarny

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: GPU allocation capability inspection and validator hardening.
Description check ✅ Passed The description is clearly related to the changeset and matches the implemented capability-driven GPU allocation and validation updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@validators/conformance/dra_support_check.go`:
- Line 76: The pod listing for draDriverNamespace is being performed twice, once
in nvidiaDRADriverInstalled and again in the inventory/artifact path using
ctx.Clientset.CoreV1().Pods(...).List. Refactor nvidiaDRADriverInstalled to
return or expose the fetched pod list (along with the install check result) and
reuse that result in the later inventory code instead of issuing another
identical List call. Update the affected dra_support_check flow so the same pod
data is reused across the referenced step 0 and step 2 logic.
- Around line 120-127: The DRA support check is rebuilding the ResourceSlice
GroupVersionResource inline instead of reusing the shared package-level
resourceSliceGVR, which can drift from the canonical resource.k8s.io/v1 value.
Update the logic in dra_support_check.go to use resourceSliceGVR directly when
calling dynClient.Resource(...).List(...), matching the symbol already defined
and used in allocation_mode.go and the fake dynamic client tests.
- Around line 117-150: The ResourceSlices scan in the DRA support check does not
observe context cancellation during iteration, so a timed-out or canceled
request may keep looping unnecessarily. Update the loop in the ResourceSlices
handling within the DRA support check to check ctx.Err() (or ctx.Done()) on each
iteration and return promptly if the context is canceled, following the same
pattern used by detectFullGPUDRA in allocation_mode.go; keep the existing
summary/reporting logic in place.

In `@validators/conformance/secure_access_check.go`:
- Around line 45-47: The secure access GPU test image constant is using an
unavailable CUDA tag, which will cause the test pod to fail on pull. Update the
cudaTestImage value in secure_access_check.go to a published tag such as
12.9.1-base-ubuntu24.04 or 12.9.2-base-ubuntu24.04 so the in-container GPU
visibility check can run successfully.

In `@validators/performance/inference_perf_constraint.go`:
- Around line 705-740: podEffectiveGPURequest currently ignores init-container
ordering, so a restartable sidecar in pod.Spec.InitContainers can be counted
before a later one-shot init container and understate the peak GPU need. Update
the logic in podEffectiveGPURequest to compute the effective request
sequentially across pod.Spec.InitContainers, adding restartable init containers
(ContainerRestartPolicyAlways) to the running total and only comparing one-shot
init containers against the current total, instead of just using a global max
initMax. Keep the regular container handling and containerGPUs helper intact,
but make the final return reflect the true peak across ordered init execution.
- Around line 654-678: The GPU occupancy scan in countUsedGPUsByNode is doing a
full cluster-wide pod list and then filtering in memory, so tighten the initial
Pods("").List call with the most selective field/label constraints you can use
to exclude irrelevant pods up front. While updating that logic, add early
ctx.Done() checks inside the pod iteration and the ResourceClaim iteration used
by the same inference path so both loops can abort promptly when the diagnostic
context is canceled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 6c9c2f5d-ea8f-4f44-bd10-d1037d2864a9

📥 Commits

Reviewing files that changed from the base of the PR and between 70bc0b3 and 033c451.

📒 Files selected for processing (17)
  • demos/workloads/inference/vllm-agg.yaml
  • demos/workloads/inference/vllm-metrics-test.yaml
  • pkg/evidence/cncf/scripts/manifests/dynamo-vllm-agg.yaml
  • pkg/evidence/cncf/scripts/manifests/gang-scheduling-test.yaml
  • tests/manifests/dynamo-vllm-smoke-test.yaml
  • validators/conformance/allocation_mode.go
  • validators/conformance/allocation_mode_test.go
  • validators/conformance/consts.go
  • validators/conformance/dra_support_check.go
  • validators/conformance/dra_support_check_test.go
  • validators/conformance/secure_access_check.go
  • validators/conformance/secure_access_check_test.go
  • validators/performance/inference_perf_constraint.go
  • validators/performance/inference_perf_test.go
  • validators/performance/testdata/inference/dynamo-deployment-gateway-epp.yaml
  • validators/performance/testdata/inference/dynamo-deployment.yaml
  • validators/performance/testdata/inference/resource-claim-template.yaml
💤 Files with no reviewable changes (1)
  • validators/performance/testdata/inference/resource-claim-template.yaml

@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 2 times, most recently from aa4ae2b to d0972b4 Compare July 6, 2026 22:01
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
validators/conformance/secure_access_check.go (1)

561-582: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Propagate structured poll errors instead of wrapping them again.

podStuckReason/Get failures already return pkg/errors values with codes inside the poll callback; wrapping them again in the outer poll error path can override or obscure the structured code. Return existing *errors.StructuredError values as-is, and only wrap unstructured poll errors. Based on learnings, already structured pkg/errors errors should be propagated without double-wrapping.

Proposed pattern
 	if err != nil {
 		// Distinguish timeout from other poll errors (RBAC, NotFound, etc).
 		if ctx.Err() != nil || waitCtx.Err() != nil {
 			return nil, errors.Wrap(errors.ErrCodeTimeout, "GPU test pod did not complete in time", err)
 		}
+		var structured *errors.StructuredError
+		if stderrors.As(err, &structured) {
+			return nil, err
+		}
 		return nil, errors.Wrap(errors.ErrCodeInternal, "GPU test pod polling failed", err)
 	}

Also applies to: 710-737

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@validators/conformance/secure_access_check.go` around lines 561 - 582, The
poll error handling in secure_access_check should propagate existing structured
errors from the poll callback instead of wrapping them again. In the polling
block around podStuckReason and the Get/poll closure, detect when err is already
a pkg/errors structured error (for example, a *errors.StructuredError returned
by errors.New/errors.Wrap inside the callback) and return it unchanged; only
apply the timeout/internal wrappers for unstructured errors coming from the
outer wait/poll mechanism. Make the same adjustment in the later matching poll
path noted by the comment so structured codes are preserved end-to-end.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@validators/conformance/dra_support_check.go`:
- Around line 233-237: The pod-list probe in the DRA support check currently
treats every error from CoreV1().Pods(draDriverNamespace).List as internal, but
NotFound should be handled like the later Deployment/DaemonSet lookups and mean
“not installed.” Update the logic in the DRA support check around the pod
listing path to detect NotFound separately, return the non-installed result, and
only wrap other errors as ErrCodeInternal; use the existing draDriverNamespace
probe flow and the surrounding deployment/daemonset checks as the model.

---

Outside diff comments:
In `@validators/conformance/secure_access_check.go`:
- Around line 561-582: The poll error handling in secure_access_check should
propagate existing structured errors from the poll callback instead of wrapping
them again. In the polling block around podStuckReason and the Get/poll closure,
detect when err is already a pkg/errors structured error (for example, a
*errors.StructuredError returned by errors.New/errors.Wrap inside the callback)
and return it unchanged; only apply the timeout/internal wrappers for
unstructured errors coming from the outer wait/poll mechanism. Make the same
adjustment in the later matching poll path noted by the comment so structured
codes are preserved end-to-end.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: da107ad8-fb8b-4fca-a87c-39304de03daf

📥 Commits

Reviewing files that changed from the base of the PR and between 033c451 and d0972b4.

📒 Files selected for processing (21)
  • demos/workloads/inference/vllm-agg.yaml
  • demos/workloads/inference/vllm-metrics-test.yaml
  • docs/user/validation.md
  • pkg/evidence/cncf/collector.go
  • pkg/evidence/cncf/requirements.go
  • pkg/evidence/cncf/scripts/manifests/dynamo-vllm-agg.yaml
  • pkg/evidence/cncf/scripts/manifests/gang-scheduling-test.yaml
  • tests/manifests/dynamo-vllm-smoke-test.yaml
  • validators/conformance/allocation_mode.go
  • validators/conformance/allocation_mode_test.go
  • validators/conformance/consts.go
  • validators/conformance/dra_support_check.go
  • validators/conformance/dra_support_check_test.go
  • validators/conformance/secure_access_check.go
  • validators/conformance/secure_access_check_test.go
  • validators/performance/inference_perf_constraint.go
  • validators/performance/inference_perf_test.go
  • validators/performance/nccl_all_reduce_bw_constraint.go
  • validators/performance/testdata/inference/dynamo-deployment-gateway-epp.yaml
  • validators/performance/testdata/inference/dynamo-deployment.yaml
  • validators/performance/testdata/inference/resource-claim-template.yaml
💤 Files with no reviewable changes (1)
  • validators/performance/testdata/inference/resource-claim-template.yaml

@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch from d0972b4 to b60647e Compare July 6, 2026 22:29
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 2 times, most recently from ecc47c4 to 3a7f260 Compare July 6, 2026 23:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
validators/conformance/dra_support_check.go (1)

295-311: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Register the cleanup defer before deployDRATestResources. If that call fails after creating the namespace/claim/pod, the function exits before cleanup is armed, leaving orphaned DRA resources in dra-test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@validators/conformance/dra_support_check.go` around lines 295 - 311, Register
the cleanup defer in the DRA setup flow before calling deployDRATestResources so
cleanup is always armed, even if deployment fails after partial resource
creation. Update the logic around recordRawTextArtifact, deployDRATestResources,
and the deferred cleanup block in dra_support_check.go so any created Namespace,
ResourceClaim, or Pod is cleaned up on early return.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@validators/conformance/dra_support_check.go`:
- Around line 295-311: Register the cleanup defer in the DRA setup flow before
calling deployDRATestResources so cleanup is always armed, even if deployment
fails after partial resource creation. Update the logic around
recordRawTextArtifact, deployDRATestResources, and the deferred cleanup block in
dra_support_check.go so any created Namespace, ResourceClaim, or Pod is cleaned
up on early return.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: cab08eb7-30b7-4dfc-ae21-3036a9a0eed3

📥 Commits

Reviewing files that changed from the base of the PR and between ecc47c4 and 3a7f260.

📒 Files selected for processing (26)
  • demos/cuj2-demo.md
  • demos/workloads/inference/vllm-agg.yaml
  • demos/workloads/inference/vllm-metrics-test.yaml
  • docs/user/cli-reference.md
  • docs/user/component-catalog.md
  • docs/user/validation.md
  • pkg/evidence/cncf/collector.go
  • pkg/evidence/cncf/requirements.go
  • pkg/evidence/cncf/scripts/manifests/dynamo-vllm-agg.yaml
  • pkg/evidence/cncf/scripts/manifests/gang-scheduling-test.yaml
  • recipes/validators/README.md
  • recipes/validators/catalog.yaml
  • tests/manifests/dynamo-vllm-smoke-test.yaml
  • validators/conformance/allocation_mode.go
  • validators/conformance/allocation_mode_test.go
  • validators/conformance/consts.go
  • validators/conformance/dra_support_check.go
  • validators/conformance/dra_support_check_test.go
  • validators/conformance/secure_access_check.go
  • validators/conformance/secure_access_check_test.go
  • validators/performance/inference_perf_constraint.go
  • validators/performance/inference_perf_test.go
  • validators/performance/nccl_all_reduce_bw_constraint.go
  • validators/performance/testdata/inference/dynamo-deployment-gateway-epp.yaml
  • validators/performance/testdata/inference/dynamo-deployment.yaml
  • validators/performance/testdata/inference/resource-claim-template.yaml
💤 Files with no reviewable changes (1)
  • validators/performance/testdata/inference/resource-claim-template.yaml

@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 5 times, most recently from 52f9f31 to 1311297 Compare July 7, 2026 01:35
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 2 times, most recently from ab057ed to 15d4f10 Compare July 7, 2026 02:38
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch from 15d4f10 to 44d4fc3 Compare July 7, 2026 03:07
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 2 times, most recently from 94eedb7 to 4b44025 Compare July 8, 2026 03:43
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 3 times, most recently from cffbc04 to 1bfe78c Compare July 8, 2026 05:24
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch from 0c6b51f to e630edb Compare July 8, 2026 15:08
@yuanchen8911 yuanchen8911 changed the title WIP: feat(validator): capability-driven GPU allocation (DRA/plugin) feat(validator): GPU allocation capability inspection and hardening Jul 8, 2026
@yuanchen8911
yuanchen8911 marked this pull request as ready for review July 8, 2026 15:55
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch 3 times, most recently from 8eae49c to 1b0b31a Compare July 8, 2026 17:45
@yuanchen8911
yuanchen8911 requested a review from mchmarny July 8, 2026 17:51
Part 1 of 3 for NVIDIA#1327.

Regular Go-validator descriptions (recipes/validators/catalog.yaml) say
DRA-or-device-plugin — those checks are mode-dispatched. The CNCF
submission collector's feature descriptions (pkg/evidence/cncf) remain
DRA-only: its shell collector exercises gpu.nvidia.com ResourceClaims
until NVIDIA#1629 makes it mode-aware. The NVIDIA DRA driver's supported configuration
is ComputeDomain-only (no gpu.nvidia.com DeviceClass); whole GPUs come
from the device plugin. AICR's conformance checks and inference-perf
workload hard-required full-GPU DRA and fail on such clusters, while
the CNCF secure_accelerator_access requirement permits 'device plugin
or DRA'. Mirrors the upstream fix in kubernetes-sigs/ai-conformance#75.

Capability probe (shared by the conformance checks):
- Discovers the served resource.k8s.io version (v1, v1beta2, v1beta1 —
  the versions the driver chart accepts) and reads DeviceClasses and
  ResourceSlices at that version via the dynamic client, normalizing
  the v1beta1 per-device 'basic' wrapper for taints and topology.
- DRA is usable only when the DeviceClass exists and a ResourceSlice
  from the configured driver, in a complete current-generation pool,
  advertises untainted devices reachable from a Ready, schedulable
  node (all four slice topologies; Kubernetes NotIn absent-key
  semantics).
- Device-plugin usable = Ready, schedulable node with scalar
  allocatable nvidia.com/gpu; per KEP-5004 semantics such nodes are
  device-plugin-backed even when a DeviceClass maps the extended
  resource, so the mapping is recorded as attribution evidence rather
  than clearing usability. Dual advertisement (slices + scalar
  allocatable on the same nodes) logs an over-admission warning
  (promotion to an error lands with the recipe-flip PR 3; the stacked PR 2 adds recipe-configured policy resolution).

secure-accelerator-access: dispatches on the probe; both modes run the
same isolation assertions including a multi-container subtest. The
granted container must see EXACTLY one GPU (nvidia-smi UUID count);
request-less probes stay device-file based. The device-plugin test pod
uses required node affinity over all detected scalar-capacity nodes so
the scheduler picks a free one; DRA test claims are built in the
served API version's shape (v1beta1 uses direct request fields).

dra-support: never falls back to the device plugin. Scope comes from
the recipe's componentRefs (skip only when the recipe excludes or
disables the driver; live-detection fallback when refs are absent);
a recipe-enabled driver with missing workloads or no served DRA API
fails. NVIDIA ResourceSlices count only after the same pool/taint/
topology validation; the behavioral allocation subtest runs whenever
full-GPU DRA is usable (any served version), otherwise it is recorded
as not applicable. Exercising the MNNVL ComputeDomain flow is a
tracked follow-up.

inference-perf: worker GPU wiring is mode-dispatched node-locally on
the shared probe (validators/internal/allocmode) and supports exactly
two GPU allocation configurations: nodes publishing node-local
gpu.nvidia.com ResourceSlices bind a ResourceClaimTemplate at the
served resource.k8s.io version (v1beta1 request shape included),
sized from the validated per-node device count — kai classifies such
nodes DRA-only and rejects scalar GPU requests, so a node whose raw
slices AICR could not validate is ineligible for plugin wiring;
ComputeDomain-only / no-full-GPU-slice nodes get resources.limits
nvidia.com/gpu sized from scalar allocatable. Anything outside those
two states fails fast with ErrCodeInvalidRequest instead of guessing
(non-NVIDIA gpu-named slice drivers, allocated claims requesting a
non-NVIDIA gpu-named DeviceClass — kai v0.14.1 classifies claim
demand by the Exactly request's class name, independent of the
backing driver; AICR also screens firstAvailable subrequest classes,
a deliberately conservative policy — non-node-local gpu.nvidia.com
topologies, pools published by slices of multiple nodes, and
allocations from pools no node-local slice publishes), citing NVIDIA#1327;
generalized topology/driver support is tracked in NVIDIA#1652. Candidates are scored capacity-first as (node,
mechanism) pairs by free GPUs (ties prefer DRA then node name), and
the winning pair decides the wiring. Occupancy counts
effective nvidia.com/gpu requests of bound non-terminal pods (K8s
effective-request rules: one-shot inits stack on preceding restartable
sidecars; RuntimeClass overhead added) plus DRA gpu.nvidia.com
allocations attributed through the slice-derived pool-to-node map
(the K8s API does not require pool names to be node names;
adminAccess results excluded — a known, accepted divergence from
kai's demand vector, documented in NVIDIA#1652), deduplicating KEP-5004
DRA-backed extended-resource claims per claim request via
pod.status.extendedResourceClaimStatus.requestMappings. List errors
fail closed (context cancellation maps to ErrCodeTimeout; only 'DRA
API not served' means deterministically zero DRA usage).

Manifests: only the default-scheduled vllm-metrics-test converts to
device-plugin GPU requests. The kai-scheduled static entry points
(vllm-agg demo CUJ, dynamo-vllm-agg + gang-scheduling evidence,
dynamo-vllm-smoke-test) deliberately keep main's DRA-claims form —
kai rejects scalar GPU requests on nodes bearing raw spec.nodeName
gpu-driver ResourceSlices (unvalidated), so a scalar conversion
breaks them on today's dual-advertised default clusters; their conversion lands atomically with PR 3's recipe flip.
ComputeDomain/IMEX and RoCE DRA paths untouched. CNCF
evidence descriptions, validator catalog, and user docs updated to the
'device plugin or DRA' model.

Test-resource lifecycle: secure-access and the dra-support behavioral
subtest run in a per-run generated namespace (128-bit token, ownership
label aicr.run/gpu-test-run, UID-preconditioned deletion; foreign
AlreadyExists collisions fail without deleting). Cleanup is a single
namespace deletion under one bounded budget relying on the namespace
deletion controller for durable garbage collection, with distinct
confirmed-gone / in-progress / failed outcomes and ambiguous-create
settle handling. Both checks derive a work budget from the check
context deadline minus a documented cleanup reserve (failing fast
before creating resources when the catalog timeout is too short), so
cleanup fits inside the existing per-check timeouts; leaked namespaces
carry the ownership label for external sweeping. Validator-wide
lifecycle hardening is tracked separately in NVIDIA#1632. The DRA driver
probes use the component's resolved namespace from the recipe (e.g.
Talos overrides it), falling back to the default only when unset.

Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
@yuanchen8911
yuanchen8911 force-pushed the issue-1327-capability-validators branch from 1b0b31a to a3538d4 Compare July 8, 2026 20:17

@mchmarny mchmarny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep multi-pass review of the head a3538d4 (capability probe, secure-access, inference-perf, dra-support + docs/manifests), independently verified locally: go test -race ./validators/... all pass, golangci-lint 0 issues, gofmt clean. No critical or high issues found — the prior review rounds clearly landed. The cleanup lifecycle (UID-preconditioned deletes, 409 re-verification, CLEANUP FAILED terminal state), watch recovery (410 → collection RV, bounded backoff, closed-channel re-Get), fail-closed read-error classification, work-budget derivation, and the occupancy algorithm (component-helpers-parity effective requests, KEP-5004 dedup, per-ledger separation) all check out against their claimed semantics, and each hardening claim is backed by a real test. Docs and manifest conversions match the implemented behavior.

Findings: two medium edge-state gaps (a slices-present/DeviceClass-absent half-installation passing dra-support as N/A; DRA-only clusters getting a generic "no schedulable GPU nodes" instead of the fail-fast rejection contract) and three nits — see inline. Nothing blocks merge; both mediums are fine to address in the stacked PR 2 if you prefer to keep this head frozen.

if err != nil {
return err
}
if !mode.DRAUsable {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Half-enabled full-GPU DRA passes as N/A here: if validated gpu.nvidia.com ResourceSlices exist but the gpu.nvidia.com DeviceClass is missing (driver publishing slices, class deleted/not created), mode.DRAUsable is false, the behavioral subtest records "not applicable: full-GPU DRA not enabled", and the check passes — even though full-GPU DRA is advertised yet unallocatable. The N/A carve-out is documented for ComputeDomain-only configs; this slices-present/class-absent state slips through the same gate with an inaccurate "not enabled" label (the mismatch is only visible in the DRADetail evidence line).

Suggest failing — or at least distinctly flagging — when validated gpu.nvidia.com slices exist without the DeviceClass, consistent with the check's fail-closed principle for broken installations. Fine to land in the stacked PR 2 if you'd rather keep this head frozen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the deep review, Mark! Agreed on all five findings — we'll address them in the follow-up PR #1664 (stacked on this branch) to keep this head frozen. Nothing changes here.

// candidate node pool to nodes matching the user selector, then derive all
// sizing and scheduling details from within that pool.
func buildInferenceConfig(ctx *validators.Context) (*inferenceWorkloadConfig, error) {
func buildInferenceConfig(ctx *validators.Context, mode *allocmode.Mode) (*inferenceWorkloadConfig, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRA-only clusters (nodes in Mode.DRANodes with no scalar nvidia.com/gpu allocatable) never reach the fail-fast rejection matrix: candidate discovery below goes through helper.FindSchedulableGpuNodes, which admits only nodes with scalar allocatable, so a DRA-only cluster dies at the "no schedulable GPU nodes found" return (line 561) with a generic ErrCodeInternal, while every other unsupported configuration gets an actionable ErrCodeInvalidRequest citing #1327/#1652.

DRA-only being unsupported is documented and deliberate — but it's a third state the validator can detect (probe reports DRA-usable nodes, zero scalar-capacity nodes), so it should get the same explicit rejection message as the rest of the unsupported matrix instead of a message implying the cluster has no GPUs.

// value is the number of slices the driver published (before validation), so
// callers can distinguish "driver publishes nothing" from "slices exist but
// none pass validation".
func UsableDriverSliceNodes(ctx context.Context, items []unstructured.Unstructured, driver string, eligible map[string]*corev1.Node) (map[string]struct{}, int, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: UsableDriverSliceNodes has 0% coverage in its own package (go tool cover -func reports 0.0%; it's only exercised transitively through the conformance bridge alias) — this trips the repo's new-exported-func coverage gate, and if the bridge alias is ever dropped the counts→set projection loses all coverage silently. One table case in allocmode_test.go closes it.


// EligibleReadySchedulableNodes indexes the Ready, schedulable (uncordoned)
// nodes from the list by name.
func EligibleReadySchedulableNodes(nodeList *corev1.NodeList) map[string]*corev1.Node {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: node taints aren't considered in eligibility (only cordon + Ready), and unlike the DeviceTaintRule/CEL-selector limitations this gap isn't surfaced in any detail string. A Ready node carrying e.g. dedicated=infra:NoSchedule with allocatable GPUs reports usable, and the only downstream signal is a toleration-less pod Pending until timeout. Same "noisy, not silent" argument as the documented limitations applies — but a doc-comment/detail note matching those (see the CEL-selector notes above) would make the timeout diagnosable from the probe evidence.

// fields are read through deviceFields, which normalizes the v1beta1 `basic`
// wrapper (v1beta1 nests taints and per-device topology under Device.Basic;
// v1beta2/v1 flatten them onto the device itself).
func collectUsableDeviceCounts(slice *unstructured.Unstructured, eligible map[string]*corev1.Node, out map[string]int) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: under allNodes, multi-node nodeSelector, or per-device allNodes topologies, one physical device increments out[n] for every reachable node, so DRANodeDevices over-reports aggregate capacity N×. Not a live defect — such gpu.nvidia.com slices land in NonNodeLocalGPUSlices and the sole consumer fail-fasts on that first — but it's a latent trap for a future consumer that sums across nodes. Worth a doc-comment warning here (or on DRANodeDevices) so the invariant travels with the map.

yuanchen8911 added a commit to yuanchen8911/aicr that referenced this pull request Jul 8, 2026
The stacked configured-policy PR ("PR 1.5", second of three) from NVIDIA#1327,
stacked on the NVIDIA#1620 capability foundation.

Contract: configuration selects the whole-GPU allocation policy, cluster
inspection verifies it, mismatch fails closed; only recipe-less standalone
runs select automatically.

- Policy enum (unspecified | device-plugin-extended-resource |
  dra-resource-claim, with dra-extended-resource reserved for KEP-5004) and
  ResolveGPUAllocationPolicy in pkg/validator/v1: resolved from HYDRATED
  recipe values via GetValuesForComponentWithContext. The
  nvidia-dra-driver-gpu value resources.gpus.enabled is the switch;
  gpuResourcesEnabledOverride is only the chart-guard waiver but gates
  validity (true switch + false waiver → ErrCodeInvalidRequest). The
  device-plugin advertiser is read from an enabled gpu-operator OR
  gpu-operator-ocp componentRef (OCP recipes disable the former and carry
  the latter; gpu-operator wins with a warning if both are enabled); the
  devicePlugin.enabled pin added to the gpu-operator component values
  (inert vs upstream default) makes the tuple observable. No enabled
  operator component, or devicePlugin.enabled=false, with DRA not opted in
  → ErrCodeInvalidRequest (no whole-GPU advertiser; externally managed
  advertisers are an explicit NVIDIA#1327 non-goal). Transitional rows warn only:
  dual advertisement still resolves dra-resource-claim (what schedules
  under kai), an inert waiver resolves device-plugin-extended-resource.
- ValidationInput.GPUAllocationPolicy (gpuAllocationPolicy, omitempty) with
  a nil-safe getter; populated by ToValidationInputWithContext on the
  CLI/server/SDK ValidateState path and carried to validator Jobs through
  the existing validation.yaml ConfigMap (no extra Job plumbing). The
  legacy ToValidationInput is documented as leaving the policy unspecified.
- Inspect/Verify/Select separation: allocmode.Detect stays the inspect
  step; new allocmode.Verify fails closed (ErrCodeInvalidRequest) when the
  configured policy's mechanism is not usable, naming the policy, the
  observed Mode.Summary facts, and the likely drift; reserved and unknown
  policies fail closed too. Capability selection remains for unspecified
  only.
- Gates: secure-accelerator-access verifies any configured policy and runs
  ONLY the configured mechanism's path. dra-support verifies any
  configured policy; its full-GPU behavioral subtest becomes a FAILURE
  under dra-resource-claim, and under device-plugin-extended-resource it is
  recorded N/A even when DRA is incidentally usable (the subtest never
  exercises the non-configured mechanism). inference-perf verifies the
  policy, forces worker wiring by it, and, under dra-resource-claim,
  discovers candidate nodes from the probe's Mode.DRANodes/DRANodeDevices
  instead of scalar-only FindSchedulableGpuNodes (removes one DRA-only
  graduation blocker; does NOT graduate DRA-only), with policy-aware
  no-eligible-node and saturation diagnostics. Cross-ledger occupancy
  skip, kai guards, and fail-fast topology rejections stay in force in
  every mode; unspecified behavior is unchanged.
- Bundle-time override policy in pkg/bundler (after registry alias
  resolution, so REST/SDK are covered) for nvidia-dra-driver-gpu,
  gpu-operator, and gpu-operator-ocp: --dynamic on the policy keys —
  resources.gpus.enabled, gpuResourcesEnabledOverride,
  devicePlugin.enabled, and the component-level enabled toggle (disabling
  an advertiser changes the policy exactly like the nested keys) — is
  rejected (install-time value unknowable at validation); static
  overrides of the nested keys warn as deprecated via
  --set/--set-json/--set-file/config (the documented AKS workflow keeps
  working); the component-level enabled toggle is honored only via scalar
  --set (the typed --set-json/--set-file path rejects enabled for every
  component, a pre-existing guard) and likewise warns; all point at recipe
  overlays.
- Docs: validation.md policy section; aks-gpu-setup.md migrated from
  bundle-time --set to recipe-overlay examples; cli-reference.md notes the
  deprecation warning and --dynamic rejection on the policy keys;
  contributor/validator.md Inspect/Verify/Select paragraph. make bom-docs
  run: no BOM content change (the devicePlugin.enabled pin matches the
  upstream default).

Resolution requires an EXPLICIT resources.gpus.enabled on an enabled DRA
component: the chart's declared default is true, so silently resolving an
absent switch would diverge from rendered deployment intent (chart-guard
failure without the waiver, dual advertisement with it) — absence is
rejected with ErrCodeInvalidRequest. Stock recipes pin the value.

What stays unspecified: standalone Go validator inputs without recipe
context — they keep permanent capability-driven automatic selection per the
NVIDIA#1620 foundation. dra-extended-resource is declared but never resolved.
The next PR flips the production defaults, converts kai workloads, and
promotes the transitional warnings to errors.

Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
@yuanchen8911
yuanchen8911 requested a review from mchmarny July 8, 2026 20:49
yuanchen8911 added a commit to yuanchen8911/aicr that referenced this pull request Jul 8, 2026
The stacked configured-policy PR ("PR 1.5", second of three) from NVIDIA#1327,
stacked on the NVIDIA#1620 capability foundation.

Contract: configuration selects the whole-GPU allocation policy, cluster
inspection verifies it, mismatch fails closed; only recipe-less standalone
runs select automatically.

- Policy enum (unspecified | device-plugin-extended-resource |
  dra-resource-claim, with dra-extended-resource reserved for KEP-5004) and
  ResolveGPUAllocationPolicy in pkg/validator/v1: resolved from HYDRATED
  recipe values via GetValuesForComponentWithContext. The
  nvidia-dra-driver-gpu value resources.gpus.enabled is the switch;
  gpuResourcesEnabledOverride is only the chart-guard waiver but gates
  validity (true switch + false waiver → ErrCodeInvalidRequest). The
  device-plugin advertiser is read from an enabled gpu-operator OR
  gpu-operator-ocp componentRef (OCP recipes disable the former and carry
  the latter; gpu-operator wins with a warning if both are enabled); the
  devicePlugin.enabled pin added to the gpu-operator component values
  (inert vs upstream default) makes the tuple observable. No enabled
  operator component, or devicePlugin.enabled=false, with DRA not opted in
  → ErrCodeInvalidRequest (no whole-GPU advertiser; externally managed
  advertisers are an explicit NVIDIA#1327 non-goal). Transitional rows warn only:
  dual advertisement still resolves dra-resource-claim (what schedules
  under kai), an inert waiver resolves device-plugin-extended-resource.
- ValidationInput.GPUAllocationPolicy (gpuAllocationPolicy, omitempty) with
  a nil-safe getter; populated by ToValidationInputWithContext on the
  CLI/server/SDK ValidateState path and carried to validator Jobs through
  the existing validation.yaml ConfigMap (no extra Job plumbing). The
  legacy ToValidationInput is documented as leaving the policy unspecified.
- Inspect/Verify/Select separation: allocmode.Detect stays the inspect
  step; new allocmode.Verify fails closed (ErrCodeInvalidRequest) when the
  configured policy's mechanism is not usable, naming the policy, the
  observed Mode.Summary facts, and the likely drift; reserved and unknown
  policies fail closed too. Capability selection remains for unspecified
  only.
- Gates: secure-accelerator-access verifies any configured policy and runs
  ONLY the configured mechanism's path. dra-support verifies any
  configured policy; its full-GPU behavioral subtest becomes a FAILURE
  under dra-resource-claim, and under device-plugin-extended-resource it is
  recorded N/A even when DRA is incidentally usable (the subtest never
  exercises the non-configured mechanism). inference-perf verifies the
  policy, forces worker wiring by it, and, under dra-resource-claim,
  discovers candidate nodes from the probe's Mode.DRANodes/DRANodeDevices
  instead of scalar-only FindSchedulableGpuNodes (removes one DRA-only
  graduation blocker; does NOT graduate DRA-only), with policy-aware
  no-eligible-node and saturation diagnostics. Cross-ledger occupancy
  skip, kai guards, and fail-fast topology rejections stay in force in
  every mode; unspecified behavior is unchanged.
- Bundle-time override policy in pkg/bundler (after registry alias
  resolution, so REST/SDK are covered) for nvidia-dra-driver-gpu,
  gpu-operator, and gpu-operator-ocp: --dynamic on the policy keys —
  resources.gpus.enabled, gpuResourcesEnabledOverride,
  devicePlugin.enabled, and the component-level enabled toggle (disabling
  an advertiser changes the policy exactly like the nested keys) — is
  rejected (install-time value unknowable at validation); static
  overrides of the nested keys warn as deprecated via
  --set/--set-json/--set-file/config (the documented AKS workflow keeps
  working); the component-level enabled toggle is honored only via scalar
  --set (the typed --set-json/--set-file path rejects enabled for every
  component, a pre-existing guard) and likewise warns; all point at recipe
  overlays.
- Docs: validation.md policy section; aks-gpu-setup.md migrated from
  bundle-time --set to recipe-overlay examples; cli-reference.md notes the
  deprecation warning and --dynamic rejection on the policy keys;
  contributor/validator.md Inspect/Verify/Select paragraph. make bom-docs
  run: no BOM content change (the devicePlugin.enabled pin matches the
  upstream default).

Resolution requires an EXPLICIT resources.gpus.enabled on an enabled DRA
component: the chart's declared default is true, so silently resolving an
absent switch would diverge from rendered deployment intent (chart-guard
failure without the waiver, dual advertisement with it) — absence is
rejected with ErrCodeInvalidRequest. Stock recipes pin the value.

Follow-ups folded in from the NVIDIA#1620 maintainer review (head kept frozen
there per the review plan): the half-installed full-GPU DRA state (validated
slices, DeviceClass missing) is now named in the probe detail and therefore
in dra-support's N/A evidence; DRA-only clusters hitting scalar-only
discovery get an error naming the state instead of the generic message;
UsableDriverSliceNodes gains a direct unit test (coverage-gate); node-taint
non-evaluation is surfaced in Mode.Summary; the N-times over-count invariant
under non-node-local topologies is pinned in a comment. E2E fixtures
(tests/e2e/run.sh) that modeled advertiser-less synthetic recipes gained an
inert enabled gpu-operator ref — allocation-policy resolution (row 6)
rejects advertiser-less recipes before any validator runs.

What stays unspecified: standalone Go validator inputs without recipe
context — they keep permanent capability-driven automatic selection per the
NVIDIA#1620 foundation. dra-extended-resource is declared but never resolved.
The next PR flips the production defaults, converts kai workloads, and
promotes the transitional warnings to errors.

Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs area/recipes area/tests size/XL theme/validation Constraint evaluation, health checks, and conformance evidence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants