Skip to content

fix: discover the MPS pipe directory for IPC mounts - #2143

Merged
cdesiniotis merged 1 commit into
NVIDIA:mainfrom
elezar:fix-mps-pipe-directory-discovery
Oct 14, 2026
Merged

cdesiniotis merged 1 commit into
NVIDIA:mainfrom
elezar:fix-mps-pipe-directory-discovery

Conversation

@elezar

@elezar elezar commented Oct 14, 2026

Copy link
Copy Markdown
Member

Description

NewIPCDiscoverer intends to mount the MPS pipe directory (/tmp/nvidia-mps) alongside the persistenced and fabricmanager sockets, but it located it with a file locator. The file locator's default filter (assertFile) rejects directories, and the miss is only logged at debug level, so the MPS pipe directory was never found and no mount was emitted for it in generated CDI specs or the runtime's automatic CDI modifications.

This change uses the existing directory locator for the MPS pipe directory. The socket lookup and the IPC mount options (nosuid, nodev, rbind, rprivate, noexec) are unchanged.

The legacy (libnvidia-container) path is not affected; it already locates the MPS pipe directory in nvc_info.c.

Known gaps, not addressed here:

  • libnvidia-container honours CUDA_MPS_PIPE_DIRECTORY; the Go discoverer still only checks /tmp/nvidia-mps.
  • The directory is resolved relative to the driver root, matching libnvidia-container. With a containerized driver root, the MPS daemon's pipe directory is likely on the host's /tmp and may still not be found.

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

  • Added TestNewIPCDiscoverer, a table test over a temporary driver root covering: no IPC paths present, the MPS directory (emitted with the IPC mount options), a regular file at the MPS path (ignored), sockets under /run and /var/run, socket paths that are directories (ignored), and sockets together with MPS. The MPS case fails with the previous file locator.
  • go test ./internal/discover/... ./pkg/lookup/..., go vet, and golangci-lint run on the touched packages pass.
  • Not yet tested on a GPU node running the MPS control daemon.

🤖 Generated with Claude Code

The IPC discoverer located /tmp/nvidia-mps with a file locator. The file
locator's default filter rejects directories, so the MPS pipe directory
was never found and no mount was emitted for it.

Use a directory locator for the MPS pipe directory. The socket lookup is
unchanged and the IPC mount options are kept.

Signed-off-by: Evan Lezar <[email protected]>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 38594403494

Coverage increased (+0.3%) to 45.083%

Details

  • Coverage increased (+0.3%) from the base build.
  • Patch coverage: 1 of 1 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: 13564
Covered Lines: 6115
Line Coverage: 45.08%
Coverage Strength: 0.45 hits per line

💛 - Coveralls

@cdesiniotis
cdesiniotis merged commit 3e112b4 into NVIDIA:main Oct 14, 2026
21 checks passed
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.

4 participants