runsc: add a sandbox-only boot mode - #13986
Open
copybara-service[bot] wants to merge 1 commit into
Open
Conversation
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
milantracy
requested review from
EtiennePerot and
fvoznika
and removed request for
EtiennePerot and
fvoznika
August 4, 2026 18:05
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.
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:
runsc restorecannot 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