Repository navigation
fix(agent): use CDI runtime for NVIDIA nspawn nodes - #975
Merged
Merged
Conversation
Kevin Cho (chokevin)
marked this pull request as ready for review
October 22, 2026 00:34
hbc (bcho)
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every successfully resolved and provisioned NVIDIA nspawn node prepares a private driver root and generates a CDI specification from it, but NVIDIA Toolkit could still leave environment-variable device requests on its automatic legacy-injection path. That bypassed CDI container edits such as the host-matched
nvidia-smimount. NVIDIA setup now explicitly selects CDI runtime mode after successful spec generation on every supported host, while non-NVIDIA nodes remain no-ops and incomplete NVIDIA state still fails closed.nvidia-ctk config --set nvidia-container-runtime.mode=cdi --in-placeonly after the prepared driver-root CDI specification is generated successfully.Evidence
This 12-second recording shows the unconditional CDI runtime-selection diff and the focused node-start regression result:
nvidia-cdi-invariant.mp4
Verification
go test ./pkg/agent/goalstates -run '^TestResolveNvidiaHost' -count=1go test ./pkg/agent/phases/nodestart -run '^Test(ConfigureNVIDIAContainerRuntime|SetupNVIDIAProvisionedCapabilityControlsBehavior|ReconcileNVIDIANonGPUIsNoop)$' -count=1golangci-lint run -c .golangci.yaml ./pkg/agent/goalstates ./pkg/agent/phases/nodestartgit diff --check/private/varpath canonicalization, and listener-state tests failed outside the changed behavior.Risk
This changes NVIDIA Toolkit runtime selection for every NVIDIA nspawn node that completes driver-root CDI generation. A regression would surface during node-start runtime configuration or when GPU workloads request devices. Rollback is reverting this PR, which restores the prior host-gated or automatic runtime selection.
Review guide
pkg/agent/phases/nodestart/nvidia.go: successful CDI generation now always proceeds to CDI runtime configuration.pkg/agent/phases/nodestart/nvidia_test.go: unconditional configuration and explicit failure coverage.pkg/agent/goalstates/nvidia.go: removal of the distro-derived runtime-selection flag and OS-release plumbing.pkg/agent/goalstates/nvidia_test.go: removal of host/version policy tests while preserving discovery and readiness coverage.docs/content/reference/gpu/nvidia.md: driver-root and legacy-injection rationale for all NVIDIA nspawn nodes.