Skip to content

POC: agentInject agent-only checkpoint storage (do not merge) - #4

Closed
Ronkahn21 wants to merge 2 commits into
feat/podsnapshot-capturefrom
feat/agent-inject-storage
Closed

POC: agentInject agent-only checkpoint storage (do not merge)#4
Ronkahn21 wants to merge 2 commits into
feat/podsnapshot-capturefrom
feat/agent-inject-storage

Conversation

@Ronkahn21

Copy link
Copy Markdown
Owner

POC — do not merge

Proof-of-concept for an agent-only checkpoint storage mode (accessMode: agentInject) where the
workload pod never mounts the checkpoint PVC. The node agent owns the PVC and grafts the checkpoint
into the restore container's mount namespace via open_tree(OPEN_TREE_CLONE) + move_mount, so CRIU
can read it. Opened to exercise CI on the change; not intended to merge as-is.

What it does

  • New opt-in accessMode: agentInject (agent config + operator config + Helm).
  • Operator skips injecting the checkpoint PVC into capture/restore pods (leaves PVCName empty) and
    stamps the resolved access mode; the agent treats the stamped value as authoritative.
  • nsrestore gains --checkpoint-fd: the agent clones its own checkpoint dir into a detached mount
    (open_tree), passes the fd via exec.Cmd.ExtraFiles, and nsrestore grafts it with move_mount
    inside the container before CRIU restore.
  • Capture is unchanged from agentMount (agent writes via its own mount).

Validation done outside CI

  • Cross-namespace mechanism proven on a live kernel: plain /proc/self/fd bind is EINVAL
    cross-ns; open_tree + move_mount works.
  • Full real-CRIU run: checkpoint a live process, graft via open_tree+move_mount, criu restore
    from the grafted mount, process resumes.
  • Both Go modules build; operator unit tests pass.

Not covered here

  • Full GPU/k8s e2e (agent ↔ PodSnapshotContent, CUDA-checkpoint) runs on the cluster, not in this PR.

See plans/snapshot-migration/agent-inject-cross-ns-explainer.md for the kernel-level writeup.

Signed-off-by: Ron Kahn <rkahn@nvidia.com>
Adds an opt-in storage access mode where workload pods never mount the
checkpoint PVC. The node agent mounts it (like agentMount) and, for restore,
grafts the checkpoint dir into the target container's mount namespace via
open_tree(OPEN_TREE_CLONE)+move_mount inside nsrestore, before CRIU reads it.
A plain /proc/self/fd bind cannot cross mount namespaces (EINVAL); open_tree
clones a detached mount that move_mount attaches in the container ns.

Operator skips PVC injection into capture/restore pods (PVCName empty) and
stamps the resolved access mode; the agent treats the stamped value as
authoritative over its own config.

Signed-off-by: Ron Kahn <rkahn@nvidia.com>
@Ronkahn21
Ronkahn21 deployed to external_collaborator July 25, 2026 08:11 — with GitHub Actions Active
@github-actions github-actions Bot added documentation Improvements or additions to documentation deployment::k8s labels Jul 25, 2026
@Ronkahn21

Copy link
Copy Markdown
Owner Author

Superseded: reopened against upstream ai-dynamo/dynamo (main) for full CI.

@Ronkahn21 Ronkahn21 closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment::k8s documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant