Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fe6eb60
vminit: remove guest bundle directory on container delete
dmcgowan Jul 12, 2026
7e7acf3
sandbox: implement VM-per-pod SandboxService and shared rootfs assembly
dmcgowan Jul 12, 2026
5cbd0c4
sandbox: give member containers a shared guest network namespace
dmcgowan Jul 12, 2026
2077417
sandbox: support bind-mount volumes and pod-level DNS/hostname/sysctls
dmcgowan Jul 12, 2026
dd7a37c
sandbox: share PID and IPC namespaces between member containers
dmcgowan Jul 12, 2026
3fb7d47
test: add critest (CRI conformance) harness using the shim sandboxer
dmcgowan Jul 12, 2026
27ca3c3
test/critest: skip known architectural-limitation specs by default
dmcgowan Jul 12, 2026
5b4764e
docs: keep sandbox-architecture.md focused on current design
dmcgowan Jul 12, 2026
ff4dc43
vm/libkrun: enter the pod network namespace on the krun_start_enter t…
dmcgowan Jul 13, 2026
ca95d06
shim: clear host AppArmor profile from container specs
dmcgowan Jul 15, 2026
1d9f508
vendor: add needed cri api dependency
dmcgowan Jul 17, 2026
9150ac2
vendor: fix shimtest dependency to include sandbox test suite
dmcgowan Jul 17, 2026
1ebed03
shim: fix cross-platform build breakage and file-header lint failures
dmcgowan Jul 17, 2026
115d7f2
shim: verify network sandbox path is backed by nsfs before pinning it
dmcgowan Jul 17, 2026
9b87e04
shim: prevent UDS mount placeholders from escaping the container rootfs
dmcgowan Jul 17, 2026
dd68c0d
vminit: fix pod-pause anchor leak; reduce forwarded-socket permissions
dmcgowan Jul 17, 2026
832677e
plugins/shim/task: split task plugin registration into manager + TTRP…
dmcgowan Jul 17, 2026
6821de5
sandbox: cleanup plugin and ensure options and netns are exposed
dmcgowan Jul 17, 2026
88f98df
shim: map container UID 0 (not the host UID) in the shim's own userns
dmcgowan Jul 18, 2026
52db199
shim/sandbox: use path.Join for in-guest paths, not filepath.Join
dmcgowan Jul 18, 2026
183eee9
mountutil: register the partial-mount cleanup defer before the loop
dmcgowan Jul 18, 2026
bc74c3d
shim/task: use an explicit access mode when creating UDS placeholder …
dmcgowan Jul 18, 2026
9704f60
shim: create UDS mount placeholders for the assembled rootfs, not jus…
dmcgowan Jul 20, 2026
14933d4
Split task service to manager and ttrpc service
dmcgowan Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ RUN --mount=type=cache,sharing=locked,id=erofs-aptlib,target=/var/lib/apt \
# making it writable even though the erofs image itself is read-only.
# /var/run is a symlink to /run so that crun state writes land on the
# writable /run tmpfs rather than failing against the read-only rootfs.
# Note: /run/containers (the sandbox shared filesystem mount point) is
# created at runtime under the /run tmpfs, so it does not need to be
# pre-created here.
RUN mkdir -p dev etc proc run sbin sys tmp var && ln -s /run var/run

COPY --from=vminit-build /build/vminitd ./sbin/vminitd
Expand Down
240 changes: 240 additions & 0 deletions api/next.txtpb
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,246 @@ file: {
is_syntax_unspecified: false
}
}
file: {
name: "proto/nerdbox/services/podns/v1/podns.proto"
package: "containerd.vminitd.services.podns.v1"
message_type: {
name: "EnsureNamespacesRequest"
}
message_type: {
name: "EnsureNamespacesResponse"
field: {
name: "ipc_namespace_path"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "ipcNamespacePath"
}
field: {
name: "pid_namespace_path"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "pidNamespacePath"
}
}
service: {
name: "PodNamespaces"
method: {
name: "EnsureNamespaces"
input_type: ".containerd.vminitd.services.podns.v1.EnsureNamespacesRequest"
output_type: ".containerd.vminitd.services.podns.v1.EnsureNamespacesResponse"
}
}
options: {
go_package: "github.com/containerd/nerdbox/api/services/podns/v1;podns"
}
source_code_info: {
location: {
span: 16
span: 0
span: 49
span: 1
}
location: {
path: 12
span: 16
span: 0
span: 18
leading_detached_comments: "\nCopyright The containerd Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
}
location: {
path: 2
span: 18
span: 0
span: 45
}
location: {
path: 8
span: 20
span: 0
span: 80
}
location: {
path: 8
path: 11
span: 20
span: 0
span: 80
}
location: {
path: 6
path: 0
span: 38
span: 0
span: 40
span: 1
leading_comments: " PodNamespaces manages the guest-side namespaces that member containers\n of one sandbox share by default: the IPC and PID namespaces (network\n sharing is handled separately by internal/podnetns, created\n unconditionally at vminitd startup since it needs no anchor process;\n hostname sharing needs no namespace at all — see addHostname in\n internal/shim/task/podconfig.go, which sets the same spec.Hostname on\n every member container's own, independent UTS namespace, which is\n enough to give them all the same observable hostname).\n\n Unlike the network namespace, the shared PID namespace requires a real,\n persistent anchor process to exist as its PID 1 (a Linux PID namespace\n has no content, and is torn down, once its PID 1 exits) — so, unlike\n internal/podnetns, this is not something to create unconditionally at\n vminitd startup for every VM regardless of whether it is ever needed.\n EnsureNamespaces is called once per sandbox, on demand, the first time\n the host needs shared namespaces for it.\n"
}
location: {
path: 6
path: 0
path: 1
span: 38
span: 8
span: 21
}
location: {
path: 6
path: 0
path: 2
path: 0
span: 39
span: 4
span: 85
}
location: {
path: 6
path: 0
path: 2
path: 0
path: 1
span: 39
span: 8
span: 24
}
location: {
path: 6
path: 0
path: 2
path: 0
path: 2
span: 39
span: 25
span: 48
}
location: {
path: 6
path: 0
path: 2
path: 0
path: 3
span: 39
span: 59
span: 83
}
location: {
path: 4
path: 0
span: 42
span: 0
span: 34
}
location: {
path: 4
path: 0
path: 1
span: 42
span: 8
span: 31
}
location: {
path: 4
path: 1
span: 44
span: 0
span: 49
span: 1
}
location: {
path: 4
path: 1
path: 1
span: 44
span: 8
span: 32
}
location: {
path: 4
path: 1
path: 2
path: 0
path: 5
span: 47
span: 4
span: 10
}
location: {
path: 4
path: 1
path: 2
path: 0
span: 47
span: 4
span: 34
leading_comments: " Guest paths (bind-mounted namespace files, suitable for an OCI\n LinuxNamespace.Path) for the shared IPC and PID namespaces.\n"
}
location: {
path: 4
path: 1
path: 2
path: 0
path: 1
span: 47
span: 11
span: 29
}
location: {
path: 4
path: 1
path: 2
path: 0
path: 3
span: 47
span: 32
span: 33
}
location: {
path: 4
path: 1
path: 2
path: 1
path: 5
span: 48
span: 4
span: 10
}
location: {
path: 4
path: 1
path: 2
path: 1
span: 48
span: 4
span: 34
}
location: {
path: 4
path: 1
path: 2
path: 1
path: 1
span: 48
span: 11
span: 29
}
location: {
path: 4
path: 1
path: 2
path: 1
path: 3
span: 48
span: 32
span: 33
}
}
syntax: "proto3"
buf_extension: {
is_import: false
is_syntax_unspecified: false
}
}
file: {
name: "proto/nerdbox/services/socketforward/v1/socketforward.proto"
package: "nerdbox.services.socketforward.v1"
Expand Down
50 changes: 50 additions & 0 deletions api/proto/nerdbox/services/podns/v1/podns.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Copyright The containerd Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

syntax = "proto3";

package containerd.vminitd.services.podns.v1;

option go_package = "github.com/containerd/nerdbox/api/services/podns/v1;podns";

// PodNamespaces manages the guest-side namespaces that member containers
// of one sandbox share by default: the IPC and PID namespaces (network
// sharing is handled separately by internal/podnetns, created
// unconditionally at vminitd startup since it needs no anchor process;
// hostname sharing needs no namespace at all — see addHostname in
// internal/shim/task/podconfig.go, which sets the same spec.Hostname on
// every member container's own, independent UTS namespace, which is
// enough to give them all the same observable hostname).
//
// Unlike the network namespace, the shared PID namespace requires a real,
// persistent anchor process to exist as its PID 1 (a Linux PID namespace
// has no content, and is torn down, once its PID 1 exits) — so, unlike
// internal/podnetns, this is not something to create unconditionally at
// vminitd startup for every VM regardless of whether it is ever needed.
// EnsureNamespaces is called once per sandbox, on demand, the first time
// the host needs shared namespaces for it.
service PodNamespaces {
rpc EnsureNamespaces(EnsureNamespacesRequest) returns (EnsureNamespacesResponse);
}

message EnsureNamespacesRequest {}

message EnsureNamespacesResponse {
// Guest paths (bind-mounted namespace files, suitable for an OCI
// LinuxNamespace.Path) for the shared IPC and PID namespaces.
string ipc_namespace_path = 1;
string pid_namespace_path = 2;
}
Loading
Loading