Skip to content

feat(compose): hardlink store blobs into containerd - #148

Merged
mike-sul merged 2 commits into
mainfrom
feat/containerd-install-linkin
Oct 22, 2026
Merged

mike-sul merged 2 commits into
mainfrom
feat/containerd-install-linkin

Conversation

@mike-sul

@mike-sul mike-sul commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

The containerd install copied every compressed layer from composectl's store into containerd's content store before unpacking it: a transient second copy that doubled the bytes written per install and made its peak space the compressed size of the app.

The layer is now verified against its digest and hardlinked to the path the content store keeps it at; with containerd's default shared content policy the registration that follows moves no bytes. The store and the content store must therefore be on one filesystem: a link across filesystems fails the install naming both paths. The test environment moves its store onto the test dockerd's data volume for that.

Based on #147. Test: TestCtrdInstallLinksLayers, TestCtrdInstallFailsAcrossFilesystems and TestCtrdLinkedBlobAndGC in the e2e suite with CONTAINERD_SNAPSHOTTER=true. Design note: docs/containerd-install-linkin-progress-plan-2026-10-19.md.

@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch 2 times, most recently from 97821e9 to 0a4ae6e Compare October 21, 2026 14:47
@mike-sul mike-sul changed the title Feat/containerd install linkin feat(compose): hardlink store blobs into containerd Oct 21, 2026
@mike-sul
mike-sul changed the base branch from main to feat/containerd-install October 21, 2026 14:47
@mike-sul
mike-sul force-pushed the feat/containerd-install branch from 954e58a to 7dbb13b Compare October 22, 2026 10:06
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch 2 times, most recently from 53034df to f2f8ccf Compare October 22, 2026 10:33
@mike-sul
mike-sul force-pushed the feat/containerd-install branch from 7dbb13b to 2cc3bb7 Compare October 22, 2026 10:33
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from f2f8ccf to e5d5677 Compare October 22, 2026 10:40
Base automatically changed from feat/containerd-install to main October 22, 2026 10:55
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from e5d5677 to 04de0df Compare October 22, 2026 10:56
The containerd install copied every compressed layer from the store
into containerd's content store before unpacking it, a transient
second copy that doubled the bytes written by an install.

The note says how a layer is checked, hardlinked and registered with
no bytes copied, and that the store and the content store must be on
one filesystem.

Assisted-by: Claude Code:claude-fable-5-1
Signed-off-by: Mike Sul <mike.sul@foundries.io>
The containerd install copied every compressed layer from the store
into containerd's content store before unpacking it: a transient
second copy that doubled the bytes written by an install and made its
peak space the compressed size of the app.

The layer's store blob is now checked for presence and size and
hardlinked to the path the content store keeps it at. With the default
"shared" content policy containerd registers a file already at that
path without copying or hashing it, so the existing WriteBlob moves no
bytes; the blob was verified at pull and the unpack checks every
extracted layer against the image's diff IDs. The store and the
content store must be on one filesystem: a link that cannot be made
fails the install, naming both. The test environment moves its store
onto the test dockerd's data volume for that.

Assisted-by: Claude Code:claude-fable-5-1
Signed-off-by: Mike Sul <mike.sul@foundries.io>
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from 04de0df to d287b1d Compare October 22, 2026 11:09
@mike-sul
mike-sul marked this pull request as ready for review October 22, 2026 11:22
@mike-sul
mike-sul merged commit 08d19e6 into main Oct 22, 2026
7 checks passed
@mike-sul
mike-sul deleted the feat/containerd-install-linkin branch October 22, 2026 11:38
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