cdi,SPECS.md: allow empty cgroup permissions.#301
Conversation
|
/cc @oOraph |
|
@elezar PTAL, if you have a few spare cycles. |
elezar
left a comment
There was a problem hiding this comment.
The addition of none as a special case looks good. I do think that the device validation needs to be properly updated for this though.
|
hello, thanks for this pull request. Since the cdi is generic it may still be worth adding the none case. I just want to mention some runc specificity regarding permissions that would make the none case ineffective for this runtime: |
f8d98e4 to
df2a787
Compare
df2a787 to
e762a89
Compare
Allow injecting devices with empty cgroup permissions, requested by the "none" permission string, also defined as pkg/cdi.NoPermissions. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
e762a89 to
90e09e4
Compare
|
/assign @elezar |
| case strings.Trim(d.Permissions, "rwm") != "": | ||
| return fmt.Errorf("device %q: invalid permissions %q", | ||
| d.Path, d.Permissions) |
There was a problem hiding this comment.
minor nit: If we invert the logic here, we can have the switch cover all the valid cases and then return an error in the default case. Not a blocker though. Merging for now and we can always revisit.
Allow injecting devices with empty cgroup permissions, requested by the
"none"permission string or the newpkg/cdi.NoPermissionsconstant.Fixes #300