Repository navigation
Conversation
Set the extra-supplementary-groups claim whenever a GPU or CDI device is requested, matching the Docker driver, so CDI additionalGids no longer fail sandbox startup under the default userns mode. Persist the claim in restart metadata so restarts keep it. Closes #5305 Signed-off-by: Evan Lezar <elezar@nvidia.com>
Covers a CDI additionalGids group on the Docker and Podman drivers. Refs #5305. Signed-off-by: Evan Lezar <elezar@nvidia.com>
|
@elezar - This fixes the start-up group check, but the Podman driver still never sets On WSL2 (OpenShell 0.1.5, rootless Podman, Could the Podman driver insert If you don't want to pick this up here I can open a separate issue. |
Summary
The Podman driver now sets the extra-supplementary-groups claim whenever a GPU or CDI device is requested, as the Docker driver does with the GPU claim. A CDI device that adds a group (
containerEdits.additionalGids) no longer stops the sandbox from starting under the default userns mode.Related Issue
Closes #5305
Changes
allow_extra_supplementary_groups(userns, gpu_requested)incrates/openshell-driver-podman/src/isolation.rs: true for a GPU/CDI request or akeep-iduserns.gpu_devices.is_some(). The restart path reads the flag from restart metadata, which now persists it (#[serde(default)], so older metadata still loads asfalse).What still bounds the extra groups:
supplementary_groups_matchinopenshell-sandboxstill requires every driver-resolved group to be present in the process's groups, so extras may extend but never replace the image-derived identity. The claim is set only when the driver itself requested a GPU/CDI device, and it travels in the gateway-signed boundary config rather than anything the workload controls. UID/GID checks are unchanged. Sandboxes without a GPU/CDI request under non-keep-iduserns still require exact equality.Testing
cargo test -p openshell-driver-podmanpasses (257 unit tests plus integration tests);cargo clippyandcargo fmt --checkclean.device-node-with-gidCDI scenario for Podman depends on feat(gpu): derive Docker sandbox requirements from CDI specs #4204 and is a follow-up after it lands.Checklist