Skip to content

Commit

Permalink
cmd/initContainer: Unbreak 'enter' if NVIDIA Persistence Daemon is used
Browse files Browse the repository at this point in the history
If the NVIDIA Persistence Daemon is used, then 'enter' fails with:
  $ sudo systemctl start nvidia-persistenced.service
  $ toolbox enter
  Error: mount: /run/nvidia-persistenced/socket: mount point does not exist.
         dmesg(1) may have more information after failed mount system call.
  failed to apply mount from Container Device Interface for NVIDIA

This is due to the socket at /run/nvidia-persistenced/socket being
listed in the Container Device Interface specification when the NVIDIA
Persistence Daemon is used.

Fallout from 6e848b2

containers#1572
  • Loading branch information
jbtrystram authored and debarshiray committed Oct 29, 2024
1 parent 201380f commit 325cf69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/initContainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ func mountBind(containerPath, source, flags string) error {
if err := os.MkdirAll(containerPath, 0755); err != nil {
return fmt.Errorf("failed to create directory %s: %w", containerPath, err)
}
} else if fileMode.IsRegular() {
} else if fileMode.IsRegular() || fileMode&os.ModeSocket != 0 {
logrus.Debugf("Creating regular file %s", containerPath)

containerPathDir := filepath.Dir(containerPath)
Expand Down

0 comments on commit 325cf69

Please sign in to comment.