Skip to content

Run gVisor sandboxes without a pause container - #2773

Merged
Benjamin Elder (BenTheElder) merged 5 commits into
agent-substrate:mainfrom
milantracy:gvisor-no-root-container
Oct 21, 2026
Merged

Benjamin Elder (BenTheElder) merged 5 commits into
agent-substrate:mainfrom
milantracy:gvisor-no-root-container

Conversation

@milantracy

@milantracy Jing Chen (milantracy) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Each actor sandbox had a root container that ran /pause from a pause image. atelet pulled that image and built its bundle, and every SandboxConfig had to name it. runsc can now boot a sandbox with no root container and checkpoint and restore it, so the pause container is not necessary.

ateworker-gvisor now creates the _pause sandbox with -no-root-container and writes its spec with no process, rootfs, or mounts. The spec keeps the network namespace, cgroup, resource limits, and durable-dir mount hints. Application containers do not change.

Remove pauseImage from the SandboxConfig CRD, from SandboxAssets in the atelet API, from the snapshot manifest, from the sandbox runtime hash, and from asset prewarm. Remove the pause_rootfs restore phase.

The PR title becomes the release note. Write it for users: what changed for them, not how the code changed.

Breaking change

  • pauseImage is removed from SandboxConfig;
  • the minimum gVisor release is #15551 (the 2026-10-17 nightly or later);
  • old snapshots don't restore, so golden snapshots need recutting;
  • _pause is now _sandbox, which changes the log label, the kubectl -c filter, the cgroup leaf and the phase names.

Fixes #967

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@milantracy
Jing Chen (milantracy) marked this pull request as draft October 16, 2026 21:28
@milantracy

Copy link
Copy Markdown
Member Author

I verified the change locally

The gVisor pin in manifests/ate-install/sandboxconfig-gvisor.yaml still points at the 2026-10-10 nightly, which can't checkpoint/restore a sandbox with no root container. I'll move it to the first nightly with gvisor/gvisor#15551 or later from a different PR before this change is merged

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

minor comments, generally +1

you'll probably have to rebase a bit when the nightly is ready, feel free to drop me a ping when the nightly is ready.

Comment thread internal/ocispec/gvisor.go Resolved
Comment thread docs/architecture.md Resolved
@milantracy
Jing Chen (milantracy) force-pushed the gvisor-no-root-container branch 3 times, most recently from d9738ea to 4826196 Compare October 18, 2026 01:52
@milantracy
Jing Chen (milantracy) marked this pull request as ready for review October 18, 2026 02:20
@bowei Bowei Du (bowei) added area/gvisor area/node kind/feature An enhancement / feature request or implementation labels Oct 19, 2026
Comment thread internal/proto/ateletpb/atelet.proto Resolved
@nybidari

Copy link
Copy Markdown
Collaborator

There are conflicts, please rebase.

Comment thread internal/ocispec/gvisor.go Resolved
@nybidari

Copy link
Copy Markdown
Collaborator

Update the description with the breaking change.

Comment thread cmd/ateworker-gvisor/runsc.go Resolved
Comment thread docs/architecture.md Resolved
@dberkov
Dmitry Berkovich (dberkov) added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
Each actor sandbox had a root container that ran /pause from a pause
image. atelet pulled that image and built its bundle, and every
SandboxConfig had to name it. runsc can now boot a sandbox with no root
container and checkpoint and restore it, so the pause container is not
necessary.

ateworker-gvisor still names the sandbox _pause, but now creates it with
-no-root-container and a spec with no process, rootfs, or mounts. The
spec keeps the network namespace, cgroup, resource limits, and
durable-dir mount hints. Application containers do not change.

Remove pauseImage from the SandboxConfig CRD, from atelet's sandbox
record and snapshot manifest, from the sandbox bundle hash, and from
runtime prewarm. Remove the pause_rootfs restore phase.

The bundle hash changes, so snapshots taken with a pause container no
longer match any worker's runtime.

Signed-off-by: Jing Chen <[email protected]>
The sandbox has no pause container, so the name _pause is misleading.
Rename the sandbox's runsc ID to _sandbox and ocispec.PauseContainer to
ocispec.SandboxID. The sandbox's runsc output is now logged under
_sandbox, its cgroup leaf is <uid>-_sandbox, and the restore phases are
sandbox_create and sandbox_restore.

Remove the claim in the architecture doc that snapshot manifests pin
the sandbox binaries for restore. A restore gets its runtime from the
control plane.

Signed-off-by: Jing Chen <[email protected]>
writeSpec built a full container spec for the sandbox and ShapeGVisor
then removed the process, rootfs, and mounts. Add ocispec.BuildSandbox,
which gives only the hostname and namespaces, and use it for the
sandbox. ShapeGVisor now only adds to a spec.

Signed-off-by: Jing Chen <[email protected]>
atelet makes the application containers' bundles, so writeSpec only
makes the sandbox's. Say in the architecture doc how a memory restore
stays on the snapshot's sandbox runtime.

Signed-off-by: Jing Chen <[email protected]>
Reword comments that used contrast pairs or em-dashes. Drop
TestPrepareOCIBundlesNoSandboxBundle, which only checked that atelet no
longer makes a bundle for the sandbox.

Signed-off-by: Jing Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/gvisor area/node kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt runsc --no-root-container to take sentry startup off the actor start path

5 participants