Skip to content

docs(deploykit): keep-id carries the CDI device; only the spec's file mounts cannot - #646

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/cdi-no-duplicate-device
Nov 25, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/cdi-no-duplicate-device

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

The carriesCDIDevice comment in deploykit/quadlet.go still says a unit that carries the CDI GPU
device cannot run under keep-id, citing #81. That stopped being true when #640 made a
bind-mounting unit ride keep-id and plugin-deploy-pod#97 made the caller point the engine at a
devices-only CDI spec: what keep-id cannot apply is the spec's file mounts, never the
device.

Comment only — no behaviour change. The duplicate-AddDevice fix landed separately in #645.

Head: 617763ab66ebafdecbec6ad2f2241914dce493a7

Relates to: opencharly/opencharly#1287

How tested

Gates run on the branch head in the session worktree .worktrees/cdi-audit/opencharly/sdk:

$ gofmt -l .
(empty)

$ go build ./...
(exit 0)

$ go vet ./deploykit/...
(exit 0)

$ go test ./deploykit/...
ok  	github.com/opencharly/sdk/deploykit	11.291s

The diff is a comment, so no test can fail on it; the suite proves the module still builds and
passes unchanged.

Spike

The claim the new comment asserts was measured live on this host (rootless podman 6.2.0, driver
615.78.08), with the clean pod-cdi image
ghcr.io/opencharly/jupyter-ml-cdi:check-cachyos-jupyter-ml-pod-2026.328.2259:

$ podman run --rm --userns=keep-id:uid=1000,gid=1000 --device nvidia.com/gpu=all \
    --cdi-spec-dir ~/.local/share/charly/cdi \
    -v /usr/lib/libcuda.so.615.78.08:/usr/lib/libcuda.so.1:ro <img> \
    sh -c 'id -u; python3 -c "import ctypes;print(ctypes.CDLL(\"libcuda.so.1\").cuInit(0))"'
1000
0
rc=0

$ podman run --rm --userns=keep-id:uid=1000,gid=1000 --device nvidia.com/gpu=all <img> true
Error: crun: mount_setattr `/usr/bin/nvidia-cuda-mps-control`: Operation not permitted: OCI permission denied
rc=126

keep-id carries the device (cuInit succeeds); the stock spec's file mounts are what fail.

Rulebook compliance

Change classification

Documentation/comment only (documentation reviewed). No behaviour, schema or wire change, so no
migration. Rollback is a one-line revert.

Filed issues

None new. Anchor: opencharly/opencharly#1287.

Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (documentation reviewed)

… mounts cannot

The carriesCDIDevice comment still says a unit that carries the CDI device cannot
run under keep-id. That stopped being true with #640 and plugin-deploy-pod#97: a
GPU unit with a bind mount rides keep-id, and the caller points the engine at a
devices-only CDI spec, so the spec's file mounts never reach crun — the device does.

Comment only; no behaviour change.

Refs opencharly/opencharly#1287

*Agent: `cdi-audit` · Claude Code session `f760307f-53b4-4f48-87da-00f95e5300ed`*
*Assisted-by: Claude Code deepseek-v4.1-flash:cloud (documentation reviewed)*
@github-actions
github-actions Bot enabled auto-merge (squash) November 25, 2026 16:36
@github-actions
github-actions Bot merged commit 2026e78 into main Nov 25, 2026
10 of 11 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant