Skip to content

fix(driver-podman): allow runtime-added groups for GPU and CDI requests - #5649

Open
elezar wants to merge 2 commits into
mainfrom
fix/podman-cdi-supplementary-groups
Open

elezar wants to merge 2 commits into
mainfrom
fix/podman-cdi-supplementary-groups

Conversation

@elezar

@elezar elezar commented Nov 17, 2026

Copy link
Copy Markdown
Member

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

  • Add allow_extra_supplementary_groups(userns, gpu_requested) in crates/openshell-driver-podman/src/isolation.rs: true for a GPU/CDI request or a keep-id userns.
  • Create path uses gpu_devices.is_some(). The restart path reads the flag from restart metadata, which now persists it (#[serde(default)], so older metadata still loads as false).
  • Unit tests for the helper and for the claim being projected into the bootstrap config and restart metadata.
  • Document the behavior in the Podman driver README.

What still bounds the extra groups: supplementary_groups_match in openshell-sandbox still 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-id userns still require exact equality.

Testing

  • cargo test -p openshell-driver-podman passes (257 unit tests plus integration tests); cargo clippy and cargo fmt --check clean.
  • Unit tests added/updated
  • E2E: not run. Restoring the device-node-with-gid CDI scenario for Podman depends on feat(gpu): derive Docker sandbox requirements from CDI specs #4204 and is a follow-up after it lands.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Docs updated (Podman driver README)

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>
@elezar elezar added area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. topic:gpu GPU scheduling, Kubernetes DRA, CDI, MIG, and hardware-accelerated runtime integration. labels Nov 17, 2026
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 17, 2026
Covers a CDI additionalGids group on the Docker and Podman drivers. Refs #5305.

Signed-off-by: Evan Lezar <elezar@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. state:accepted A maintainer decided OpenShell should pursue this issue topic:gpu GPU scheduling, Kubernetes DRA, CDI, MIG, and hardware-accelerated runtime integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Podman driver rejects supplementary groups added by a CDI device at sandbox startup

1 participant