Skip to content

shim: treat non-CRI init as sandbox#13278

Open
Haihan-Jiang wants to merge 1 commit into
google:masterfrom
Haihan-Jiang:codex/gvisor-containerd-noncri-sandbox
Open

shim: treat non-CRI init as sandbox#13278
Haihan-Jiang wants to merge 1 commit into
google:masterfrom
Haihan-Jiang:codex/gvisor-containerd-noncri-sandbox

Conversation

@Haihan-Jiang
Copy link
Copy Markdown

Updates #12198.

Summary

  • treat containerd shim create requests without CRI container-type annotations as sandbox/root containers
  • keep annotated CRI workload containers classified as non-sandbox containers
  • add regression coverage for non-CRI, CRI sandbox, and CRI container specs

Why

Direct containerd callers such as ctr run and BuildKit do not set io.kubernetes.cri.container-type. The shim already treats missing annotations as sandbox-like in other setup paths, but newInit only set p.Sandbox for an explicit CRI sandbox annotation. That caused non-CRI root containers to skip sandbox IO setup and contributed to non-TTY hangs/no output.

Tests

  • git diff --check
  • bazel test //pkg/shim/v1/runsc:runsc_test --test_filter=TestNewInitSandboxDefault (fails locally before running tests: /usr/bin/x86_64-linux-gnu-gcc is not present for //vdso:vdso on this macOS host)
  • go test ./pkg/shim/v1/runsc -run TestNewInitSandboxDefault (fails locally before compiling tests because this repo relies on Bazel-generated packages/build constraints under plain Go tooling)

@Haihan-Jiang Haihan-Jiang marked this pull request as ready for review May 24, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant