Skip to content

runsc: add a no-root-container boot mode - #13981

Merged
1 commit merged into
gvisor:masterfrom
milantracy:sandbox-only
Oct 8, 2026
Merged

1 commit merged into
gvisor:masterfrom
milantracy:sandbox-only

Conversation

@milantracy

@milantracy milantracy commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Add runsc create/run/boot --no-root-container, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

  • Checkpoint/restore is refused for a no-root-container 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
    --no-root-container flag, a nil guard, and skipping the sandbox in the
    restorer's per-container loop; deferred rather than shipped untested.

@parth-opensrc parth-opensrc added the ready to pull Causes the PR to be imported into Google. Will be removed soon. label Aug 4, 2026
@milantracy
milantracy requested review from EtiennePerot and fvoznika and removed request for aaltinaydev August 4, 2026 19:36
@EtiennePerot EtiennePerot removed the ready to pull Causes the PR to be imported into Google. Will be removed soon. label Aug 6, 2026
@EtiennePerot

Copy link
Copy Markdown
Member

Please hold on this. There is #13929 and a follow-on PR that removes the runsc boot re-exec that are likely to conflict here.

Once those are in, I recommend extending the sandbox security posture test to verify the state of the Sentry process when it has reached the sandbox-only boot mode. This will protect against regressions for future changes to make it boot faster.

@milantracy

Copy link
Copy Markdown
Member Author

@EtiennePerot is there any blocker for the PR review now?

@EtiennePerot EtiennePerot left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few points of high-level feedback:

  • This feature not supporting checkpoint/restore is a big drawback and I'm not sure it's going to be that useful without it, especially for things like Substrate or more generally for high-churn container orchestrating systems, because checkpoint/restore is where they get more savings than they do from fast container startup/teardown. If it's possible to support it down the line, then having it be unsupported at first is OK, but if not, in what environment do you see this functionality being used?
  • The name "sandbox-only" is a bit of a misnomer, especially given that the runsc boot process is long-lived and the "sandbox only" flag persists on the process argv even when there are containers running inside. It's also not obvious that "sandbox only" implies "as opposed to sandbox and containers". Better names might be something more like "reusable sandbox shell", or "recycleable kernel".
  • I worry that the lack of PID 1 might cause application incompatibility. PID 1 is a constant in Linux. I wonder if we should force such sandboxes to always have each container run in their own PID namespaces, so that they are their own PID 1. WDYT?
  • The PR has a lot of Claude-speak, comments that are overly verbose, repetitive across files, and focusing too much about the current delta being made in the moment rather than on their long-term usefulness for maintainers and future LLMs to understand. Please write the comments in a way that makes the code understandable long-term instead. Personally, I've found that removing and then rewriting all code comments for LLM-generated PRs is a good forcing function to review and understand the code, and that the comments left in the code from that process are better-targeted to the subset that actually matters.
  • The documentation markdown thing is useful to understand the feature and its semantics, but I think it is not so useful to actually use it. IMO the intended usage is through containerd using the Sandbox API, so its benefits should be reflected automatically down the line by higher-level container tooling that uses containerd. If that is the case, then we actually don't need to document it, because it becomes just a performance/architectural enhancement implementation detail, not an interface that's worth documenting to users. If you agree, then I think such documentation belongs more either in the commit message or as a markdown file or a long comment inside the code somewhere, not as a standalone user-facing website page.

@milantracy

Copy link
Copy Markdown
Member Author

thanks @EtiennePerot , just to clarify checkpoint/restore before i address other comments

This feature not supporting checkpoint/restore is a big drawback and I'm not sure it's going to be that useful without it, especially for things like Substrate or more generally for high-churn container orchestrating systems, because checkpoint/restore is where they get more savings than they do from fast container startup/teardown. If it's possible to support it down the line, then having it be unsupported at first is OK, but if not, in what environment do you see this functionality being used?

it will be supported in a follow up PR. ~200 loc

@milantracy

Copy link
Copy Markdown
Member Author
  • The name "sandbox-only" is a bit of a misnomer, especially given that the runsc boot process is long-lived and the "sandbox only" flag persists on the process argv even when there are containers running inside. It's also not obvious that "sandbox only" implies "as opposed to sandbox and containers". Better names might be something more like "reusable sandbox shell", or "recycleable kernel".

rename it to --no-root-container

  • I worry that the lack of PID 1 might cause application incompatibility. PID 1 is a constant in Linux. I wonder if we should force such sandboxes to always have each container run in their own PID namespaces, so that they are their own PID 1. WDYT?

The sandbox owns one root PID namespace, the namespace is created when the sentry starts. Each container started in the sandbox either gets a PID namespace of its own or joins a existing PID namespace (e.g. root pid namespace), it is decided by spec not runsc.

A container gets a PID namespace of its own whenever its spec asks for one, its init process get PID 1 in that namespace, TestNoRootContainerPIDNS at multi_container_test.go covers it. So for the default spec there's no change.

A container's processes live in the sandbox's root PID namespace only if its spec omits the PID namespace or explicitly names it. This PR doesn't change that selection. Such a container never had PID 1 anyway — in a sandbox booted with a root container (e.g. pause container for CRI), PID 1 there is the root container's init process — so its init process is PID 2 or later either way.

Forcing every container into a PID namespace of its own would fix nothing in the default case, and would remove the ability to share a PID namespace across containers in a sandbox. runsc would be overriding what the container's spec asked for.

  • The PR has a lot of Claude-speak, comments that are overly verbose, repetitive across files, and focusing too much about the current delta being made in the moment rather than on their long-term usefulness for maintainers and future LLMs to understand. Please write the comments in a way that makes the code understandable long-term instead. Personally, I've found that removing and then rewriting all code comments for LLM-generated PRs is a good forcing function to review and understand the code, and that the comments left in the code from that process are better-targeted to the subset that actually matters.

Done

  • The documentation markdown thing is useful to understand the feature and its semantics, but I think it is not so useful to actually use it. IMO the intended usage is through containerd using the Sandbox API, so its benefits should be reflected automatically down the line by higher-level container tooling that uses containerd. If that is the case, then we actually don't need to document it, because it becomes just a performance/architectural enhancement implementation detail, not an interface that's worth documenting to users. If you agree, then I think such documentation belongs more either in the commit message or as a markdown file or a long comment inside the code somewhere, not as a standalone user-facing website page.

move it to a standalone markdown at runsc/boot

@milantracy milantracy changed the title runsc: add a sandbox-only boot mode runsc: add a no-root-container boot mode Aug 10, 2026

@EtiennePerot EtiennePerot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I ask once again to please write comments as a human :)
The comments here are difficult to make sense of.

Didn't look at the tests yet, just comments on non-test code.

Comment thread runsc/cmd/exec.go Resolved
Comment thread pkg/sentry/kernel/kernel.go Resolved
Comment thread pkg/sentry/kernel/kernel.go Resolved
Comment thread pkg/sentry/kernel/kernel.go Resolved
Comment thread pkg/sentry/kernel/signal.go Resolved
Comment thread runsc/sandbox/sandbox.go Resolved
Comment thread runsc/cmd/run.go Resolved
Comment thread runsc/boot/loader.go Resolved
Comment thread runsc/boot/loader.go Resolved
Comment thread runsc/boot/loader.go Resolved
EtiennePerot added a commit to EtiennePerot/gvisor that referenced this pull request Sep 1, 2026
Previously, the ring was held by the gofer, which works well for the
case where the gofer is 1-to-1 with the Sentry. This isn't true for
multi-container sandboxes (where the current approach means we wait
500ms for each container doing nothing on exit), and it's also not
going to work well with the no-root-container mode introduced by
PR gvisor#13981.

This instead moves the job of holding the ring to a separate tiny C
sidecar binary (`runsc-fd-parking`, named such to make its purpose
obvious in the process table). Because this sidecar binary's job is
very unimportant during startup, it defers as much of its work as
possible, and because it must run for the whole lifetime of the
sandbox, it minimizes its own memory footprint as aggressively as
possible.

Benchmarks show no measurable startup or teardown latency regression,
and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).
@milantracy
milantracy force-pushed the sandbox-only branch 3 times, most recently from b466745 to 2e06810 Compare September 4, 2026 20:06
copybara-service Bot pushed a commit that referenced this pull request Sep 12, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 12, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 12, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 12, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 13, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 13, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 13, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 13, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 976115235
copybara-service Bot pushed a commit that referenced this pull request Sep 13, 2026
Previously, the ring was held by the gofer, which works well for the case where the gofer is 1-to-1 with the Sentry. This isn't true for multi-container sandboxes (where the current approach means we wait 500ms for each container doing nothing on exit), and it's also not going to work well with the no-root-container mode introduced in PR #13981.

This instead moves the job of holding the ring to a separate tiny C sidecar binary (`runsc-fd-parking`, named such to make its purpose obvious in the process table). Because this sidecar binary's job is very unimportant during startup, it defers as much of its work as possible, and because it must run for the whole lifetime of the sandbox, it minimizes its own memory footprint as aggressively as possible.

Benchmarks show no measurable startup or teardown latency regression, and a +52KiB memory cost per sandbox (i.e. ~5.2 MiB per 100 sandboxes).

COPYBARA_INTEGRATE_REVIEW=#14546 from EtiennePerot:pinring-sidecar e3ffc8d
PiperOrigin-RevId: 980553731
Comment thread pkg/sentry/kernel/kernel.go Outdated
// task, or nil if there is no global init or it has already exited.
//
// Does not take k.extMu; CreateProcess calls this while holding it.
func (k *Kernel) globalInitMountNamespace() *vfs.MountNamespace {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: s/globalInitMountNamespace/globalInitMountNamespaceLocked

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only CreateProcess holds k.extMu when it calls this function. The two supervisorContext.Value callers do not hold it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's standard practice in gVisor to suffix the function that requires the mutex to be locked with Locked. The upper-lower case difference is hard to spot and easy to mix. Locked also allows for both functions to be package public/private.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see the change. Please update your changes.

@milantracy milantracy Oct 5, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

sorry, I forgot to push the new comit

Comment thread pkg/sentry/kernel/signal.go Resolved
Comment thread runsc/boot/limits.go Resolved
Comment thread runsc/boot/loader.go Resolved
Comment thread runsc/boot/loader.go Resolved
Comment thread runsc/cmd/delete.go Resolved
Comment thread runsc/cmd/delete.go Resolved
Comment thread runsc/container/container.go Resolved
@milantracy
milantracy requested a review from fvoznika September 24, 2026 08:22
ILLUM1N0X pushed a commit to ILLUM1N0X/substrate that referenced this pull request Oct 5, 2026
ateom-microvm runs no pause container, but SandboxConfig required a
pauseImage for every class, so atelet pulled the image and built a pause
bundle for each micro-VM actor that nothing used.

pauseImage is now required for gvisor and rejected for microvm. atelet
only checks for it on gVisor and skips the pause bundle when there is no
pause image.

gvisor/gvisor#13981 will enable this for gvisor
O(soon) and then we can clean this up entirely.

This is a less contentious offshoot of the sandboxConfig discussion.
Comment thread runsc/cmd/delete.go Resolved
Add `runsc create/run/boot --no-root-container`, 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 no-root-container 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
  --no-root-container flag, a nil guard, and skipping the sandbox in the
  restorer's per-container loop; deferred rather than shipped untested.
@milantracy milantracy added the ready to pull Causes the PR to be imported into Google. Will be removed soon. label Oct 7, 2026
copybara-service Bot pushed a commit that referenced this pull request Oct 7, 2026
Add `runsc create/run/boot --no-root-container`, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

- Checkpoint/restore is refused for a no-root-container 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
  --no-root-container 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 31cb23e
PiperOrigin-RevId: 994826110
copybara-service Bot pushed a commit that referenced this pull request Oct 7, 2026
Add `runsc create/run/boot --no-root-container`, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

- Checkpoint/restore is refused for a no-root-container 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
  --no-root-container 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 31cb23e
PiperOrigin-RevId: 994826110
copybara-service Bot pushed a commit that referenced this pull request Oct 8, 2026
Add `runsc create/run/boot --no-root-container`, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

- Checkpoint/restore is refused for a no-root-container 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
  --no-root-container 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 31cb23e
PiperOrigin-RevId: 994826110
copybara-service Bot pushed a commit that referenced this pull request Oct 8, 2026
Add `runsc create/run/boot --no-root-container`, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

- Checkpoint/restore is refused for a no-root-container 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
  --no-root-container 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 31cb23e
PiperOrigin-RevId: 994826110
copybara-service Bot pushed a commit that referenced this pull request Oct 8, 2026
Add `runsc create/run/boot --no-root-container`, 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.

runsc/boot/no_root_container.md walks through booting one from the
command line and says what a pod without a pause container does not have.

Limitations:

- Checkpoint/restore is refused for a no-root-container 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
  --no-root-container 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 31cb23e
PiperOrigin-RevId: 994826110
@copybara-service copybara-service Bot closed this pull request by merging all changes into gvisor:master in 847fc88 Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to pull Causes the PR to be imported into Google. Will be removed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants