Skip to content

Ignore volume mounts if void device requested through envvar - #2236

Open
cdesiniotis wants to merge 2 commits into
NVIDIA:mainfrom
cdesiniotis:revert-void-volume-mount
Open

cdesiniotis wants to merge 2 commits into
NVIDIA:mainfrom
cdesiniotis:revert-void-volume-mount

Conversation

@cdesiniotis

@cdesiniotis cdesiniotis commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Fixes #2226

Description

This PR reverts 78f2970 which does not work when user namespaces are enabled in Kubernetes. Instead of introducing an explicit 'void' volume mount device, ignore any device requests specified through volume mounts if the 'void' device is explicitly requested via the NVIDIA_VISIBLE_DEVICES environment variable.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Unit tests passing (make test)
  • Lint checks passing (make lint)
  • Test cases are added for new code paths
  • Commits are signed-off and cryptographically signed

Testing

Manually tested on a GPU node. Confirmed that NVIDIA/gpu-operator#3077 is still addressed (which is why we originally introduced a 'void' volume mount).

This reverts commit 78f2970.

Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
@cdesiniotis
cdesiniotis force-pushed the revert-void-volume-mount branch from 654a467 to 927dbf6 Compare November 22, 2026 21:52
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
@cdesiniotis
cdesiniotis force-pushed the revert-void-volume-mount branch from 927dbf6 to cbe4f68 Compare November 22, 2026 22:15
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 45076745681

Coverage remained the same at 45.267%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 8 of 8 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13659
Covered Lines: 6183
Line Coverage: 45.27%
Coverage Strength: 0.45 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.20.2: 'void' CDI mount of /dev/null breaks containers in a user namespace (MOUNT_ATTR_IDMAP: invalid argument)

2 participants