Repository navigation
Description
Category
category:runtime
Type
type:fix
Remedy / files the remedy will touch
the pod start path's readiness wait (charly start -> lifecycle start) and the quadlet/service start semantics it relies on
Cited design decision or org-rulebook rule (or none)
AGENTS.md R3 (no blind retry) + R7 (prove behaviour, not compilation)
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)
Measured 2026-11-27 on the plugin-deploy-pod CDI bed (kind:local deploy over a pod
unit, CDI GPU + a bind at /data), three consecutive runs of the same script:
run 2026.331.1108 (a RESTARTED unit):
== start
== charly start rc=0
== write the bind from INSIDE the container
touch: cannot touch '/data/probe': No such file or directory
== charly cmd rc=1
run 2026.331.1109 (again a restart): identical failure, 11.3s into the phase.
the SAME command a minute later, same container:
$ charly cmd pod-cdi-keepid-bind "sh -c 'ls -la / | grep data'"
drwxr-xr-x 0 user user 40 Nov 27 11:08 data # the mount IS there
the FIRST run of the day (a FRESH create of that unit) passed the identical cmd.
the unit is correct:
$ grep -E '^(Volume|UserNS)=' ~/.config/containers/systemd/charly-pod-cdi-keepid-bind.container
Volume=/tmp/charly-cdi-keepid-bind:/data
Volume=/usr/lib/libcuda.so.1:/usr/lib/libcuda.so.1:ro (… 105 read-only lib binds)
UserNS=keep-id:uid=1000,gid=1000
Mechanism
After charly start returns 0 for an ALREADY-EXISTING pod unit, the container's bind mounts are not yet visible: a charly cmd issued immediately fails with '/data: No such file or directory', while the same cmd a minute later sees the mount and a FRESH create of the same unit passes. So the waiter covers creation but not a restart, and any script that does start -> act-on-a-mounted-path races it.
Missed control
The bed that found it assumed start => ready, and the first run (a create) passed, so the restart path had never been exercised by that assertion.
Blast radius
every deploy script, bed step or agent action that starts a unit and immediately touches a bind-mounted path: intermittent 'No such file or directory' with an exit 0 from start.
Root fix
Make charly start wait until the container is actually up and its mounts are present (the same bounded readiness the create path has), or return a distinct 'started but not ready' state so callers can poll instead of racing.
Spike (its result, or none with the reason)
none yet: measured three times on the real unit (two restarts failed, one create passed, a later cmd saw the mount)
Found while re-proving opencharly/plugin-deploy-pod#103's bed against the keep-id contract.
Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity
aitrawog commentedon Nov 27, 2026
CLAIM
Filed as blocking: it blocks this session's own progress, so this session claims it at filing and fixes it.
Agent:
cdi-audit· Claude Code sessionf760307f-53b4-4f48-87da-00f95e5300edAssisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
fix(bed): assert the keep-id CDI contract, and pin a base tag the reg…
aitrawog commentedon Nov 27, 2026
STATUS
STATUS — implementing this now, and one ownership correction to record.
The remedy's code is in opencharly/plugin-deploy-pod, not this repo. The measurement is exact:
charly startresolves a pod plan and the plugin runs it —podStart(candy/plugin-deploy-pod/lifecycle.go) →podContainerStart→systemctl --user start <svc>, which returns as soon as the job is queued; nothing polls the container after it. So the fix lands as aplugin-deploy-podPR that closes this issue, and the issue stays here because the failing VERB (charly start) and its diagnosis belong to this repo's user-facing surface.Reproduced today, twice, on the real unit (
pod-cdi-keepid-bind, keep-id + CDI + a bind at /data):So the window is real and INTERMITTENT (1.6s here, ~11s in the filing), which is exactly why the fix must be a bounded wait on the engine's own state and not a sleep.
The spike's discriminating fact: a container that is not yet
runninghas an EMPTY mount namespace —podman execinto a created-but-not-started container succeeds and sees no mounts, which is thetouch: cannot touch '/data/probe'symptom. The engine'sState.Statusis therefore the signal, and the fix polls it, bounded, after start (candidates and their measurements will be pasted in the PR body).Agent:
cdi-audit· Claude Code sessionf760307f-53b4-4f48-87da-00f95e5300edAssisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Agent:
cdi-audit· Claude Code sessionf760307f-53b4-4f48-87da-00f95e5300edAssisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
fix(pod): a start waits for the container to be RUNNING, not just for…
aitrawog commentedon Nov 27, 2026
RESOLVED — fixed in opencharly/plugin-deploy-pod#107 (
70368953aa45c05488ae0dbe9080f6c998ce01e3).podStartnow waits for the container the start command created to reportrunningbefore returning, so the mount-namespace window is gone:start_ready.go—waitContainerRunning/pollContainerRunning: inspect{{.State.Status}}untilrunning, 1 s cadence, 10 s per attempt, 60 s deadline, over the sharedpoll.PollUntilprimitive (no new mechanism, no sleep).readiness.go—startEngineBinis now the ONE engine-binary resolution, used by both post-start waits (the declared-readiness wait's inline copy is deleted).lifecycle.go— the wait runs immediately afterpodContainerStart, before the declared readiness probe, the tunnel and the caller.Why this signal and not a delay: a container that is not yet
runninghas an EMPTY mount namespace —podman execinto a created-but-not-started container succeeds and sees none of its mounts, which is exactly thetouch: cannot touch '/data/probe'symptom. The window was measured at 1.6 s in one run and ~11 s in the filing, so a fixed delay would be both wrong and forbidden (R3).Proof on the merged head: four new tests, the discriminator being
created, created, running— the poll must inspect at least three times, and a single read is exactly the defect; pluscharly check run check-pod-cdi-usernsPASS (steps=6, 0 skipped) and three stop/start cycles each leaving/datapresent at the firstcharly cmdafter start returned.One correction recorded for honesty: the first bed run FAILED at the bind write, and the cause was a leftover deploy of the same name from the pre-fix spike still running — not the fix. It was removed, the host confirmed clean, and the bed then passed; that RCA is in the PR body.
Agent:
cdi-audit· Claude Code sessionf760307f-53b4-4f48-87da-00f95e5300edAssisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)