Skip to content

feat(runsc): manage checkpointable file-backed Docker upper layers - #83

Draft
hky1999 wants to merge 5 commits into
inclusionAI:mainfrom
hky1999:hky1999/managed-dind-upper-rofs
Draft

hky1999 wants to merge 5 commits into
inclusionAI:mainfrom
hky1999:hky1999/managed-dind-upper-rofs

Conversation

@hky1999

@hky1999 hky1999 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Add opt-in extra_config.fileBackedTmpfsMounts so Docker/containerd private writable upper files use sandbox-owned anonymous filestores instead of being copied into checkpoint RAM pages. Immutable lower roots continue through the existing shared ROFS provider. The implementation adapts Tianyu Zhou's managed-upper work.

Review baseline

Rebased on current inclusionAI/sandboxd:main at 91d9d05 (Sandboxd's maintained target branch; the AKernel consumer targets develop). Current head: f5c57b1. Preserve the new upstream gVisor/Firecracker release pins, installers and CI without reverting them.

Changes to review

  1. Managed upper mount parsing/quota reservation and mount preparation; persist the checkpoint opt-in and restore geometry. Require saved filestore artifacts, preserve clone-on-adopt, reject overlapping targets and quotas that consume the root budget.
  2. Reuse immutable OCI process/layer metadata from the existing ROFS Bolt store after reopen when layers remain local. This adds no second layer cache and does not pin layers against GC; missing layers use the normal registry path.
  3. Successful Checkpoint RPC timings separate runtime capture from output durability. Debug-level per-file fsync timings preserve the same synchronization order and persistence semantics.

The five feature/documentation commits are retained as separate review units. Primary files: pkg/runtime/runsc/filestore_mounts.go, client.go / handler.go, pkg/imagemanager/oci/immutable_images.go, and internal/server/checkpoint.go. The public contract is in doc/checkpoint-restore.md.

Example:

{"fileBackedTmpfsMounts":[{"target":"/var/lib/akernel-image-snapshots","sizeMB":2048}]}

Consumer and merge boundary

AKernel #127 supplies image preparation, Docker/Compose and original-process handles using the current AKernel develop SDK. The AKernel consumer must pin the merged Sandboxd revision and qualify a normal image build before delivering this profile. AKernel #126 exposes explicit Helm reflink configuration.

The existing complete runtime bundle must support anonymous filestores/FICLONE. On Linux 5.10, live and checkpoint backing must use the same mount object. Reflink shares filesystem data; RAM pages are still captured normally. No production deployment, Coordinator, runtime pin, durability policy or scoring threshold is changed here.

Validation

  • On this rebased revision: make check-fmt, make vet and make test passed, including managed target/quota checks, persisted opt-in, missing artifacts, immutable metadata reuse/fallback and reference rollback.
  • Earlier prototype qualification on a private directory on production native XFS used unchanged kv-live-surgery task files and durable sync: two checkpoint APIs 3.297/3.288 seconds, runtime capture 1.044/1.004 seconds, output barrier 2.196/2.180 seconds; pages files 1.061/1.063 GiB, Environment restore 2.472 seconds. Original PID/RAM/FD/TCP/container identities, upper rollback/subsequent writes and a separate verifier passed; owned resources were cleaned.
  • Those historical numbers came from the previous feature revision and previous complete runtime payload. They are context for the design, not a new E2E result for this rebase/latest upstream bundle. No cluster resources were created or modified during this PR cleanup.

Keep this Draft pending review and fresh isolated consumer/bundle qualification.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

hky1999 and others added 5 commits October 28, 2026 22:52
Adapt mount and quota preparation from Tianyu Zhou\u0027s 4ff87a3 while preserving the current filestore validation and parent mount namespace handling. Persist the per-sandbox checkpoint opt-in and require managed artifacts on restore.

Co-authored-by: Tianyu Zhou <zhoutianyu1995@gmail.com>
@hky1999
hky1999 force-pushed the hky1999/managed-dind-upper-rofs branch from 614446b to f5c57b1 Compare October 28, 2026 14:59
@hky1999 hky1999 changed the title Manage filestore-backed tmpfs mounts for nested container writable layers feat(runsc): manage checkpointable file-backed Docker upper layers Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants