voltron-agent)CRIU checkpoint/restore, cross-node deputy/remote, attach-to-restored.
The agent is the mechanism side of Voltron: it turns a decision (migrate cgroup X -> node Y) into an actual move — checkpoint with CRIU, hand the image to the target over the shared OCFS2 mount, restore there, and keep the process's network served by the home-node deputy via seccomp.
| Module | Role | Status |
|---|---|---|
netpin.c | seccomp user-notif deputy/remote (network pinning) | working, self-tested |
decision.c | consume /sys/kernel/voltron/decisions | working |
migrate.c | cgroup→pids, dump→manifest on shared FS, restore on target | scaffolding (needs CRIU + cluster) |
criu.c | wrappers around the criu binary | compiled (needs criu to run) |
stream.c | bridge image bytes over /dev/voltron_rdma (in-kernel RDMA) | working (needs the module + a peer) |
A remote process runs under a seccomp filter that returns SECCOMP_RET_USER_NOTIF for network + identity syscalls (socket, connect, sendto, recvfrom, close, getpid). The deputy holds the notify fd and for each trap:
process_vm_readv/writev for pointer arguments (e.g. the recv buffer, the connect sockaddr),SECCOMP_IOCTL_NOTIF_ADDFD of /dev/null) so its fd numbering stays consistent while the real socket lives only in the deputy,getpid → the home pid).Try it on any Linux box (no cluster, no kernel module needed):
cd userspace/voltron-agent && make ./voltron-agent --selftest-netpin # single-process deputy ./voltron-agent --selftest-netpin-split # deputy in a SEPARATE process ./voltron-agent --run -- sh -c 'echo $$' # shell sees the deputy-served pid
The deputy and the remote supervisor can live on different nodes, connected by a transport fd (the RDMA channel on the cluster, or any socket). Each trapped net syscall is marshalled (struct np_req/np_resp, with input/output payloads) to the deputy, which runs it on the real socket it owns and returns the result; the remote applies it back to the traced process (placeholder fd via ADDFD, output written with process_vm_writev).
# home node: run the deputy on a connected transport fd voltron-agent --deputy --transport-fd N # exec node: run CMD, forwarding its net syscalls to that deputy voltron-agent --remote --transport-fd N -- CMD args
Agents establish the deputy/remote transport themselves over a control connection (RDMA/mTLS on the cluster; TCP here):
# exec node: run the control server voltron-agent --serve --listen 7854 # home node: run CMD on the exec node with its network pinned back here voltron-agent --run-remote <exec-ip>:7854 -- CMD args
The connection carries the forwarded syscalls; --run-remote is the deputy, --serve runs CMD under the remote supervisor. CRIU-free and fully working.
Verified: voltron-agent --selftest-remote-exec (two agent roles over loopback) and a real two-process --serve/--run-remote run - the exec-node shell's getpid is served by the home-node deputy.
/sys/kernel/voltron/decisions for new decisions. A decision it reads is a migration out of this node (the home node).cgroup.procs), criu dump the root process tree into <shared>/.voltron/mig/<id>/, and write a manifest (cgroup, target, source, root_pid).local_id, and criu restores the image, then pins the restored process by injecting the netpin filter into it and forwarding to the home deputy.va_netpin_attach(pid, transport_fd) installs the filter into a process we did not fork - e.g. one CRIU just restored - without its cooperation:
PTRACE_SEIZE + PTRACE_INTERRUPT the target;prctl(PR_SET_NO_NEW_PRIVS) then seccomp(SECCOMP_SET_MODE_FILTER, NEW_LISTENER, ...) by writing a syscall; int3 stub at RIP and running it under ptrace (regs/text restored after each call);pidfd_getfd;voltron-agent --attach <pid> [--transport-fd N] # N = conn to the home deputy
Proven: voltron-agent --selftest-attach injects the filter into a running task and serves its getpid/socket/connect/send/recv from the deputy.
Remaining integration: CRIU--leave-stoppedleaves the task group-stopped, which blocks ptrace-driven injection (a group-stopped tracee won't run injected code); attach is proven for running / syscall-blocked tasks. The restore path needs to (a) open the deputy connection back to thesourcenode and (b) bring the restored task to an injectable state (restore running into a freezer, or a CRIU action-script hook) before callingva_netpin_attach.
The image can ride the shared OCFS2 mount, or be streamed over the in-kernel RDMA path (below) for nodes without (or faster than) the shared FS.
/dev/voltron_rdma)The kernel module exposes a bulk byte-stream over the RC QP as a misc device:
ioctl(VSTREAM_SET_TARGET, &node) selects the peer, write() streams bytes to it (fragmented into RDMA VSTR DATA frames), ioctl(VSTREAM_SEND_EOF) ends it;read() drains received bytes and returns 0 at end-of-stream.VSTR magic distinguishes stream data from the load-gossip control messages that share the QP).The agent bridges it:
# target: receive an image tar from RDMA into a dir mkdir img && (cd img && tar -xf -) < <(voltron-agent --stream-recv) # source: stream an image dir to node 2 tar -cf - -C img . | voltron-agent --stream-send 2
va_stream_send()/va_stream_recv() are also called by migrate.c as an alternative to the shared-FS handoff. Page-granular RDMA (READ/WRITE of registered memory regions) is a later optimization over this byte-stream.
Because the image can also ride the shared OCFS2 mount, no separate transfer is strictly required - RDMA streaming is the faster path when the fabric is up.
# node-local agent (reads decisions, performs migrations) sudo ./voltron-agent --local-id 1 --mig-dir /srv/shared/.voltron/mig --criu /usr/sbin/criu # --dry-run log CRIU/migration actions instead of performing them
CAP_SYS_PTRACE (for process_vm_*); works unprivileged for the self-test.--tcp-established socket handoff to the deputy to follow.