Skip to content

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

Open
milantracy wants to merge 1 commit into
google:masterfrom
milantracy:sandbox-only
Open

runsc: add a sandbox-only boot mode#13981
milantracy wants to merge 1 commit into
google:masterfrom
milantracy:sandbox-only

Conversation

@milantracy

Copy link
Copy Markdown
Collaborator

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants