-
Notifications
You must be signed in to change notification settings - Fork 98
ComputeDomain kubelet plugin: mount /dev:/dev #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
0004218 to
6815948
Compare
klueska
approved these changes
Mar 27, 2025
Collaborator
klueska
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved (for now)
Let’s revisit when @elezar is available again to see if we can come up with a solution that doesn’t require a mount over the containers /dev
This was referenced Aug 20, 2025
Closed
klueska
added a commit
to klueska/k8s-dra-driver-gpu
that referenced
this pull request
Aug 20, 2025
Currently, in the compute domain driver, we unconditionally mount the host's /dev over the container's /dev regardless of what the devRoot of the GPU driver is. This change was introduced in NVIDIA#307. Unfortunately, this causes some problems on certain systems as described in NVIDIA#477. This patch makes this mount contingent on devRoot == "/" (which is the only case where we actually ever wanted / needed to have this mount in the first place. Signed-off-by: Kevin Klues <[email protected]>
klueska
added a commit
to klueska/k8s-dra-driver-gpu
that referenced
this pull request
Aug 20, 2025
Currently, in the compute domain driver, we unconditionally mount the host's /dev over the container's /dev regardless of what the devRoot of the GPU driver is. This change was introduced in NVIDIA#307. Unfortunately, this causes some problems on certain systems as described in NVIDIA#477. This patch makes this mount contingent on devRoot == "/" (which is the only case where we actually ever wanted / needed to have this mount in the first place. Signed-off-by: Kevin Klues <[email protected]>
klueska
added a commit
to klueska/k8s-dra-driver-gpu
that referenced
this pull request
Aug 20, 2025
Currently, in the compute domain driver, we unconditionally mount the host's /dev over the container's /dev regardless of what the devRoot of the GPU driver is. This change was introduced in NVIDIA#307. Unfortunately, this causes some problems on certain systems as described in NVIDIA#477. This patch makes this mount contingent on devRoot == "/" (which is the only case where we actually ever wanted / needed to have this mount in the first place. Signed-off-by: Kevin Klues <[email protected]>
klueska
added a commit
to klueska/k8s-dra-driver-gpu
that referenced
this pull request
Aug 20, 2025
Currently, in the compute domain driver, we unconditionally mount the host's /dev over the container's /dev regardless of what the devRoot of the GPU driver is. This change was introduced in NVIDIA#307. Unfortunately, this causes some problems on certain systems as described in NVIDIA#477. This patch makes this mount contingent on devRoot == "/" (which is the only case where we actually ever wanted / needed to have this mount in the first place. Signed-off-by: Kevin Klues <[email protected]>
klueska
added a commit
to klueska/k8s-dra-driver-gpu
that referenced
this pull request
Aug 21, 2025
Currently, in the compute domain driver, we unconditionally mount the host's /dev over the container's /dev regardless of what the devRoot of the GPU driver is. This change was introduced in NVIDIA#307. Unfortunately, this causes some problems on certain systems as described in NVIDIA#477. This patch makes this mount contingent on devRoot == "/" (which is the only case where we actually ever wanted / needed to have this mount in the first place. Signed-off-by: Kevin Klues <[email protected]>
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.
This is a patch for host-provided drivers located not directly under
/.With a host-provided driver at for example
/home/kubernetes/...we choose an in-containerdevRootof/:The fallback to
/takes effect because there is nodevdirectory underneath the driver's directory.In many other cases, host-provided drivers are located at
/(on the host). The function above then returns/driver-root(which is where hostDriverRoot is mounted to containerDriverRoot). Indeed, in those cases the host's/devdirectory is mounted under/driver-root/devin the container. The following loc then setsdevRoot(in the container) to/driver-root:k8s-dra-driver-gpu/cmd/compute-domain-kubelet-plugin/nvlib.go
Line 84 in 50703b0
Next, the following line of code constructs a path in the container under
/driver-rootthat actually maps to a corresponding path in the host's/devfile system:k8s-dra-driver-gpu/cmd/compute-domain-kubelet-plugin/computedomain.go
Line 174 in 50703b0
So far, so good.
However, for host-provided drivers located not directly under
/the chosen devRoot of/does not correspond to any mountpoint where host's dev has been mounted into the container.That is, any mutation in container's '/dev' does not apply to the host.
That may result in
(where the kubelet plugin did create that /dev node, just visible only in its container, and not on the host)
With this patch, any in-container mutation of
/devwill take effect on the host. This may not be ideal, but is a pragmatic patch that we can iterate on later.Testing:
A cleaner version of this?
A cleaner variant would not
return "/"as a fallback above.Instead, we need to return a path (in the container filesystem) where the host's
/dev(or parts thereof) are mounted in.So, we could have (in the container) a path P where we may mount in all of host's
/devor (better) only the required subset and then return P as a fallback.