Skip to content

fix(recipes): align AKS training with GPU Operator-managed default - #1680

Merged
mchmarny merged 4 commits into
NVIDIA:mainfrom
yuanchen8911:fix-aks-training-gpu-ownership
Jul 9, 2026
Merged

mchmarny merged 4 commits into
NVIDIA:mainfrom
yuanchen8911:fix-aks-training-gpu-ownership

Conversation

@yuanchen8911

@yuanchen8911 yuanchen8911 commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

AKS has two mutually exclusive GPU ownership modes: GPU Operator-managed (nodepool created with --gpu-driver none, AKS's "None/BYO" install profile; driver.enabled=true + toolkit.enabled=true; GPU Operator installs the driver and configures containerd via its toolkit DaemonSet) and AKS driver-only (AKS's default "Driver only" install profile, --enable-managed-gpu=false; driver.enabled=false + toolkit.enabled=false + operator.runtimeClass=nvidia-container-runtime, always all three together — only driver/runtime ownership transfers; the GPU Operator still owns the device plugin, DCGM exporter, and the rest of the GPU stack). The AKS training values (values-aks-training.yaml) shipped a broken hybrid — toolkit.enabled: false while inheriting driver.enabled: true — that no AKS node image satisfies. This PR removes the toolkit override so training inherits the global toolkit.enabled: true, aligning it with inference and the documented GPU Operator-managed default. It also corrects driver.rdma.useHostMofed from true to false in both AKS values files: AICR supplies MOFED through network-operator's OFED container (doca-driver), which is not host-preinstalled MOFED, and true causes an ib_core symbol mismatch when building nvidia_peermem. The AKS GPU setup doc now documents both ownership modes as complete provisioning profiles.

Motivation / Context

Surfaced during the Azure H100 bringup on the aicr-test1 cluster (Standard_ND96isr_H100_v5, gpuProfile.driver: None, maxPods 30):

  • Broken hybrid (toolkit disabled on a --gpu-driver none pool): with toolkit.enabled=false nothing configures containerd's nvidia runtime handler, so every gpu-operator operand stuck in Init with FailedCreatePodSandBox: no runtime for "nvidia" is configured, and GPU nodes advertised zero nvidia.com/gpu. The comment in the training values ("AKS pre-installs NVIDIA container toolkit") only holds for node images where AKS installs the driver stack, which belongs to a different, complete profile — not the documented default.
  • useHostMofed semantics: useHostMofed describes how MOFED is installed and coordinated, not where its modules execute. AICR's AKS recipe supplies MOFED via network-operator's OFED container (doca-driver, recipes/components/network-operator/manifests/nic-cluster-policy-aks.yaml), so the correct value is false. On aicr-test1, useHostMofed=true failed with modprobe nvidia-peermem: Invalid argument (ib_core symbol mismatch between nvidia_peermem and the MOFED container's ib_core); after flipping to false live, nvidia_peermem loads cleanly and the driver DaemonSet has been healthy at 3/3 for hours.

Fixes: N/A
Related: #1666 (separate track — this PR does not fix it)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: ____________

Implementation Notes

  • recipes/components/gpu-operator/values-aks-training.yaml: deleted the toolkit.enabled: false block (training now inherits the global toolkit.enabled: true, matching inference and the documented default) and flipped driver.rdma.useHostMofed to false with a canonical comment explaining the containerized-MOFED rationale. rdma.enabled: true is unchanged.
  • recipes/components/gpu-operator/values-aks.yaml: same useHostMofed correction and canonical comment; nothing else touched. The value stays false regardless of driver ownership mode — with driver.enabled=false it is inert, but the correct value prevents a future ownership-mode change from reviving the peermem bug.
  • docs/integrator/aks-gpu-setup.md: the driver section now documents the two ownership modes as complete provisioning profiles, using Microsoft's install-profile terminology ("None/BYO" for --gpu-driver none, "Driver only" for the alternative) to avoid collision with AKS-managed GPU node pools (--enable-managed-gpu=true, preview, gpuProfile.nvidia.managementMode: Managed), which install AKS's own device plugin/DCGM exporter and must not be combined with AICR (explicit warning added). The recommended nodepool example uses the stable --gpu-driver none alone (matching Microsoft's stable skip-driver procedure); --enable-managed-gpu is aks-preview-extension-only and appears in this page solely as descriptive text. The driver-only alternative is presented as one atomic unit (driver.enabled=false + toolkit.enabled=false + operator.runtimeClass=nvidia-container-runtime, never one side alone), noted as not yet validated end-to-end with network-operator/RDMA, and the responsibility-shift implications of --gpu-driver none are called out with a link to Microsoft's docs.
  • recipes/overlays/aks.yaml (comment-only) and the values-aks.yaml header: removed stale guidance — the overlay claimed "AKS pre-installs NVIDIA container toolkit; disable toolkit installation" (the exact assumption this PR removes, and already inaccurate for inference, which never disabled the toolkit), and the values header suggested setting only driver.enabled=false (an incomplete profile). Both now describe the GPU Operator-managed default and point at the atomic three-value alternative.

Known limitation + follow-ups:

  • After this default flip, CheckHostMofedWithoutNetworkOperator (pkg/bundler/validations/checks.go) can emit a redundant warning when a user passes --set networkoperator:enabled=false without an explicit useHostMofed override, because it inspects only --set overrides, not effective values. Follow-up: replace it with an effective-value check that warns whenever effective useHostMofed=true.
  • Hydration regression coverage for the AKS leaf profiles.
  • Runtime-handler existence validation when toolkit.enabled=false.
  • A bundled AKS driver-only profile, plus end-to-end validation of that profile.

Testing

# Commands run (prefer `make qualify` for non-trivial changes)
yamllint -c .yamllint.yaml recipes/components/gpu-operator/values-aks-training.yaml recipes/components/gpu-operator/values-aks.yaml recipes/overlays/aks.yaml
make bom-docs
make qualify
  • yamllint on all three changed YAML files: clean.
  • make bom-docs: regenerated with no diff — the container-toolkit:v1.19.1 image was already present in docs/user/container-images.md (the BOM is rendered from the chart's global values, where toolkit is enabled).
  • make qualify: full gate passed on the final amended SHA 134e4771 — test-coverage (with -race), lint (golangci-lint + yamllint), tuning-check, e2e, vulnerability scan, and license-check all green.
  • Registry: reworded the AKS CheckHostMofedWithoutNetworkOperator warning message to match the new useHostMofed: false values default (CodeRabbit review feedback); the check still fires when the flag is explicitly overridden to true with network-operator disabled.
  • No Go files change, so the Go coverage gate does not apply.
  • Live verification on aicr-test1 (Standard_ND96isr_H100_v5, gpuProfile.driver: None): with toolkit.enabled=false on this pool, every gpu-operator operand failed with FailedCreatePodSandBox: no runtime for "nvidia" is configured and both GPU nodes advertised zero nvidia.com/gpu (the defect this PR removes); enabling the toolkit on the cluster is the next remediation step and will be reported on this PR. The useHostMofed correction is fully live-verified: with false, nvidia_peermem loads cleanly (driver 3/3 for hours), whereas true reproducibly failed with modprobe nvidia-peermem: Invalid argument.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: Affects only the AKS values profiles. Regenerate and redeploy AKS training bundles to pick up the toolkit DaemonSet and the corrected useHostMofed. Users intentionally running the AKS driver-only profile must now pass all three overrides documented in docs/integrator/aks-gpu-setup.md (they previously relied on a broken partial default). No migration for non-AKS recipes.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • 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
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@yuanchen8911 yuanchen8911 added the theme/recipes Recipe expansion, overlays, mixins, and component registry label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Recipe evidence check

Registry change: scoped to recipes that reference a changed component
entry in recipes/registry.yaml (not every leaf).

Protected recipes

Recipes with committed evidence (recipes/evidence/<slug>/<source>/<digest>.yaml) that this PR affects: 2

Recipe Source Pointer Verify Digest match
gb200-eks-ubuntu-training 7c4c0edc8c765a95a0f3afdb3bbb8e91 sha256-93fac974407a873d5b6a52a72bafcaa18b019190545a23d03031680d6aabd2bc ❌ invalid — registry-forbidden (HTTP 401): registry not accessible (make the fork's aicr-evidence package public, or provide registry credentials) ⚠️ skipped (no signed digest)
h100-gke-cos-training 7c4c0edc8c765a95a0f3afdb3bbb8e91 sha256-be4680f26ad9ebeb57145f1953f18311ca00e81a4edb37773e0ec1060c6bd261 ❌ invalid — registry-forbidden (HTTP 401): registry not accessible (make the fork's aicr-evidence package public, or provide registry credentials) ⚠️ skipped (no signed digest)
h100-gke-cos-training 7c4c0edc8c765a95a0f3afdb3bbb8e91 sha256-f2573e7f2496cc895e6a780604645f7c24ed4d7e0edf4c4845c0d341a3a6326e ❌ invalid — registry-forbidden (HTTP 401): registry not accessible (make the fork's aicr-evidence package public, or provide registry credentials) ⚠️ skipped (no signed digest)
Other affected recipes without evidence yet: 64

These recipes are affected by this PR but carry no committed evidence pointer, so there is
nothing to verify. This is expected — evidence is hardware-gated and added over time.

  • a100-aks-training
  • a100-aks-ubuntu-training-kubeflow
  • a100-aks-ubuntu-training
  • a100-eks-training
  • a100-eks-ubuntu-training-kubeflow
  • a100-eks-ubuntu-training
  • a100-gke-cos-training-kubeflow
  • a100-gke-cos-training
  • a100-oke-training
  • a100-oke-ubuntu-training-kubeflow
  • a100-oke-ubuntu-training
  • b200-gke-cos-inference-dynamo
  • b200-gke-cos-inference
  • b200-gke-cos-training-kubeflow
  • b200-gke-cos-training
  • gb200-eks-inference
  • gb200-eks-training
  • gb200-eks-ubuntu-inference-dynamo
  • gb200-eks-ubuntu-inference
  • gb200-eks-ubuntu-training-kubeflow
  • gb200-eks-ubuntu-training-slurm
  • gb200-oke-inference
  • gb200-oke-training
  • gb200-oke-ubuntu-inference-dynamo
  • gb200-oke-ubuntu-inference
  • gb200-oke-ubuntu-training-kubeflow
  • gb200-oke-ubuntu-training
  • h100-aks-inference
  • h100-aks-training
  • h100-aks-ubuntu-inference-dynamo
  • h100-aks-ubuntu-inference
  • h100-aks-ubuntu-training-kubeflow
  • h100-aks-ubuntu-training
  • h100-bcm-training
  • h100-bcm-ubuntu-training
  • h100-eks-inference
  • h100-eks-training
  • h100-eks-ubuntu-inference-dynamo
  • h100-eks-ubuntu-inference-nim
  • h100-eks-ubuntu-inference
  • h100-eks-ubuntu-training-kubeflow
  • h100-eks-ubuntu-training-slurm
  • h100-eks-ubuntu-training
  • h100-gke-cos-inference-dynamo
  • h100-gke-cos-inference
  • h100-gke-cos-training-kubeflow
  • h100-gke-cos-training-slurm
  • h100-kind-inference-dynamo
  • h100-kind-inference
  • h100-kind-training-kubeflow
  • h100-kind-training-slurm
  • h100-kind-training
  • h200-eks-inference
  • h200-eks-training
  • l40s-oke-inference
  • l40s-oke-training
  • rtx-pro-6000-eks-inference
  • rtx-pro-6000-eks-ubuntu-inference-dynamo
  • rtx-pro-6000-eks-ubuntu-inference-nim
  • rtx-pro-6000-eks-ubuntu-inference
  • rtx-pro-6000-lke-inference
  • rtx-pro-6000-lke-training
  • rtx-pro-6000-lke-ubuntu-inference
  • rtx-pro-6000-lke-ubuntu-training

How to refresh evidence

Run on a cluster matching the recipe's criteria:

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>.yaml

This gate is warning-only and never blocks merge. See ADR-007 for the trust model.

@coderabbitai

coderabbitai Bot commented Jul 9, 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 updates AKS GPU Operator values to set driver.rdma.useHostMofed: false in both AKS Helm value files, adjusts related comments, and adds overlay guidance for GPU Operator-managed mode. It also rewrites the AKS GPU setup documentation to describe two mutually exclusive GPU ownership modes, expand the default GPU-Operator-managed path, and spell out the AKS driver-only override requirements and RDMA limitations.

Estimated code review effort: 3 (Moderate) | ~20 minutes

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 clearly states the main change: aligning AKS recipes with the GPU Operator-managed default.
Description check ✅ Passed The description directly covers the AKS GPU recipe and docs changes in the PR.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@yuanchen8911
yuanchen8911 force-pushed the fix-aks-training-gpu-ownership branch from 272c784 to 5350563 Compare July 9, 2026 05:26

@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

🤖 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 `@recipes/components/gpu-operator/values-aks.yaml`:
- Around line 34-48: The MOFED warning logic in checks.go still treats
networkoperator as if useHostMofed may be unset, even though the effective AKS
chart value now comes from the merged driver.rdma.useHostMofed setting. Update
the validation in pkg/bundler/validations/checks.go to read the resolved chart
value for driver.rdma.useHostMofed instead of only explicit --set overrides, or
remove the warning path if it is no longer needed. Keep the check aligned with
the AKS values files so disabling networkoperator without an extra override does
not emit a redundant warning.
🪄 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: 1d1d85a6-204b-486e-b35a-6589e6e21f28

📥 Commits

Reviewing files that changed from the base of the PR and between 272c784 and 5350563.

📒 Files selected for processing (4)
  • docs/integrator/aks-gpu-setup.md
  • recipes/components/gpu-operator/values-aks-training.yaml
  • recipes/components/gpu-operator/values-aks.yaml
  • recipes/overlays/aks.yaml

@yuanchen8911
yuanchen8911 force-pushed the fix-aks-training-gpu-ownership branch 2 times, most recently from 11bacac to 5a015bc Compare July 9, 2026 05:45
AKS has two mutually exclusive GPU ownership modes: GPU Operator-managed
(--gpu-driver none pool, AKS's None/BYO install profile;
driver.enabled=true, toolkit.enabled=true) and AKS driver-only (AKS's
default Driver-only install profile, --enable-managed-gpu=false;
driver.enabled=false, toolkit.enabled=false,
operator.runtimeClass=nvidia-container-runtime, always all three
together). values-aks-training.yaml shipped a broken hybrid:
toolkit.enabled=false while inheriting driver.enabled=true. On a
--gpu-driver none pool this leaves containerd without an nvidia runtime
handler, so every gpu-operator operand fails with FailedCreatePodSandBox
(no runtime for "nvidia") and nodes advertise zero nvidia.com/gpu
(observed on aicr-test1, Standard_ND96isr_H100_v5).

Drop the toolkit override so training inherits the global
toolkit.enabled=true, matching inference and the documented default.
Also drop the stale overlay/header comments that suggested the partial
profile (toolkit preinstalled / driver.enabled=false alone).

Correct driver.rdma.useHostMofed to false in both AKS values files:
AICR supplies MOFED via network-operator's OFED container (doca-driver),
which is not host-preinstalled MOFED; true caused an ib_core symbol
mismatch (modprobe nvidia-peermem: Invalid argument) on aicr-test1.

Document both ownership modes as complete provisioning profiles in
docs/integrator/aks-gpu-setup.md, using Microsoft's install-profile
terminology, warning against AKS-managed GPU node pools
(--enable-managed-gpu=true, which install their own device plugin and
DCGM exporter), and noting the --gpu-driver none responsibility shift.

Signed-off-by: Yuan Chen <[email protected]>
@yuanchen8911
yuanchen8911 marked this pull request as ready for review July 9, 2026 06:14
@yuanchen8911
yuanchen8911 requested review from a team as code owners July 9, 2026 06:14
@yuanchen8911
yuanchen8911 force-pushed the fix-aks-training-gpu-ownership branch from 5a015bc to 134e477 Compare July 9, 2026 06:20
@yuanchen8911
yuanchen8911 requested a review from mchmarny July 9, 2026 06:21
@mchmarny
mchmarny merged commit 13d47cf into NVIDIA:main Jul 9, 2026
6 of 9 checks passed
mohityadav8 pushed a commit to mohityadav8/aicr that referenced this pull request Jul 14, 2026
@yuanchen8911
yuanchen8911 deleted the fix-aks-training-gpu-ownership branch August 19, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs area/recipes size/M theme/recipes Recipe expansion, overlays, mixins, and component registry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants