Repository navigation
feat(recipes): default AKS to Azure-managed GPU driver profile - #1756
Conversation
Recipe evidence checkProtected recipesRecipes with committed evidence (
Other affected recipes without evidence yet: 8These recipes are affected by this PR but carry no committed evidence pointer, so there is
How to refresh evidenceRun on a cluster matching the recipe's aicr snapshot -o snapshot.yaml
aicr validate \
-r recipes/overlays/<slug>.yaml \
-s snapshot.yaml \
--emit-attestation ./out \
--push ghcr.io/<your-fork>/aicr-evidence
# Copy to the per-source path printed in the emit 'copyTo' hint:
# recipes/evidence/<slug>/<source>/<bundle-digest>.yamlThis gate is warning-only and never blocks merge. See ADR-007 for the trust model. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@docs/user/component-catalog.md`:
- Around line 73-79: Update the documentation wording in the section around the
preinstalled-driver discussion: change “The case still tracked as separate work”
to “The case is still tracked as separate work,” and standardize all terminology
in this section to “preinstalled,” replacing any hyphenated “pre-installed”
usage while preserving the existing meaning.
🪄 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: aebbfa6f-72e7-4332-b887-0b3da283460d
📒 Files selected for processing (11)
docs/integrator/aks-gpu-setup.mddocs/user/cli-reference.mddocs/user/component-catalog.mdpkg/client/v1/aicr.gopkg/client/v1/aicr_test.gopkg/client/v1/gpu_driver_state.gopkg/client/v1/gpu_driver_state_test.gorecipes/components/gpu-operator/values-aks-training.yamlrecipes/components/gpu-operator/values-aks.yamlrecipes/overlays/aks.yamltests/uat/azure/cluster-config.yaml
87f1123 to
c412d59
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pkg/bundler/validations/checks.go`:
- Around line 340-345: Update the operator-managed bypass in checks.go around
the gpuoperator ValueOverrides lookup to require the complete coordinated
override set—driver.enabled, toolkit, runtime class, and driver root—before
returning nil; alternatively validate the fully merged effective values. In
pkg/bundler/validations/checks_test.go lines 782-789, provide all required
overrides in the success case and add omission cases for each required setting,
ensuring incomplete profiles still run the driver mismatch gate.
🪄 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: 2c82aa7b-5272-4d1c-ad6c-f815f60a60e8
📒 Files selected for processing (18)
docs/integrator/aks-gpu-setup.mddocs/user/cli-reference.mddocs/user/component-catalog.mdpkg/bundler/deployer/helm/helm_test.gopkg/bundler/validations/checks.gopkg/bundler/validations/checks_test.gopkg/client/v1/aicr.gopkg/client/v1/aicr_test.gopkg/client/v1/gpu_driver_state.gopkg/client/v1/gpu_driver_state_test.gopkg/recipe/driver_root_lockstep_test.gopkg/recipe/metadata.gopkg/validator/v1/conversion_test.gorecipes/components/gpu-operator/values-aks-training.yamlrecipes/components/gpu-operator/values-aks.yamlrecipes/overlays/aks.yamlrecipes/registry.yamltests/uat/azure/cluster-config.yaml
c412d59 to
c8da6e8
Compare
c8da6e8 to
2e9ca6e
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/client/v1/aicr_test.go (1)
917-952: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the recorded GPU driver state in these cases.
These scenarios verify only whether
driver.enabledwas injected. They can all pass whileMetadata.GPUDriverStateis missing or incorrect, leaving the new snapshot-metadata contract untested. Add an expected state per row and assert it before checking the override.🤖 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 `@pkg/client/v1/aicr_test.go` around lines 917 - 952, The table-driven GPU driver scenarios need to validate snapshot metadata as well as injection. In the test cases around the existing `wantInjected` fields, add an expected GPU driver state for each row based on the snapshot, then assert `Metadata.GPUDriverState` matches that expectation before asserting the `driver.enabled` override.
🤖 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 `@docs/integrator/aks-gpu-setup.md`:
- Around line 251-260: The values-file alternative must also configure the DRA
driver root. Update the YAML example near the operator settings to include the
nvidia-dra-driver-gpu nvidiaDriverRoot override set to /run/nvidia/driver, or
explicitly state that this override remains mandatory when using the values
file.
- Around line 223-235: Update the GPU Operator-managed AKS guidance to require
both --enable-managed-gpu=false and --gpu-driver None. In
docs/integrator/aks-gpu-setup.md lines 223-235, add --enable-managed-gpu=false
to the node-pool command; in lines 137-138, show both flags in the GPU
Operator-managed table entry; and in
recipes/components/gpu-operator/values-aks.yaml lines 24-29, revise the
alternative-mode comment to require both flags.
In `@pkg/client/v1/gpu_driver_state.go`:
- Around line 296-301: Update hasPreinstalledDriverProfile to validate the
complete coordinated preinstalled profile, not just driver.enabled=false:
require the expected toolkit and gdrcopy settings and the canonical driver root,
or reuse a canonical profile marker. Add a negative test proving an overlay with
only driver installation disabled is rejected and remains eligible for
auto-detection.
In `@pkg/recipe/driver_root_lockstep_test.go`:
- Around line 172-183: Update the driver-root validation in the test’s
driver.enabled=false branch to normalize draRoot before comparison, including
equivalent trailing-slash forms. Compare the normalized value against the
overlay’s declared host driver location, while preserving the existing rejection
of the operator-managed /run/nvidia/driver root.
In `@tests/uat/azure/cluster-config.yaml`:
- Around line 66-71: Update the UAT provisioning flow associated with the
gpuworker1 pool to explicitly delete and recreate the pool, or provision it
under a new pool name, when applying the gpuDriverInstall change. Ensure
existing pools are not reused with stale immutable driver-profile settings
before GPU recipe validation runs.
---
Outside diff comments:
In `@pkg/client/v1/aicr_test.go`:
- Around line 917-952: The table-driven GPU driver scenarios need to validate
snapshot metadata as well as injection. In the test cases around the existing
`wantInjected` fields, add an expected GPU driver state for each row based on
the snapshot, then assert `Metadata.GPUDriverState` matches that expectation
before asserting the `driver.enabled` override.
🪄 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: 1afa81cf-f5e4-4aaf-bc8c-372ab5b0ec00
📒 Files selected for processing (12)
docs/integrator/aks-gpu-setup.mddocs/user/cli-reference.mddocs/user/component-catalog.mdpkg/client/v1/aicr.gopkg/client/v1/aicr_test.gopkg/client/v1/gpu_driver_state.gopkg/client/v1/gpu_driver_state_test.gopkg/recipe/driver_root_lockstep_test.gorecipes/components/gpu-operator/values-aks-training.yamlrecipes/components/gpu-operator/values-aks.yamlrecipes/overlays/aks.yamltests/uat/azure/cluster-config.yaml
3f80850 to
0ba777a
Compare
0ba777a to
91d32bd
Compare
njhensley
left a comment
There was a problem hiding this comment.
Multi-persona review — approve with comments
Method. Four independent persona reviewers (Correctness · Security · Domain/Architecture · Operability/CI-DX) ran in parallel against head 0ba777a, then every finding was routed through an adversarial senior meta-reviewer that re-derived it from source. Templates were rendered through the real manifest.Render to confirm truth tables; docs anchors, BOM entries, and UAT gates were cross-checked against the actual files.
Legend: 🔴 Blocker · 🟠 Major · 🟡 Minor · 🔵 Nitpick
Overall
A large, unusually well-documented breaking change (AKS driver-ownership default flip), live-validated end-to-end on AKS H100 across all four intents. The core mechanics hold up: the driver-only tuple is coherent across base + training overlays, the Sprig-safe template gates have correct truth tables (absent→true, false→false, true→true), EKS renders are byte-identical, the dependency graph stays acyclic, and the two new privileged DaemonSets are correctly node-scoped with no injection surface and digest-pinned images.
No blocker or major finding survived independent reproduction. The persona-raised "major" (shipping the flip before the coherence guard) was retiered to minor because the incoherent path fails closed at deploy (gpu-operator-health / DRA CDI generation), is guarded by a docs migration note + snapshot-path warning, and the blocking guard (#1757) is release-blocking to the same v0.18.0 tag.
The one item worth a reply before merge is the sequencing condition (first inline comment) — confirm #1757 is release-blocking to the same tag as the flip. Everything else is optional polish; the readiness-latch rm -f (second inline comment) is the one I'd most encourage folding in as a one-line robustness fix.
Confirmed non-issues (examined, refuted, or fully pre-documented)
applyGPUDriverAutoOverridecontrol flow — all 4 states × profile combinations traced; no fall-through, AKS branch nil-guarded, remediation--setkeys matchregistry.yaml.- Template gates —
tuningEnabled/autoTaintNewNodestruth tables verified via real render; every branch is valid YAML; no danglingdependsOnon omittednvidia-tuned; EKS output byte-identical; whole-CR suppression correct for the single-package manifests. - Driver-only tuple coherence — base + training values both restate the full profile;
nfd.enabled=falsecorrectly inherited from genericvalues.yaml;driver.rdma.enabled=trueunderdriver.enabled=falsecoherently inert with the peermem-reloader substitute;gdrcopyoverrides fully removed from leaves. - Boot-window race / per-boot conformance masking — fully and accurately documented in the manifest header (#1839 durable fix); no undisclosed signal.
- DaemonSet security hygiene — static chroot commands, no injection; digest-pinned busybox (same digest both manifests); node scopings correct (
pci-15b3/kubernetes.azure.com/accelerator); drain-exemption nullifies the wildcard-toleration hazard;toolkit.enabled=falsedrops no isolation control beyond the two restored keys. - Docs / anchors / BOM / UAT — override tuples byte-match across doc/values/code; all intra-repo anchors resolve (no dangling old slug); BOM regenerated with correct busybox entries and counts;
training: v0.18.0UAT gate correctly mirrors the inference gate. - Lazy
templatesDir— no path leaves an emptytemplates/; template-less charts install as harmless no-ops.
Summary
| 🔴 Blocker | 🟠 Major | 🟡 Minor | 🔵 Nitpick |
|---|---|---|---|
| 0 | 0 | 2 | 5 |
Recommendation: Approve with comments.
🤖 Reviewed with a multi-persona + adversarial meta-review harness.
91d32bd to
9ebe07c
Compare
9ebe07c to
85449d5
Compare
e0d2e45 to
ce93ba1
Compare
njhensley
left a comment
There was a problem hiding this comment.
Re-review @ ce93ba1 — approve holds ✅
Re-reviewed the revision pushed since the first pass (0ba777a → ce93ba1). It addresses the review directly, with tests. No blocker / major / minor. Approval stands.
Prior findings → resolved:
- 🟡 Readiness probe one-shot latch — fixed:
rm -f /tmp/hardenedin the else branch, fail-closed semantics (a transient valid-but-permissive rewrite is repaired by the next re-assert, not flapped). Pinned byTestToolkitHardeningGate. - 🔵 Header over-claim ("closes the unauthorized-GPU path") — reworded to the ENV-VAR path; the volume-mounts path is now explicitly documented as open (with the toolkit-v1.19.1
/dev/null-source detail + admission-policy guidance), and green conformance is noted as not proof of complete isolation. - 🔵
readinessProbecould deadlock the managed-fallback helm-wait — fixed cleanly: the DaemonSet now renders only whentoolkit.enabled=false, so it's omitted under the GPU-Operator-managed fallback; that profile is hardened instead viatoolkit.env(ACCEPT_NVIDIA_VISIBLE_DEVICES_*).TestAKSToolkitEnvHardenedasserts the exact name→value pairs. - 🔵 Untested mixed-manifest empty-render path — fixed:
TestWriteMixedManifests_AllManifestsEmpty(now load-bearing, since the managed fallback makes the hardening manifest render empty). - Bonus:
hasPreinstalledDriverProfilenow warns on a values read error instead of silently suppressing the absent-driver mismatch warning.
New in this revision (verified): the tuning Skyhook CRs are now release-managed (Helm hooks removed → aicr/skip-hook-validation), resolving the Flux-orphaning limitation (was #1842). Confirmed safe: stripHelmHooks already strips hook annotations at bundle time, so helm/argo output is unchanged and Flux now prunes correctly on a tuningEnabled flip; CRD ordering is preserved via the nodewright-customizations → nodewright-operator dependency. Docs updated thoroughly, including the one-time Flux migration note.
The two inline comments below are optional, non-blocking nits carried over from the first pass (both already benign). The sequencing condition from the first review still applies: #1757 (bundle-time coherence guard) should be release-blocking to the same tag as this flip.
🤖 Re-reviewed with a multi-persona + adversarial meta-review harness.
| # --set gpuoperator:driver.enabled=true \ | ||
| # --set gpuoperator:toolkit.enabled=true \ | ||
| # --set gpuoperator:operator.runtimeClass=nvidia \ | ||
| # --set dradriver:nvidiaDriverRoot=/run/nvidia/driver |
There was a problem hiding this comment.
🔵 Nitpick — Flip tuple omits gpuoperator:hostPaths.driverInstallDir (optional, carried over)
The documented GPU-Operator-managed override tuple sets dradriver:nvidiaDriverRoot=/run/nvidia/driver but not driverInstallDir. This is benign — AICR's base values.yaml already pins hostPaths.driverInstallDir=/run/nvidia/driver, so the two stay in lockstep and it is NOT fragile against a chart-default bump. Only residual is that the manual --set flip path is unexercised by TestDriverRootLockstep.
Blast radius: None today; non-default managed fallback only.
Fix: Optional: add the override for explicitness, or note in docs that driverInstallDir is already pinned by base values.yaml so no override is needed. Not blocking.
| initialDelaySeconds: 2 | ||
| periodSeconds: 10 | ||
| securityContext: | ||
| privileged: true |
There was a problem hiding this comment.
🔵 Nitpick — privileged:true where scoped capabilities may suffice (optional, carried over)
Both new DaemonSets use privileged: true. Least-privilege: SYS_CHROOT (this DS) and SYS_CHROOT+SYS_MODULE (nvidia-peermem-reloader.yaml L112) plus the existing hostPath may suffice. Matches in-repo (gke-nccl-tcpxo) and Azure reference precedent, so not a defect.
Blast radius: Widened host attack surface if the busybox image/supply chain is ever compromised.
Fix: Only if pursued: bench-test capabilities.add:[SYS_CHROOT] / [SYS_CHROOT,SYS_MODULE] with privileged:false on a real AKS ND-H100 node before adopting — chroot'd host binaries may need more caps or interact with AppArmor. Do not change blind. Not blocking.
Flip the AKS gpu-operator values to the AKS driver-only install
profile — the Azure default, where the node image preinstalls the
NVIDIA driver and container toolkit: driver.enabled=false,
toolkit.enabled=false, operator.runtimeClass=nvidia-container-runtime
in values-aks.yaml and values-aks-training.yaml. The AKS overlay also
retargets nvidia-dra-driver-gpu's nvidiaDriverRoot to the host root
("/"), since nothing populates /run/nvidia/driver in this profile,
and the driver-root lockstep test now rejects a preinstalled-driver
overlay that inherits the container driver root.
The previous GPU-Operator-managed default (--gpu-driver none pools)
remains supported as an explicit bundle-time override set (gpu-operator
driver/toolkit/runtimeClass plus dradriver:nvidiaDriverRoot) and is
documented as the alternative profile.
AKS overlays now carry the preinstalled-driver marker, so the snapshot
driver auto-detect injects the audited driver.enabled=false override on
AKS instead of warning. The inverse mismatch — a preinstalled-driver
overlay resolved against a snapshot whose sampled GPU node has no
NVIDIA driver loaded (the --gpu-driver none signature) — warns with the
bundle-time override set; a blocking bundle-time ownership-coherence
validation is tracked in NVIDIA#1757 (release-blocking for the next tag).
The nodewright nvidia-tuned package is also disabled by default on AKS
via a new per-package tuningEnabled gate in tuning.yaml (the AKS
overlays set it to false): this avoids the package's node-reboot
interrupt, and an A/B on an AKS H100 cluster showed the tuned inference
profile (isolcpus/hugepages) regressing TTFT from ~550ms to ~6s.
nvidia-setup stays enabled — on AKS it carries the RDMA host prep
(MEMLOCK limits + IB module loading) that replaced the ib-node-config
DaemonSet. Non-AKS renderings are byte-identical. Re-enable with
--set nodewrightcustomizations:tuningEnabled=true.
All tuningEnabled and autoTaintNewNodes template gates are written
Sprig-safe (index + explicit-false compare, never "| default true"):
Sprig's default treats boolean false as empty, so under --deployer
flux (raw template to real Helm) an explicit false would be silently
swallowed and re-enable the gated behavior. In-repo engine renderings
are byte-identical pre/post rewrite.
gdrcopy is disabled in the AKS values (and the leaf-overlay overrides
removed): the operator deploys GDRCopy as a sidecar
in the operator-managed driver pod, so it cannot deploy under the
driver-only profile; re-enable it with the GPU-Operator-managed override set.
GPUDirect RDMA under the driver-only profile: with no operator
driver DaemonSet, nothing loads nvidia-peermem (the AKS-managed
driver does not load it automatically), so ship Azure's
nvidia-peermem-reloader DaemonSet as a network-operator manifest —
a probeless retry loop (Ready immediately) re-asserts modprobe via
chroot into the host root — the node's own kmod, no runtime apt, a
digest-pinned busybox image. No readiness gate: deployers helm-wait
on the network-operator manifests before gpu-operator installs, so a
modprobe-gated probe would deadlock the GPU-Operator-managed fallback
profile, where the driver appears only after gpu-operator deploys
(and whose driver pod loads nvidia-peermem itself). Scoped to IB-capable
nodes (pci-15b3 NFD label) and removed by the documented RDMA
opt-out. Reference: aks-rdma-infiniband configs/nvidia-peermem-reloader.
Cross-review polish: normalize driverInstallDir before the NVIDIA#1106
hard guard in the lockstep test (an equivalent spelling like // could
previously dodge it via the gpu-operator-only early skip); reloader
tolerates all taints like the network-operator-managed DaemonSets it
accompanies (custom-tainted pools must not silently lose GPUDirect
RDMA; DaemonSet pods are drain-exempt so the AKS wildcard hazard
does not apply).
In-place upgrades do not revert previously applied nvidia-tuned host
state (no uninstall block; nodewright uninstall defaults off) — a
migration note in aks-gpu-setup.md documents node-pool recreation as
the clean path; automated remediation is tracked in NVIDIA#1820.
Recipes persisted before this flip resolve the new values while
retaining their old baked DRA overrides; regenerate them (documented
in aks-gpu-setup.md). The committed examples/recipes/aks-training.yaml
is regenerated here for that reason.
The Azure UAT cluster config flips gpuDriverInstall to true to match;
existing GPU pools provisioned driverless must be recreated before the
next Azure UAT run.
Cross-review round (parallel session, reconciled):
- Warn text: recommend the GPU-Operator-managed override tuple only on
AKS; GKE-COS/OKE mismatch clusters get generic reprovisioning
guidance (the tuple is incoherent there). Docs aligned. The stacked
NVIDIA#1819 supersedes this with the fully provider/OS-aware remedy.
- tuningEnabled gate applied uniformly to the single-package tuning
manifests (tuning-gke.yaml, tuning-generic.yaml) by gating the whole
Skyhook CR; catalog-wide test pins default/false/true renders.
- Curate examples/recipes/aks-training.yaml (1732 -> 229 lines) by
stripping registry-hydrated healthCheckAsserts; rendered bundle
verified byte-identical apart from the embedded input copy.
- Document the vendored-bundle post-install-hook lifecycle
(bundling.md, with the corrected <NNN>-<component>/templates/ path)
and the nodewright-customizations health-check gate limitation
(nodewright.md).
Gate Azure release training cells to v0.18.0 in the UAT registry
(same mechanism and first-carrying release as the existing inference
gate): release cells provision from main's cluster-config —
gpuDriverInstall: true after this flip — while running the released
binary, and v0.17.0 and older embed the pre-flip operator-managed
profile, which would deploy a second driver stack on the Azure-managed
pool and invalidate the nightly compatibility cell.
Validated end-to-end on a live AKS H100 cluster (aicr-test6, 2x
Standard_ND96isr_H100_v5, node image
AKSUbuntu-2404gen2containerd-202606.19.0, kernel 6.8.0-1059-azure,
preinstalled driver 580.126.09, gpuProfile.driver=Install), 2026-07-21:
deployment phase 4/4 checks passed for BOTH intents (operator-health,
expected-resources, gpu-operator-version, check-nvidia-smi), and the
training performance phase passed the calibrated NCCL all-reduce gate
at 157.29 GB/s (16 GiB message size, 2 nodes, gate >= 150).
aks-gpu-setup.md's "not yet validated end-to-end" caveat is replaced
with this evidence, scoped honestly to H100 / this node image.
peermem nuance from the same cluster, documented in aks-gpu-setup.md:
this node image's preinstalled nvidia-peermem.ko is a stub DKMS build —
modprobe fails with Invalid argument and no dmesg trace (NVIDIA's
conftest found no OFED-style headers at image bake and compiled the
peer-memory support out) — even though the running kernel exports
ib_register_peer_memory_client and the IB stack is loaded after
nodewright host prep. The reloader's retry loop is the expected steady
state there; GPUDirect RDMA is carried by the DMA-BUF path (driver 580
+ kernel 6.8 + mlx5 + a DMA-BUF-capable NCCL), which is what delivered
the 157.29 GB/s. The host-staging fallback warning is now scoped to
images where neither path is available.
Dynamo inference validated on the same cluster and build:
h100-aks-ubuntu-inference-dynamo deployment 4/4 and inference-perf
PASSED at 148,004.43 tok/s (gate >= 50,000) with TTFT p99 579.70 ms
(gate <= 2,000) — Qwen/Qwen3-8B, 256 concurrency/GPU, dynamo-router,
8 vLLM decode workers on one ND96isr node, GPUDirect via DMA-BUF,
tuningEnabled=false. This reconfirms the untuned-profile numbers from
the earlier aicr-test5 A/B (~146k tok/s / 547 ms) on a second cluster.
The AKS Dynamo overlay's gate comment now records this Azure baseline
(gate values unchanged — deliberately conservative smoke thresholds).
The first inference-perf attempt failed with "DynamoGraphDeployment
not ready: TIMEOUT" — storage-bound, not performance: 8 workers
cold-loading the 15.26 GiB checkpoint concurrently from one RWO
model-cache PVC on the cluster-default Azure disk StorageClass read
shards at ~95 s each, exceeding the default 10m
AICR_INFERENCE_PERF_WORKLOAD_READY_TIMEOUT. It passed after the
documented --data catalog override (ready timeout 25m, health timeout
10m, entry timeout 80m); the faster-StorageClass alternative
(AICR_INFERENCE_PERF_MODEL_CACHE_STORAGE_CLASS) also documented, both
in aks-gpu-setup.md.
Device-isolation hardening: under the driver-only profile there is no
gpu-operator toolkit DaemonSet, so the AKS node image's permissive
toolkit defaults (accept-nvidia-visible-devices-envvar-when-unprivileged
=true) let any unprivileged pod with NVIDIA_VISIBLE_DEVICES=all grab all
GPUs unallocated — a secure-accelerator-access conformance failure. Ship
an nvidia-toolkit-hardening DaemonSet (gpu-operator manifest) that
re-asserts the hardened keys via nvidia-ctk config --in-place. Verified
on aicr-test6: full validate (deployment+conformance+performance) 15/16
passed, 0 failed, secure-accelerator-access green, allocated pods still
see exactly their devices. nvidia-setup migration tracked in NVIDIA#1839.
Signed-off-by: Yuan Chen <[email protected]>
ce93ba1 to
fa345b9
Compare
…mo (unsigned pointers) Fresh three-phase runs on aicr-test6 (AKS H100, Azure-managed driver profile per NVIDIA#1756) at main@1179103f, post gpu-operator CDI/toolkit- hardening upgrade. Inference: 145.3k tok/s, TTFT p99 604ms. Signed-off-by: Yuan Chen <[email protected]>
Adds the blocking bundle-generation validation CheckDriverOwnershipCoherence (registered on gpu-operator at severity: error). It evaluates the final effective values — recipe merge plus all --set/--set-json/--set-file overrides, resolved under canonical component names and registry aliases in the bundler's own application order — and blocks incoherent GPU driver-ownership profiles before a bundle is produced. Rule 1 (driverless cluster, gated on recorded snapshot state): when the snapshot observed no NVIDIA kernel driver (metadata.gpuDriverState=absent), an effective config with driver.enabled=false (or toolkit.enabled explicitly false) is blocked — deploying it would leave GPU nodes driverless. Empty state disarms the gate, so older recipes and GPU-less snapshots never trip it. Rule 2 (DRA driver-root lockstep, metadata-independent): with driver.enabled=true, nvidia-dra-driver-gpu.nvidiaDriverRoot must equal gpu-operator hostPaths.driverInstallDir or CDI spec generation fails. With a preinstalled driver, the DRA root must avoid the unpopulated operator container root and may intentionally differ from hostPaths.driverInstallDir. This also catches legacy pre-NVIDIA#1756 recipes that carry no recorded state. Two adjacent hardening fixes on the bundler value path the gate depends on: extractComponentValues now fails closed on a value-resolution error instead of logging a warning and rendering the component from an empty map; and component validation failures preserve an already-coded error (ErrCodeTimeout / ErrCodeInternal) instead of flattening every failure to ErrCodeInvalidRequest. Fixes: NVIDIA#1757 Related: NVIDIA#1756 Signed-off-by: Yuan Chen <[email protected]>
Summary
Switches the AKS recipes' default GPU ownership mode from GPU-Operator-managed to the AKS driver-only (Azure-managed) profile — the Azure default, where the AKS node image preinstalls the NVIDIA driver and container toolkit:
driver.enabled=false,toolkit.enabled=false,operator.runtimeClass=nvidia-container-runtime, plus DRAnvidiaDriverRoot=/. The AKS recipes also ship with the nodewrightnvidia-tunedpackage disabled by default under this profile via a new per-packagetuningEnabledgate (nvidia-setup/RDMA host prep still runs).Motivation / Context
AICR defaults should follow the CSP default. Azure's default node pool provisioning (
--enable-managed-gpu=false, no--gpu-driver none) preinstalls the driver and container toolkit, but the AKS recipes assumed the GPU-Operator-managed profile (--gpu-driver nonepools). This PR makes the CSP default the recipe default; GPU-Operator-managed mode remains supported as a documented, explicit bundle-time override set.A blocking bundle-time driver-ownership coherence validation (driverless-cluster mismatch, partial profile flips, legacy-recipe handling) is deliberately not part of this PR — it is tracked in #1757 (release-blocking) and implemented by the stacked PR #1819. #1819 must actually merge in the same tagged release as this flip (not merely be labeled) so users transition atomically from a pre-flip release to a release carrying both the flip and the guard (agreed review disposition).
Fixes: N/A
Related: #1680, #1687, #1757; evidence in #1840
Type of Change
Component(s) Affected
pkg/recipe)docs/,examples/)pkg/client/v1(driver auto-detect),recipes/,tests/uat/azureImplementation Notes
values-aks.yamlandvalues-aks-training.yamlboth restate the full profile because a training overlay'svaluesFilereplaces the base's.driver.rdma.useHostMofed=falseand the toolkitRUNTIME_CONFIG_SOURCE=fileenv (gpu-operator toolkit writes v4 containerd drop-in on AKS, kills containerd #1688) stay declared — inert in driver-only mode, but correct if an ownership-mode flip re-enables them.driver.enabled=falsenothing populates/run/nvidia/driver, so the AKS overlay retargetsnvidia-dra-driver-gpu.nvidiaDriverRootto/(host-installed driver), matching OKE/kind.TestDriverRootLockstepnow rejects any preinstalled-driver overlay that inherits the container driver root instead of skipping. The GPU-Operator-managed override set therefore includes--set dradriver:nvidiaDriverRoot=/run/nvidia/driver.driver.enabled=falseoverride on AKS (previously warn-and-skip). The inverse mismatch — an AKS recipe resolved against a snapshot whose sampled GPU node has no driver loaded (--gpu-driver nonesignature) — logs a warning naming the bundle-time GPU-Operator-managed override set; blocking enforcement is [release blocker] Bundle-time GPU driver-ownership coherence validation for preinstalled-driver profiles #1757.tuning.yamlgains a per-packagetuningEnabledgate (defaulttrue); the AKS overlays set it tofalse. Disabling skips the package's node-reboot interrupt, and an A/B on an AKS H100 cluster measured the tuned inference profile (isolcpus/hugepages) regressing TTFT from ~550 ms to ~6 s, so untuned is the better default today. With the gate off,nvidia-setup-fullchainsdependsOndirectly offnvidia-setup-kernel(no dangling reference to the omitted package).nvidia-setupstays enabled — on AKS it carries the RDMA host prep (MEMLOCK limits + IB module loading) that replaced theib-node-configDaemonSet. Re-enable with--set nodewrightcustomizations:tuningEnabled=true. ThetuningEnabledgate predicate itself leaves non-AKS (EKS/GKE) renderings byte-identical; note that the separate Helm-hook removal on the tuning Skyhook CR (below) does change that CR's annotations on all deployers — a one-time GitOps checksum drift for existing EKS/GKE users, intentional sotuningEnabled=falseretracts the CR under Flux. Documented inaks-gpu-setup.md.tuningEnabledgates (package +dependsOnswitch) and all fourautoTaintNewNodessites (tuning.yaml,no-op.yaml,tuning-generic.yaml,tuning-gke.yaml) usene (toString (index $cust "<key>")) "false"— the same predicate as the file'senabledgate — instead of| default true. Sprig'sdefaulttreats booleanfalseas empty, so under--deployer flux(raw template shipped to real Helm) an explicitfalsewas silently swallowed and re-enabled the gated behavior; the in-repo engine was unaffected. Semantics: only explicitfalsedisables; absent/truerender.gdrcopy.enabled: falseinvalues-aks.yaml/values-aks-training.yaml, and the inlinegdrcopy.enabled: trueoverrides removed from theh100-aks-training/a100-aks-trainingoverlays — the operator deploys gdrcopy as a sidecar container in the operator-managed driver pod, so it cannot deploy withdriver.enabled=false. Whether GDRCopy capability exists on the Azure-managed image (node-imagegdrdrv) is unverified; documented inaks-gpu-setup.mdwith the GPU-Operator-managed re-enable path.nvidia-peermem) preserved under the driver-only default: withdriver.enabled=falsethere is no operator driver DaemonSet to loadnvidia-peermem, and the AKS-managed driver does not load it automatically — Azure's RDMA guidance requires a dedicated reloader in this mode. The AKS recipes now ship Azure'snvidia-peermem-reloaderDaemonSet as anetwork-operatormanifest (a probeless retry loop — Ready immediately — re-assertsmodprobevia chroot into the host root, so the node's own kmod loads the module: no runtime apt, digest-pinned busybox image, and no readiness gate that could deadlock the GPU-Operator-managed fallback profile, where the driver only appears after gpu-operator installs and the operator's driver pod loadsnvidia-peermemitself), scoped to IB-capable nodes via the samepci-15b3NFD label as the NicClusterPolicy and removed by the documented RDMA opt-out (--set networkoperator:enabled=false). Documented inaks-gpu-setup.md; example regenerated (sole delta: the added manifest file); BOM regenerated (adds the digest-pinneddocker.io/library/busyboximage to the network-operator section).nvidia-tunedto atuningEnabled: falsebundle does not revert the applied host state (no uninstall block; nodewright uninstall defaults off) —aks-gpu-setup.mddocuments node-pool recreation as the clean path; automated remediation is tracked in nodewright: revert applied nvidia-tuned host state when tuning is disabled #1820.docs/integrator/components/nodewright.mdcannot see value gates; an annotation below it notes AKS disablesnvidia-tunedby default.tests/uat/azure/cluster-config.yamlflipsgpuDriverInstall: trueto match. The existing Azure UAT cluster's GPU pool was provisioned driverless (gpuDriverInstall: false) and must be recreated before the next Azure UAT run.Standard_ND96isr_H100_v5, node imageAKSUbuntu-2404gen2containerd-202606.19.0, kernel6.8.0-1059-azure, preinstalled driver 580.126.09,gpuProfile.driver=Install. Deployment phase 4/4 checks passed for both intents (operator-health, expected-resources, gpu-operator-version, check-nvidia-smi); the training performance phase passed the calibrated NCCL all-reduce gate at 157.29 GB/s (16 GiB message size, 2 nodes, gate >= 150).aks-gpu-setup.mdrecords this in place of the earlier "not yet validated end-to-end" caveat, scoped to H100 / this node image (other SKUs unexercised). The GPU-Operator-managed alternative was previously validated on aicr-test1.aks-gpu-setup.md): this node image's preinstallednvidia-peermem.kois a stub DKMS build —modprobe nvidia-peermemfails withInvalid argumentand no dmesg trace (the signature of NVIDIA's conftest finding no OFED-style headers at image bake and compiling the peer-memory support out) — even though the running kernel exportsib_register_peer_memory_clientand the IB stack (ib_core,mlx5_ib) is loaded after nodewright host prep. The reloader's retry loop is the designed harmless steady state there; GPUDirect RDMA is carried by the DMA-BUF path (driver 580 + kernel 6.8 + mlx5 + a DMA-BUF-capable NCCL), which is what delivered the 157.29 GB/s. The doc's host-staging fallback warning is now scoped to images where neither path is available.driver.enabled=false/toolkit.enabled=falsethere is no operator toolkit DaemonSet to harden/etc/nvidia-container-runtime/config.toml, so the AKS node image's permissive toolkit defaults let any unprivileged pod withNVIDIA_VISIBLE_DEVICES=allgrab all host GPUs unallocated (asecure-accelerator-accessfailure). The AKS recipes ship annvidia-toolkit-hardeningDaemonSet that re-asserts the hardened keys vianvidia-ctk config --in-place, with a fail-closed readiness probe (Ready only whilenvidia-ctkcan harden the config — a missing/incompatible toolkit surfaces instead of latching green; a transient valid permissive rewrite is self-repaired by the next assert within 60s, no Ready transition). The DaemonSet renders only in the driver-only profile (toolkit.enabled=false); under the GPU-Operator-managed fallback (--gpu-driver none+toolkit.enabled=true) it is gated off (the operator owns the toolkit; the same hardened keys are set viagpu-operator.toolkit.envACCEPT_NVIDIA_VISIBLE_DEVICES_*invalues-aks*.yaml), which also avoids a helm-wait deadlock wherenvidia-ctkisn't preinstalled. Scope: this closes the env-var device-request path (the onesecure-accelerator-accessexercises); the volume-mounts path remains open (same posture as operator-managed mode), so full multi-tenant isolation additionally needs an admission policy restricting a/dev/null-backed mount whose destination is under/var/run/nvidia-container-devices. Migrating into nodewrightnvidia-setup(pre-schedulable, closes the boot-window race) is tracked in Migrate AKS driver-only toolkit device-isolation hardening into nvidia-setup #1839. Documented inaks-gpu-setup.md.aicr recipe) or supply the complete four-flag GPU-Operator-managed override set. Documented inaks-gpu-setup.md; automatic detection/enforcement is [release blocker] Bundle-time GPU driver-ownership coherence validation for preinstalled-driver profiles #1757 (release-blocking). The committedexamples/recipes/aks-training.yamlis regenerated in this PR for exactly this reason — the pre-flip example rendered an incoherent driver/DRA combination on this branch (verified: the regenerated example bundles todriver.enabled=false,toolkit.enabled=false,operator.runtimeClass=nvidia-container-runtime, DRA root/).make bom-docsregenerated (the BOM renders from basevalues.yaml); the only delta across the branch is upstream digest drift, committed — see Testing.Testing
make qualify # test-coverage, lint, tuning-check, e2e, scan, license-check — all passCoverage:
pkg/client/v176.8% → 77.0%,pkg/recipe87.5% → 87.5%.Updated tests:
TestResolveRecipeFromSnapshot_GPUDriverAutoDetect(AKS+preinstalled now injects; AKS/GKE-COS+absent warns, no injection), strengthenedTestDriverRootLockstep(preinstalled-driver overlays must not inherit the container DRA root).Regenerated example verified:
aicr bundle -r examples/recipes/aks-training.yamlrendersdriver.enabled=false,toolkit.enabled=false,operator.runtimeClass=nvidia-container-runtime, DRA root/. (Example regen + docs note landed after the full qualify run; scoped checks for that delta: yamllint on the regenerated YAML and the bundle-render verification above — generated-artifact/doc-only, no Go or lintable-config change.)Example regenerated post-tuning-gate:
examples/recipes/aks-training.yamlre-resolved with the dev CLI at the final head, now carryingtuningEnabled: falseon nodewright-customizations; bundle render of the example omitsnvidia-tuned; yamllint +go test -race ./pkg/recipe/...green.nvidia-tuned gate: new
TestNodewrightTuningGateAcrossCatalog(pkg/recipe) renders the realtuning.yamlfor every catalog leaf wiring it — all 3 AKS leaves omitnvidia-tunedand rewiredependsOntonvidia-setup-kernel; all 10 EKS leaves keep the full chain; flippingtuningEnabled=trueover AKS values restores it. Render evidence: EKS output is byte-identical pre/post change;--set nodewrightcustomizations:tuningEnabled=truerestores the pre-change AKS rendering byte-for-byte. Scoped gates for this delta:go build ./...,go test -raceonpkg/recipe,pkg/tuning,pkg/bom,pkg/manifest,golangci-linton./pkg/recipe/...(0 issues, isolated caches), yamllint on the changed overlays, andmake bom-docs(no diff attributable to this change; a pre-existing upstreamubuntu:24.04→26.04image drift in an unrelated GKE component was observed; committed in a later revision — see Testing).End-to-end CLI verification:
aicr queryconfirms rendered valuesdriver.enabled=false,toolkit.enabled=false,operator.runtimeClass=nvidia-container-runtime, DRA root/for both intents; a driver-loaded snapshot resolves the full 7-overlay AKS chain with the injected override; a no-driver snapshot resolves with the mismatch warning; bundling with the four GPU-Operator-managed overrides rendersdriver.enabled=true,runtimeClass=nvidia, DRA root/run/nvidia/driver.Sprig-gate verification: real
helm template(Helm v4.2.3) reproduces the pre-fix bug (tuningEnabled: falsestill renderednvidia-tuned;autoTaintNewNodes: falserenderedtrue) and confirms the fix (falsedisables, absent/truerender,dependsOnrewires); an in-repopkg/manifest.Renderbyte-compare across all 4 nodewright manifests x 3 value sets (absent / explicit false / explicit true) is byte-identical pre/post rewrite, so no deployed manifest changes for the in-repo engine.Live-cluster validation (aicr-test6: AKS, 2x
Standard_ND96isr_H100_v5, Azure-managed driver 580.126.09, node imageAKSUbuntu-2404gen2containerd-202606.19.0; dev build of this branch, driver-only profile,tuningEnabled=false, 2026-07-21) — complete results:h100-aks-trainingnccl-all-reduce-bwpassed — 157.29 GB/s @ 16 GiB across 2 nodes (gate >= 150)h100-aks-inferenceh100-aks-ubuntu-inference-dynamoinference-perfpassed — 147,601 tok/s (gate >= 50,000), TTFT p99 564 ms (gate <= 2,000); Qwen/Qwen3-8B @ 256 concurrency/GPU, dynamo-routerh100-aks-ubuntu-training-kubeflownccl-all-reduce-bwpassed — 157.48 GB/s (gate >= 150)Two full-phase runs (deployment + conformance + performance, each with an attestation bundle emitted) —
h100-aks-ubuntu-inference-dynamoandh100-aks-ubuntu-training-kubeflow— passed every conformance check includingsecure-accelerator-access, confirming the device-isolation hardening (Implementation Notes) closes the gap on both intents:cluster-autoscalingis the only skip (no Karpenter on this cluster). An earlier deployment/performance-only cycle reported an unhardened-baselinesecure-accelerator-accessFAIL before the hardening DaemonSet was added; the fix flips it to pass while an allocated 1-GPU pod still sees exactly its device. The training-kubeflow run added only thekubeflow-trainercomponents on top of the existing stack (no teardown of the shared or inference components).Context: recipes were generated from a live cluster snapshot (driver auto-detect injected
driver.enabled=false); full undeploy + clean-sweep between the training and inference cycles (0 releases/CRDs/webhooks residue); Skyhook rannvidia-setuponly (tuningEnabled=false), one rolling reboot on first deploy, host state survived redeploy; NCCL bandwidth was delivered via the DMA-BUF GPUDirect path with the peermem reloader in its expected retry loop (stubnvidia-peermem.koon this node image; see Implementation Notes). The Dynamo runs also reconfirm the untuned-profile inference numbers from the earlier aicr-test5 A/B (~146k tok/s / 547 ms) on a second cluster.First
inference-perfattempt failed withDynamoGraphDeployment not ready: TIMEOUT— storage-bound, not a performance failure: 8 vLLM decode workers cold-loading the 15.26 GiB checkpoint concurrently from one RWO model-cache PVC on the cluster-default Azure disk StorageClass read shards at ~95 s each, exceeding the default 10mAICR_INFERENCE_PERF_WORKLOAD_READY_TIMEOUT. Passed after the documented--datacatalog-entry override (ready timeout 25m, health timeout 10m, entry timeout 65m → 80m); both this and the faster-StorageClass alternative (AICR_INFERENCE_PERF_MODEL_CACHE_STORAGE_CLASS) are now documented inaks-gpu-setup.md, and the AKS Dynamo overlay's gate comment records the Azure baseline (gate values deliberately unchanged — conservative smoke thresholds). Doc + overlay-comment deltas on top of the fully-qualified head: scoped verification = yamllint (repo config) on the changed overlay, no heading/anchor changes inaks-gpu-setup.md(inbound links grepped),go test ./pkg/uatbroker/...green — comment/doc-only, no Go gates needed.Post-fix scoped gates: yamllint on all changed YAML;
go test -race ./pkg/recipe/...green (TestNodewrightTuningGateAcrossCatalogunchanged — the new predicate is behavior-identical in-repo); example regenerated with the rebuilt CLI, sole delta the removed gdrcopy override (tuningEnabled: falseretained);make bom-docsregen committed: the sole delta is the upstreamubuntu:24.04->26.04digest drift in the GKE section (the gdrcopy flip produced no BOM delta); committed per the repo rule that a values-file PR carries the fresh BOM, sincebom-checkis not wired into CI.Cross-review round (parallel session, reconciled into the single commit): the resolution-time warning now recommends the GPU-Operator-managed tuple only on AKS (generic reprovisioning guidance on GKE-COS/OKE, where the tuple is incoherent; the stacked #1819 supersedes this with the fully provider/OS-aware remedy); the
tuningEnabledgate applies uniformly to the single-package tuning manifests (tuning-gke.yaml,tuning-generic.yaml) with a catalog-wide render test;examples/recipes/aks-training.yamlis curated (1732 → 229 lines, registry-hydratedhealthCheckAssertsstripped, rendered bundle byte-identical); bundling.md documents the vendored post-install-hook lifecycle and nodewright.md the health-check gate limitation. The UAT registry gates Azure release training cells to v0.18.0 (same mechanism as the existing inference gate): release cells provision from main'sgpuDriverInstall: trueconfig while running a released binary that embeds the pre-flip operator-managed profile — a second driver stack on the Azure-managed pool would invalidate the nightly compatibility cell.Known caveats (dispositioned, non-blocking)
These were raised in review and considered; none can produce a broken supported configuration, and the two that could have been real were closed empirically by the aicr-test6 validation.
toolkit.enabled=false— validated in practice: full three-phase validation passed with the toolkit disabled (device allocation works,check-nvidia-smiandsecure-accelerator-accessgranted-container both pass). The only residual is the narrow CDI-opt-in path (cdi.default: false), which no default workload hits.nvidia-ctk config --setcompatibility across node images — confirmed working withnvidia-ctk1.18.2 on the tested image. On an image without it, the hardening DaemonSet's new readiness probe means the pod never reports Ready, so it fails visibly at deploy time rather than silently.NVIDIA_VISIBLE_DEVICES=allpod (which requests nonvidia.com/gpu) schedules before the first assert. Shipping this as interim defense-in-depth with the readiness probe; the durable, pre-schedulable fix requires a nodewrightnvidia-setuppackage change plus an aicr pin bump, tracked with a two-repo plan in Migrate AKS driver-only toolkit device-isolation hardening into nvidia-setup #1839.training: v0.18.0); a manualuat-rundispatch could still pairgpuDriverInstall: truewith a pre-flip release, but that is deliberate operator action that fails loudly at deploy, not an automated-path defect.gdrdrvon the Azure node image — moot by default: GDRCopy is disabled (gdrcopy.enabled: false); GPUDirect RDMA rides the DMA-BUF path (validated at 157 GB/s). Whether the image shipsgdrdrvonly matters if a user opts GDRCopy back in.Risk Assessment
Rollout notes: Existing AKS deployments keep working; regenerated bundles now default to the driver-only profile. Clusters with
--gpu-driver nonepools must either be reprovisioned with the AKS default driver install or bundle with--set gpuoperator:driver.enabled=true --set gpuoperator:toolkit.enabled=true --set gpuoperator:operator.runtimeClass=nvidia --set dradriver:nvidiaDriverRoot=/run/nvidia/driver. Pre-change AKS recipes should be regenerated. The Azure UAT cluster needs its GPU pool recreated (see Implementation Notes).Checklist
make testwith-race)make lint)git commit -S) — GPG signing info