Skip to content

Commit 3a623cf

Browse files
committed
fix(cdi): preserve GPU sandbox compatibility
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent a50e36f commit 3a623cf

11 files changed

Lines changed: 944 additions & 265 deletions

File tree

‎crates/openshell-driver-docker/README.md‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,29 @@ inventory, then passes the same IDs to Docker with a CDI `DeviceRequest`.
134134
For a GPU sandbox, the driver writes those IDs and projected CDI spec directory
135135
paths to a versioned context in the protected workload boundary configuration.
136136
It uses structured, read-only, non-recursive binds at `/.openshell/cdi-specs/<index>`.
137-
Docker validates source existence on the daemon host; missing directories fail
138-
container creation without being created. OpenShell does not relabel the host
139-
spec directories. Administrators must make the existing directories readable
137+
The driver checks source existence on the daemon host using one temporary,
138+
stopped container per directory and the prepared workload image. Each probe has
139+
one read-only, private bind with source creation disabled. Successful probes are
140+
removed with anonymous image-volume cleanup, including after provisioning
141+
cancellation. Confirmed missing directories are omitted; other errors fail
142+
provisioning. Results are cached for 30 seconds and refreshed on demand; observed
143+
changes to daemon identity, configured directories, or GPU inventory invalidate
144+
the cache. The resulting context records only available projections. The actual
145+
sandbox is created once, and selected devices must still resolve from the
146+
projected specs. No probe starts a process, creates missing directories, or
147+
relabels host spec directories. Administrators must make the existing directories readable
140148
under the host's SELinux policy when SELinux is enabled.
141149

142150
Whole spec directories are available to the trusted runtime, which resolves only
143151
the selected devices. The mandatory Landlock baseline hides these projections
144152
from agent processes, even when the authored policy grants a broad ancestor.
145153
The sandbox runtime resolves the selected devices in that mount namespace before
146154
it launches agent processes and derives Landlock paths and supplemental groups
147-
from CDI `containerEdits`. A missing context or spec directory fails workload
148-
startup closed. Non-GPU sandboxes receive no CDI context or spec mounts.
155+
from CDI `containerEdits`. Containers with CDI context fail startup if their
156+
selected devices cannot be resolved. Existing GPU containers without context
157+
retain legacy baseline handling on restart. Admission checks persisted context
158+
for existing containers and the creation context for new ones. Non-GPU sandboxes
159+
receive no CDI context or spec mounts.
149160

150161
## Driver Config Mounts
151162

0 commit comments

Comments
 (0)