fix: Additional GIDs are dropped due to file mode mask#1745
Conversation
|
/cherry-pick release-1.19 |
59a191c to
771f0e0
Compare
Coverage Report for PR #1745Coverage increased (+0.06%) to 43.406%Diff Coverage: No coverable lines changedNo coverage regressions found.
💛 - Coveralls |
This change updates the nvcdi API to 771f0e013469345c49397d78e048395978f6e2d6 to include the changes for NVIDIA/nvidia-container-toolkit#1745. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change updates the nvcdi API to 771f0e013469345c49397d78e048395978f6e2d6 to include the changes for NVIDIA/nvidia-container-toolkit#1745. Signed-off-by: Evan Lezar <elezar@nvidia.com>
The filemode returned from DeviceFromPath clears the bits that are track whether the device is a character device. This means that the check that ensures that the mode includes the character device bits always fails and no additional GIDs are detected. This change removes the check. In practice this should have no effect since we only ever detect char devices. Signed-off-by: Evan Lezar <elezar@nvidia.com> Co-authored-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
771f0e0 to
2e9a666
Compare
cdesiniotis
left a comment
There was a problem hiding this comment.
One non-blocking question, otherwise this lgtm.
I did add one unit test to your commit, which fails without the change.
| if path == "" { | ||
| path = d.Path | ||
| } | ||
| dn, err := devices.DeviceFromPath(path, "rwm") |
There was a problem hiding this comment.
Question -- I do see that dn returned here does have a member Type. What if we used that to set the corresponding Type field in the CDI spec for this device? Or is there a reason why do do not set the Type field?
There was a problem hiding this comment.
I think we could set the type field too, and probably should, but I didn't want to make the change as part of this PR to make backporting the fix clearer. We would also need to check the interaction with this and the code in the CDI package for filling the missing device information.
For reference see:
|
🤖 Backport PR created for |
This change updates the nvcdi API to 2c0c91d0ebaa45873d997b42beffad3706e8d734 to include the changes for NVIDIA/nvidia-container-toolkit#1745. Signed-off-by: Evan Lezar <elezar@nvidia.com>
The filemode returned from DeviceFromPath clears the bits that are track whether the device is a character device. This means that the check that ensures that the mode includes the character device bits always fails and no additional GIDs are detected.
This change removes the check. In practice this should have no effect since we only ever detect char devices.