gvisor: resume Data snapshots on the golden snapshot (#451, phase 2) - #790
Draft
Dmitry Berkovich (dberkov) wants to merge 1 commit into
Draft
gvisor: resume Data snapshots on the golden snapshot (#451, phase 2)#790Dmitry Berkovich (dberkov) wants to merge 1 commit into
Dmitry Berkovich (dberkov) wants to merge 1 commit into
Conversation
Dmitry Berkovich (dberkov)
force-pushed
the
resumeFromDataGVisor
branch
from
August 7, 2026 04:54
68c908b to
cbff13b
Compare
…ta, agent-substrate#451 phase 2) Extends the OnGolden data resume to the gVisor runtime, built on runsc's new split checkpoints: 'runsc checkpoint -split-fscheckpoint' writes the memory snapshot at the checkpoint's top level and the durable-dir fs image under fs/, and 'runsc restore -split-fsrestore' reads both halves from -image-path. atelet stages a DATA_ON_GOLDEN gVisor restore as one folder shaped like a Full split snapshot whose fs half is the actor's: the golden's files minus its fs/ contents at the top level, and the actor's flat fscheckpoint image set re-rooted into fs/, overriding it wholesale (micro-VM keeps its flat shadow-merge). Staging is subdir-aware — parent directories are created once per distinct dir (ensureParentDirs) on the download, local-copy, and pause-move paths — and gVisor combines require the actor's and golden's pinned runsc to match: the images are runsc-version-coupled, unlike the micro-VM durable tar. ateom-gvisor lists snapshot files recursively so the fs/ half ships with the manifest, passes the fs image at create/restore time when the fs/ folder exists, and restores DATA_ON_GOLDEN through the Full path. The CRD gate restricting onResume.fromData: Golden to microvm is lifted, and the counter demos exercise the flow (the gvisor SandboxConfig temporarily pins a split-checkpoint runsc build).
Dmitry Berkovich (dberkov)
force-pushed
the
resumeFromDataGVisor
branch
from
August 7, 2026 05:00
cbff13b to
a5a8b43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of #451: extends the
onResume.fromData: Goldendata resume (micro-VM support merged in #683) to the gVisor runtime.What
A gVisor actor with
onCommit: Data+onResume: { fromData: Golden }now resumes as the template's golden snapshot (guest memory + rootfs) with the actor's durable-dir data restored over it — instead of cold-booting. Works for both durable (commit) snapshots and local pause checkpoints.How
Built on runsc's new split checkpoints:
runsc checkpoint -split-fscheckpointwrites the memory snapshot at the checkpoint's top level and the durable-dir fs image underfs/;runsc restore -split-fsrestorereads both halves from-image-path.fs/half ships with the manifest; passes--fs-restore-image-path <dir>/fsat create/restore time when thefs/folder exists;DATA_ON_GOLDENrestores through the Full path.DATA_ON_GOLDENrestore as one folder shaped like a Full split snapshot whose fs half is the actor's — the golden's files minus itsfs/contents at the top level, and the actor's flatfscheckpointimage set re-rooted intofs/, overriding it wholesale. Micro-VM keeps its flat shadow-merge. Staging is subdir-aware, with parent directories created once per distinct dir (ensureParentDirs) on the download, local-copy, and pause-move paths.FailedPreconditionotherwise.onResume.fromData: GoldentosandboxClass: microvmis lifted.Testing
fs/excluded, actor image re-rooted, subdir created on demand) and the micro-VM merged layout;filesOutsideDirfilter; recursivelistSnapshotFiles.suites/demo): the two OnGolden lifecycle cases (commit path and pause path) are no longer micro-VM-gated and run in the gVisor lane; expected counters are unchanged.Draft blockers
sandboxconfig-gvisor.yamltemporarily pins a split-checkpoint runsc build from a private test bucket (gs://snapshot-substrate-test-…/gvisor-split-checkpoint/runsc); needs a public/released runsc with-split-fscheckpoint/-split-fsrestorebefore this can merge (the gVisor e2e lane also depends on it).runscdebug logging is enabled on create/start/checkpoint/restore for bring-up; decide whether to keep it before merge.🤖 Generated with Claude Code