Commit 93bc484
committed
feat(rootfs): add rootfs provider boundary with containerd-backed provider
Adds openshell-rootfs, the rootfs provider boundary for compute
drivers: a provider resolves an OCI image reference into
provider-neutral PreparedRootfs mounts keyed by a per-sandbox key, and
owns image resolution, acquisition, unpacking, and the lifetime of the
backend resources realizing the root filesystem.
ContainerdRootfsProvider is the first implementation, backed by a
system-provided containerd used only for image pull/unpack and
snapshot management via its Transfer/Images/Content/Snapshots/Leases
services. containerd concepts (snapshots, chain IDs, leases) are fully
encapsulated: prepare() pulls, resolves the OCI chain ID, prepares a
per-sandbox writable snapshot protected from containerd's GC by a
lease, and cleans up after itself on failure; release() removes the
snapshot and lease at teardown.
Keeping the containerd daemon behind this boundary (rather than in a
compute driver's own contract) leaves room to swap in a daemonless
provider, or converge the VM driver's image acquisition pipeline onto
the same types, without redesigning the sandbox provisioner on top.
Related: #2255
Signed-off-by: Eric Curtin <eric.curtin@docker.com>1 parent 8262e7b commit 93bc484
6 files changed
Lines changed: 751 additions & 0 deletions
File tree
- architecture
- crates/openshell-rootfs
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments