Skip to content

runsc: add a sandbox-only boot mode - #13986

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl959101413
Open

runsc: add a sandbox-only boot mode#13986
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl959101413

Conversation

@copybara-service

Copy link
Copy Markdown

runsc: add a sandbox-only boot mode

Add runsc create/boot --sandbox-only, which boots a sandbox from a spec describing only the sandbox: no Process and no Root. The kernel comes up empty and containers are added afterwards as subcontainers.

This exists for the containerd Sandbox API, which lands separately. Under CRI with sandboxer = "shim" there is no pause container to stand in for the pod: containerd leaves Sandbox.Spec unset, so the sandbox bundle has no config.json, and there is neither a rootfs nor a process to run. runsc has so far required both.

Limitations:

  • Checkpoint/restore is refused for a sandbox-only sandbox. The kernel state round-trips, but runsc restore cannot be told the spec describes a sandbox, so it either rejects it or dereferences the absent Process, and the loader would restore the sandbox as if it had a gofer. Lifting it is a --sandbox-only flag, a nil guard, and skipping the sandbox in the restorer's per-container loop; deferred rather than shipped untested.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#13981 from milantracy:sandbox-only 2defed0

Add `runsc create/boot --sandbox-only`, which boots a sandbox from a spec describing only the sandbox: no Process and no Root. The kernel comes up empty and containers are added afterwards as subcontainers.

This exists for the containerd Sandbox API, which lands separately. Under CRI with `sandboxer = "shim"` there is no pause container to stand in for the pod: containerd leaves Sandbox.Spec unset, so the sandbox bundle has no config.json, and there is neither a rootfs nor a process to run. runsc has so far required both.

Limitations:

- Checkpoint/restore is refused for a sandbox-only sandbox. The kernel state round-trips, but `runsc restore` cannot be told the spec describes a sandbox, so it either rejects it or dereferences the absent Process, and the loader would restore the sandbox as if it had a gofer. Lifting it is a --sandbox-only flag, a nil guard, and skipping the sandbox in the restorer's per-container loop; deferred rather than shipped untested.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#13981 from milantracy:sandbox-only 2defed0
PiperOrigin-RevId: 959101413
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Aug 4, 2026
@milantracy
milantracy requested review from EtiennePerot and fvoznika and removed request for EtiennePerot and fvoznika August 4, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant