Skip to content

CDI keep-id workaround (devices-only spec + per-file lib binds) outlived the podman 6.2.0 regression it worked around, and breaks GPU units on every driver upgrade #127

Done

Description

@aitrawog

Category

category:runtime

Type

type:fix

Remedy / files the remedy will touch

candy/plugin-deploy-pod/cdi_spec.go (delete) and its call sites in config_setup.go, config_setup_helpers.go, resolve_f12.go; a podman 6.2.0 preflight refusal; the check-pod-cdi-userns bed; the layer-cdi cdi/cdi-layer skills

Cited design decision or org-rulebook rule (or none)

D-HW-6, D-HW-10, C5

Classification

Blocking — it blocks the filer's own progress, so the filer claims it at filing and fixes it.

Evidence (verified: commands with output, file:line, measurements)

F2: causal, binary swap on one host, one image (ghcr.io/opencharly/ollama-cdi:2026.332.1131). The command is the one the cdi skill records as EPERM: podman run --rm --network none --runtime <rt> --userns=keep-id:uid=1000,gid=1000 --user 1000 --device nvidia.com/gpu=all --entrypoint /usr/bin/true <img>. Old podman binaries were extracted from the pacman cache.

== podman 6.2.0
Error: crun: mount_setattr `/usr/bin/nvidia-cuda-mps-control`: Operation not permitted: OCI permission denied   (rc=126)
Error: runc: … failed to set MOUNT_ATTR_IDMAP on /usr/bin/nvidia-cuda-mps-control: operation not permitted     (rc=126)
== podman 6.1.4 → crun rc=0, runc rc=0
== podman 6.2.1 (installed 2026-11-30T22:15) → crun rc=0, runc rc=0

The stock spec under keep-id on 6.2.1:

  • Probe image: cuInit=0, cuMemAlloc(16M)=0, NVML 620.73.04 equal to the kmod 620.73.04, a bind write lands as 1000:1000.
  • Real comfyui-cdi:2026.335.2228 torch: cuda True 13.0 sum 1048576.0; the no-GPU control gives cuda False.
  • Same results on docker 29.10.1 and nerdctl 2.4.2.

F1, the consequence. The workaround writes versioned host paths into every GPU unit:

$ grep -c '^Volume=.*:ro$' ~/.config/containers/systemd/charly-comfyui-cdi.container
112      (libver 615.78.08)
$ grep 'upgraded nvidia-utils' /var/log/pacman.log | tail -1
[2026-11-30T22:14:52+0100] [ALPM] upgraded nvidia-utils (615.78.08-3 -> 620.73.04-1)
$ ls /usr/lib/libcuda.so.615.78.08
ls: cannot access '/usr/lib/libcuda.so.615.78.08': No such file or directory
$ systemctl --user status charly-comfyui-cdi.service
     Active: failed (Result: start-limit-hit) since Mon 2026-11-30 22:49:24 CET

Full Phase-A evidence: 545 lines of commands, outputs and exit codes, kept by the filer.

Mechanism

podman 6.2.0 applied MOUNT_ATTR_IDMAP to CDI spec mounts under keep-id (EPERM). The workaround derives a devices-only spec and re-binds ~114 driver libs by VERSIONED host path into each unit at config time. podman 6.2.1 fixed the regression, so the workaround is now dead weight, and its versioned binds break every GPU unit when the host driver moves.

Missed control

No preflight records WHICH engine version needs the workaround, and no bed asserts that a GPU unit survives a driver upgrade; check-pod-cdi-userns asserts the workaround's own shape.

Blast radius

Every podman GPU pod: units stop starting after any NVIDIA driver upgrade until 'charly config' is re-run. The operator's charly-comfyui-cdi has been down since 2026-11-30 22:49. It also removes nvidia-smi and the ldcache hook (charly#1280 class).

Root fix

Delete the workaround and use the engine's stock CDI spec (/etc/cdi, /var/run/cdi) with AddDevice=nvidia.com/gpu=all under keep-id; refuse podman 6.2.0 specifically at config time (D-HW-6 preflight); the bed asserts no versioned path in the unit.

Spike (its result, or none with the reason)

podman 6.1.4 / 6.2.0 / 6.2.1 binary swap (6.2.0 alone fails); stock spec proven on podman, docker, nerdctl and a real ComfyUI torch workload

Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

Activity

  1. aitrawog commented on Dec 1, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    Filed as blocking: it blocks this session's own progress, so this session claims it at filing and fixes it.

    Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

  2. added
    category:runtime
    type:fix
    on Dec 1, 2026
  3. self-assigned this
    on Dec 1, 2026
  4. added a commit that references this issue on Dec 2, 2026
    990eeff
  5. aitrawog commented on Dec 2, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED

    Resolved by #129, merged after a validator PASS on round 3 and tagged v2026.336.0033.

    • The workaround is gone. Every podman GPU unit now carries only AddDevice=nvidia.com/gpu=all under keep-id and uses the engine's stock CDI spec. No derived spec, no driver-library binds, no LD_LIBRARY_PATH, no versioned driver path.
    • The 6.2.0 preflight. podman 6.2.0 is refused at config time and in the batch re-emit. A privileged unit is exempt, since it carries no CDI device. Every branch was exercised live on a real podman 6.2.0.
    • The bed. check-pod-cdi-userns asserts the contract, with nvidia-smi inside reporting the host kernel module.

    Filed from the gate: #128 (stale boxless premise) and #130 (a step that discards its config output). The operator's charly-comfyui-cdi is reconfigured next on the merged plugin.

    Agent: vol-cdi · Claude Code session 8daa865c-d43e-447b-90b3-7d16ccc921d7
    Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)

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

Metadata

Metadata

Assignees

Labels

category:runtimetype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions