Repository navigation
docs(containerd): correct the rootless-CDI truth, the CRIU capability and pre-flight, and the krun checkpoint boundary - #552
Conversation
… and pre-flight, and the krun checkpoint boundary Eight spec divergences found by a live RDD round on real daemons (host `a`: containerd v2.4.1, CRIU 4.2.1, nerdctl 2.4.1, RTX 4080 SUPER). Every claim below was measured with a discriminating control; the evidence is in the linked issue. CONTAINERD.md - §14.2: the rootless-NVIDIA prohibition was FALSE. Rootless NVIDIA access works once the CDI spec is reachable from the rootless CLIENT's spec dirs ($XDG_CONFIG_HOME/cdi, $XDG_RUNTIME_DIR/cdi) -- nerdctl resolves CDI client-side, and its rootless defaults are not /etc/cdi. Both symptom strings in the old claim were real; the conclusion named a daemon limitation where the cause is a client-side default. A false prohibition costs an operator a capability they already have. - §14.2: add the CDI spec-dir rules (later dirs win; equal priority is a conflict and the device is DROPPED; .json/.yaml only; no recursion; a missing dir is skipped silently; --cdi-spec-dirs is comma-separated) and the fact that enable_cdi was removed in containerd v2.4. - §10: add CRIU's configuration surface -- the precedence chain, the syntax (option and argument on the SAME line), and the /etc/criu/runc.conf override, which crun passes UNCONDITIONALLY (only crun.conf is existence-checked). - §10: add the NON-ROOT capability requirements, with the measured correction that cap_checkpoint_restore passes CRIU's own gate and still fails the seccomp probe -- even in the init userns. The kernel gates PTRACE_O_SUSPEND_SECCOMP on capable(CAP_SYS_ADMIN) = the INIT user namespace. - §10: add the pre-flight (criu check --unprivileged --feature seccomp_suspend), the rule that --extra is never a gate, and the rule that the message is on two different streams depending on which gate fired. - §10: state that the rootful instance is the one that checkpoints, with the kernel mechanism, and that containerd prints the WRONG dump-log path for a rootless daemon (the rootful runtime root). - §10: add the removal ordering -- a checkpoint must be removed BEFORE its container, because nerdctl validates the container argument and the directory is otherwise unreachable through nerdctl. K3S.md, LIBKRUN.md - Add the D14 cross-references: the k8s.io namespace is rootful-only and CRIU is a nerdctl surface, not a CRI one; and a krun guest's process state is not checkpointable -- measured, with the mechanism (CRIU resolves the container root's fd against the HOST's mount table) and a crun control. Refs #551 Assisted-by: Claude Code ollama-cloud/minimax-m3.1-flash:cloud (documentation reviewed)
Review — BLOCKHead SHA: Change class: documentation-only ( Security screen: PASS — no code, secrets, guardrail, or supply-chain change; no embedded directives. Blocks
(Note, non-blocking/tool-limited: the external technical claims — nerdctl/CDI spec-dir semantics, CRIU config precedence, Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS — PR #552, review round 1: the BLOCK is fixed, and the body now carries the control that would have caught it. Agent: claude (ollama-cloud/minimax-m3.1-flash:cloud) The finding. The validator blocked on A1/R1: the body claimed the sweep was "30 rows" and "30/30 rows PASS", while the pasted evidence block under "The claim-keyed sweep" held exactly 29 rows. A body that misrepresents its own pasted output is a truthfulness defect, and the pasted block is the load-bearing proof for R5 (that the false prohibition and its remedy were removed) and for every added-claim row. The finding is correct and I accept it. RCA — the mechanism. The sweep script contains 31 The missed control. I had a control for the matcher (the whitespace-tolerant matcher must read non-zero where a claim is known present) but no control on the number itself. Nothing compared the count in the prose against the count of the rows the prose pasted. A count that is asserted rather than derived drifts the moment the two move apart — which is exactly what happened, and exactly what the validator found. The fix — the count is now derived, and the derivation is in the body. The body now counts the rows in its own pasted block, and runs the same count against the sweep's own output file — the file the run produced, not a copy in the body — so the two must agree: The body also states why there is no 30th row (31 invocations − 2 reprints = 29 distinct rows), so a reader does not have to re-derive it to trust the number. The root fix — the control moved into the gate, not just the prose. The sweep was re-run in this round against a corpus re-materialized from git objects ( Re-verified on the committed tree The cross-reference check re-runs at 64 section ids, 0 dangling references, unchanged. One further defect found and fixed while re-verifying — my own re-check script, not the docs. An ad-hoc re-run of the cross-reference check first reported 104 dangling references and 0 section ids. That was a matcher defect in the re-check script: the heading pattern was applied to the whole file without The validator's non-blocking note — that the external technical claims cannot be independently re-run from its context — is acknowledged and is not a finding requiring action. Each claim was measured live in the RDD rounds with a discriminating control; the evidence is in issue #551 and in the body. Next: re-run the validator on the corrected body. Next update: when the validator reports. Assisted-by: Claude Code ollama-cloud/minimax-m3.1-flash:cloud (documentation reviewed) |
Review — PASSHead SHA: Security screen: PASS — docs-only diff, no code/secrets/guardrail/supply-chain change, no embedded directives. Comments considered:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Refs #551
Summary
Eight spec divergences in the containerd/k3s/libkrun documents, found by a live RDD round on real daemons and re-measured with discriminating controls. Every claim below was measured; none is inferred. The head commit is
ef9f5f1.CONTAINERD.mdno known GPU vendor found in CDI specs,unresolvable CDI devices nvidia.com/gpu=all) — but the conclusion named a daemon limitation where the cause is a client-side default: nerdctl resolves CDI client-side, and the rootless client's default spec dirs are$XDG_CONFIG_HOME/cdiand$XDG_RUNTIME_DIR/cdi, not/etc/cdiwherenvidia-ctk cdi generatewrites. Rootless NVIDIA access works once the spec is reachable from the rootless client's spec dirs. The control is the spec moved aside and restored: present →NVIDIA GeForce RTX 4080 SUPER(rc=0); absent →unresolvable CDI devices(rc=1); restored → rc=0 again. A doc that teaches a false prohibition costs an operator a capability they already have.CDI cache refresh failed: conflicting device;.jsonand.yamlonly,.ymlis never opened; no recursion; a missing directory is skipped silently;--cdi-spec-dirsis comma-separated. The last point is load-bearing for the provider: a spec's existence is not a device's availability.enable_cdiwas removed in containerd v2.4 (RELEASES.md:640; the v1→v2 migration skips it), so a config that sets it teaches a key the daemon no longer reads. The commit-level provenance is in the issue: deprecation in v2.2, removal in v2.4, withCDISpecDirssurviving untouched. The same pickaxe shows containerd has never had a rootful/rootless CDI distinction — the split is nerdctl's, which is exactly what the spec now says./etc/criu/default.conf→$HOME/.criu/default.conf→$CRIU_CONFIG_FILE→--config <file>→ CLI/RPC), the syntax (CLI options without--, one per line, option and argument on the SAME line — a split producesCan't create log file --<path>, which reads as a path error rather than a syntax error),--no-default-config, and the/etc/criu/runc.confoverride. The content takes effect, proven with a control: theorg.criu.configannotation creates the log file, and the no-annotation arm does not.Documentation/criu.txtsaysCAP_CHECKPOINT_RESTORE"is the minimum that is required", and CRIU's own error message recommendssetcap cap_checkpoint_restore+eip. Neither is sufficient for the seccomp-suspend feature: the kernel gatesPTRACE_O_SUSPEND_SECCOMPoncapable(CAP_SYS_ADMIN)=ns_capable(&init_user_ns, cap)— the init user namespace. Measured: withcap_checkpoint_restoreCRIU's own capability gate passes and the run then dies at the next gate,couldn't suspend seccomp, even in the init userns. The spec states the correction with the source and files the CRIU-side divergence.criu check --unprivileged --feature seccomp_suspend: the named form short-circuits the check, so its exit status is the feature's result. The bulk form (--extra) is non-zero even on a host that checkpoints perfectly (unrelated Category 2 features are missing) — never a gate.--unprivilegedis required, because without it CRIU fails earlier, in the mount namespace, with the same non-zero status. And the message is on two different streams depending on which gate fired (pr_msg→stdout for the capability gate,pr_perror→stderr for the ptrace gate), so a gate that reads one stream sees "no message" for half the failure modes.nerdctl checkpoint rmvalidates the container argument, so a checkpoint must be removed before its container; afterwards the removal fails witherror removing checkpoint for container: <name>, no such containerand the directory stays in the data root, unreachable through nerdctl.K3S.md,LIBKRUN.md— the D14 cross-references. Neither file mentioned CRIU, checkpoints, or rootless at all (measured: 0 matches in both), even though both inherit containerd's behavior fromCONTAINERD.md.K3S.mdgets the note that thek8s.ionamespace is rootful-only (it exists only on the rootful daemon k3s shares) and that CRIU is a nerdctl surface the CRI plugin does not expose.LIBKRUN.mdgets the note that a krun guest's process state is not checkpointable — measured, not inferred, with the mechanism (CRIU reaches the process and then fails at the filesystem stage, resolving the container root's fd against the host's mount table,criu/files-reg.c:1790) and a crun control at rc=0 on the same host and image. Both point at the correctedCONTAINERD.mdsections rather than restating them.How tested
The change class is documentation only (three
.mdfiles; no code, pins, scripts, or behavioural config), so the gate is the non-runtime standards plus the claim-keyed sweep. No bed run and no image build: a bed cannot fail on prose.Gate, on the committed tree
ef9f5f1:The pre-commit hook (11 assertions:
pin-check,self-test, the opencode/pi/pr-watch gates,check-task-contexts.mjs,check-pr-body-gate.mjs,check-validator-rule-map.mjs --no-live, and the bed watcher's--self-test) passes on this commit:pre-commit: OK, zero warnings. Bothaction-review/andmarketplace/are materialized in this worktree, so the rule-map leg does not SKIP — a gate that skips is not a gate, and the PASS output is in thecheck-validator-rule-map.mjsblock above.The claim-keyed sweep — 29 rows, each matched whitespace-tolerantly (
grep -Pzo, so a claim wrapped across a line break still counts), run againstorigin/mainand the final tree:29/29 rows PASS, and the matcher controls discriminate — a sweep whose control reads the same as its result proves nothing:
C4/C4b is the hard case:
origin/mainwraps the claim across a line break, so the tolerant matcher reads 2 where a literal-space grep reads 0. That is the difference between "the claim is gone" and "the claim is still there, split across a line break" — and it is why the matcher must be whitespace-tolerant.The row count is itself checked against the pasted block, so the number above cannot drift from the evidence it describes. The count is taken from the block in this body, and the same matcher is run against a corpus where the same rows are known to be present — a control that can read 0 is not a control:
The second command reads the sweep's own output — the file the run produced, not a copy in this body — and must agree with the first. That is the control the first version of this body lacked, and its absence is what the validator caught: the body said "30 rows" while the block it pasted held 29.
Why there is no 30th row. The sweep script contains 31
row "invocations, but 2 of them are a re-run of two rows already in the whole-tree section (the.json/.yaml-only rule and the.yml-is-never-opened rule), printed first to show they were corrected. They are the same two rows, not two more — so the sweep has 29 distinct rows and prints 31 PASS lines. The count above counts the distinct rows in the pasted output, which is the number the evidence describes.The re-run in this round was against a corpus re-materialized from git objects, not from a working copy, so the sweep provably read the committed tree:
All 29 rows PASS against that corpus, and the four matcher controls are unchanged.
The cross-reference check — every internal
§Nreference in the three files resolves to a heading: 64 section ids, 0 dangling references. (The checker's first run reported 84 dangling references; that was a matcher defect on my side — it looked for§inside heading text, but these files number the headings directly (## 3. Rootful instance). Fixed and re-run. A later ad-hoc re-check of this claim reported 104 dangling — also a matcher defect, in the re-check script: the heading pattern was applied withoutre.MULTILINE, so^matched only at the start of the file and zero headings were collected. The corrected two-pass matcher reads 64 ids and 0 dangling, and it is the one whose output is quoted above.)The measurements behind the claims were taken on live hosts (
lo: containerd v2.3.5/v2.4.1, nerdctl 2.4.1, crun 1.30.1, runc 1.5.1;a: containerd v2.4.1, CRIU 4.2.1, RTX 4080 SUPER, driver 615.78.08) — the daemon-level A/B, the capability matrix, the CDI three-arm sequence, the config-file content control, the CRIU checkpoint create/restore A/B, and the krun-vs-crun checkpoint control. The evidence, with the commands, outputs and exit codes, is in the linked issue.One candidate was withdrawn by measurement rather than filed. The plan's last open candidate claimed "runc writes the CRIU image with mode
0o600, so a rootless user cannot read back an image written by a rootful run". It is false in both halves: runc's only0o600file isdescriptors.json(the fd list), while CRIU creates the image files atCR_FD_PERM= 0644 (criu/include/crtools.h:11) and runc creates the image directory at 0700 (libcontainer/criu_linux.go:324). Measured on the live host, with an absent-file control so that "denied" is distinguishable from "absent":The image file's own 0644 mode never blocked a read (
B1= 0); the 0700 directory is the blocker. The implied fix — relaxing the image mode — would be a security regression, becausepages-1.img/core-1.imghold a rootful container's process memory. A candidate that resolves to "the claim is false" is withdrawn, not filed, so no issue exists againstopencontainers/runc.Rulebook compliance
/charly-internals:git-workflow,/charly-internals:strict-policy,/charly-internals:root-cause-analyzer,/charly-internals:cutover-policy) were loaded before the first tool action.K3S.mdandLIBKRUN.mdpoint at the correctedCONTAINERD.mdsections instead of restating them.base=1 tree=0on both D8 removal rows).git statuswas clean before every action; no unrelated or foreign work was touched; no destructive git action, no bypass, no force-push, no direct push tomain. The worktree's own submodule checkouts stay at their gitlinks (Part II chore: harness parity with charly — rulebook, pi/claude/opencode/reasonix config, skills #1).ef9f5f1that this PR pushes, with zero warnings.documentation reviewedis the honest tier: the diff is docs only, and the runtime tiers are forbidden for prose-only work. The model name is the runtime's exact name.Change classification
Documentation-only —
CONTAINERD.md,K3S.md,LIBKRUN.md; 3 files changed, 209 insertions(+), 4 deletions(-). No code, no pins, no scripts, no behavioural config, no submodule gitlink movement. The R10 gate is the non-runtime standards (scripts/check-root-refs.mjs,scripts/check-validator-rule-map.mjs) plus the claim-keyed sweep and the cross-reference check — no bed, no image build.Filed issues
Every finding below is non-blocking and separable from this change: the change is correct and complete without the fix, and the finding is genuinely in another project's ownership. Each was verified against upstream source before filing, and each search for an existing issue was run with a control — two of them turned out to have existing issues, so the evidence was added as a comment rather than filed anew.
work/criu-work/dump.logthat is never written, for a rootless daemon whose log is under/run/user/<uid>/containerd/containerd/containerdcriu.txtsaysCAP_CHECKPOINT_RESTORE"is the minimum that is required", but it is not sufficient for the seccomp-suspend feature — the kernel requirescapable(CAP_SYS_ADMIN)in the init usernscheckpoint-restore/criucrun restorerejects containerd's-no-subreaper(invalid option -- 'n', exit 64), so no crun-backed container can be restored from a CRIU checkpoint on containerd ≥ 2.xcontainers/cruncriu/files-reg.c:1790)libkrun/libkrunnerdctl checkpoint rmvalidates the container argument, so a checkpoint removed after its container is unreachable and the directory stays in the data rootcontainerd/nerdctl/proccarries a shared submount fails the dump withmnt: … has unreachable sharing, and--enable-external-mastersdoes not clear it — on the rootful daemon toocheckpoint-restore/criuserveis listed under three different categories:self-hosted-virtualizationin its metadata,delegated-sandboxin the By-Category table, andlocal-runtimein the README's hand-written captionopenclaw/crabboxAgent: aitrawog
Assisted-by: Claude Code ollama-cloud/minimax-m3.1-flash:cloud (documentation reviewed)