Skip to content

support runsc container-less sandbox mode#13628

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

support runsc container-less sandbox mode#13628
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl943546046

Conversation

@copybara-service

Copy link
Copy Markdown

support runsc container-less sandbox mode

Add support to runsc to boot the Sentry into an idle state without starting a
root container (no /pause process). It supports the containerd Sandbox API
and eliminate the need for a pause container for each sandbox.

The change does

  • Add a --sandbox flag to runsc config to enable this mode.
  • For runsc create, bypass spec disk read and gofer creation when --sandbox
    is enabled, as there is no rootfs or config.json on disk for an idle sandbox.
  • In loader (runsc/boot/loader.go), skip starting the root container process
    if running in sandbox mode.
  • Have sandboxShutdownCh in the loader to keep Sentry alive and idle.
    Sentry will exit only when this channel is closed.
  • Use memfd instead of os.Pipe to pass the OCI spec to runsc boot during
    startup. This allows the spec to be read multiple times across execve
    (needed for capability drop phases) without writing it to disk.
  • Handle empty string in Gofer mount configuration parsing.

assisted-by: agy

Add support to `runsc` to boot the Sentry into an idle state without starting a
root container (no `/pause` process). It supports the containerd Sandbox API
and eliminate the need for a pause container for each sandbox.

The change does
* Add a `--sandbox` flag to `runsc` config to enable this mode.
* For `runsc create`, bypass spec disk read and gofer creation when `--sandbox`
  is enabled, as there is no rootfs or config.json on disk for an idle sandbox.
* In loader (`runsc/boot/loader.go`), skip starting the root container  process
  if running in sandbox mode.
* Have `sandboxShutdownCh` in the loader to keep Sentry alive and idle.
  Sentry will exit only when this channel is closed.
* Use `memfd` instead of `os.Pipe` to pass the OCI spec to `runsc boot` during
  startup. This allows the spec to be read multiple times across `execve`
  (needed for capability drop phases) without writing it to disk.
* Handle empty string in Gofer mount configuration parsing.

assisted-by: agy
PiperOrigin-RevId: 943546046
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jul 6, 2026
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