Skip to content

[release-0.19] Fix CDI spec generation to respect driver root for Tegra CSV files#1701

Merged
cdesiniotis merged 4 commits intorelease-0.19from
backport-1675-to-release-0.19
Apr 17, 2026
Merged

[release-0.19] Fix CDI spec generation to respect driver root for Tegra CSV files#1701
cdesiniotis merged 4 commits intorelease-0.19from
backport-1675-to-release-0.19

Conversation

@github-actions
Copy link
Copy Markdown

🤖 Automated backport of #1675 to release-0.19

✅ Cherry-pick completed successfully with no conflicts.

Original PR: #1675
Original Author: @elezar

Cherry-picked commits (4):

  • f27fd14 Fix CDI spec generation to respect driver root for Tegra CSV files
  • 22499fe Factor device discovery strategy resolution out of plugin and cdi packages
  • 6ca73d9 Default to nvml strategy when platform cannot be detected
  • fe18b02 Update nvcdi API to 2c0c91d0ebaa45873d997b42beffad3706e8d734

This backport was automatically created by the backport bot.

elezar and others added 4 commits April 17, 2026 15:07
On Tegra-based systems the nvcdi library resolves CSV mount specs from
/etc/nvidia-container-runtime/host-files-for-container.d using hardcoded
absolute paths, ignoring the configured driver root. When the device
plugin runs in a container with the host filesystem mounted at a
non-default driver root the CSV files are unreachable at their absolute
paths, causing CDI spec generation to fail.

Inject driver-root-aware CSV file paths via nvcdi.WithCSVFiles() when
the platform is detected as Tegra. The helper csvFilesForRoot() checks
for the CSV directory under the driver root first, falling back to the
absolute path, and returns nil (letting nvcdi use its own defaults) if
neither location exists.

Also extend the NVML guard so that pure iGPU Tegra systems without NVML
are not incorrectly reduced to a null CDI handler.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
(cherry picked from commit f27fd14)
…kages

Resolve the device discovery strategy once in GetPlugins() using a local
resolveStrategy() helper and pass the concrete value ("nvml", "tegra",
etc.) to both cdi.New() and plugin.New() via new WithDeviceDiscoveryStrategy
options. This eliminates duplicate infolib.ResolvePlatform() calls and
makes the dependency on platform detection explicit at the call site.

Both constructors now return an error when the strategy is not set rather
than falling back to their own resolution logic. The CDI handler uses the
strategy directly to gate CSV-mode behaviour instead of re-checking the
platform independently.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
(cherry picked from commit 22499fe)
When the device discovery strategy is "auto" but no supported platform
is detected, default to "nvml" instead of returning the unresolved
"auto" value. Log a warning so that the fallback is visible in the
device plugin output.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Evan Lezar <[email protected]>
(cherry picked from commit 6ca73d9)
This change updates the nvcdi API to 2c0c91d0ebaa45873d997b42beffad3706e8d734
to include the changes for NVIDIA/nvidia-container-toolkit#1745.

Signed-off-by: Evan Lezar <[email protected]>
(cherry picked from commit fe18b02)
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 17, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@elezar elezar added this to the v0.19.1 milestone Apr 17, 2026
@elezar elezar requested review from cdesiniotis and rahulait April 17, 2026 15:12
@cdesiniotis
Copy link
Copy Markdown
Contributor

/ok to test 634fa9a

@cdesiniotis cdesiniotis merged commit 2526110 into release-0.19 Apr 17, 2026
11 checks passed
@cdesiniotis cdesiniotis deleted the backport-1675-to-release-0.19 branch April 17, 2026 22:09
@elezar elezar mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants