Skip to content

feat(compose): size storage per filesystem in check and init - #149

Closed
mike-sul wants to merge 1 commit into
mainfrom
feat/containerd-install-storage
Closed

mike-sul wants to merge 1 commit into
mainfrom
feat/containerd-install-storage

Conversation

@mike-sul

Copy link
Copy Markdown
Collaborator

check compared the size of the missing blobs with the free space of the store root only. With the install into containerd the bytes land on up to four paths, the store, the compose root, the content store and the snapshotter root, which may be separate filesystems.

The sizing now computes the four terms, adds up the ones that share a filesystem and checks each against its own free space. check --format json reports them in a new storage array for aktualizr-lite, and update init keeps the per-filesystem needs in the update record; the numbers are reported only, init still does not reject on size. An image whose manifest or config cannot be read is sized from the app tree so the estimate never drops below the exact one. On a docker load daemon the single term at the store root stays as before.

Based on #148. Test: pkg/compose/storage_test.go, and TestCtrdStorageCheck* in the e2e suite with CONTAINERD_SNAPSHOTTER=true.

@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from 0a4ae6e to 53034df Compare October 22, 2026 10:06
@mike-sul
mike-sul force-pushed the feat/containerd-install-storage branch from 28a8006 to 30173f5 Compare October 22, 2026 10:06
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from 53034df to f2f8ccf Compare October 22, 2026 10:33
@mike-sul
mike-sul force-pushed the feat/containerd-install-storage branch from 30173f5 to e37fba0 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
@mike-sul
mike-sul force-pushed the feat/containerd-install-storage branch from e37fba0 to 00a2fbd Compare October 22, 2026 10:40
@mike-sul
mike-sul force-pushed the feat/containerd-install-linkin branch from e5d5677 to 04de0df Compare October 22, 2026 10:56
@mike-sul
mike-sul force-pushed the feat/containerd-install-storage branch from 00a2fbd to 13db147 Compare October 22, 2026 11:08
@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 force-pushed the feat/containerd-install-storage branch from 13db147 to 5f36031 Compare October 22, 2026 11:09
Base automatically changed from feat/containerd-install-linkin to main October 22, 2026 11:38
`check` compared the store and runtime sizes of the missing blobs with
the free space of the store root only. With the install into containerd
the bytes land on up to four paths: the store, the compose root, the
content store (the compressed layers streamed during the install) and
the snapshotter root (the unpacked snapshots), which may be on separate
filesystems. The new sizing in pkg/compose computes the four terms, adds
up the ones that share an st_dev and checks each filesystem against its
own free space; `check --format json` reports them in a new `storage`
array next to the unchanged fields, so aktualizr-lite can read it. On a
`docker load` daemon the single term at the store root stays as before.

An image whose manifest or config cannot be read (an interrupted fetch,
checked locally) is sized from the layers in the app tree: every layer
is counted as streamed and, since its chain ID is unknown, as a new
snapshot, so the estimate never drops below the exact one. `check`
keeps reporting the missing blob instead of failing.

`update init` used the same calculation separately and added the store
size to the runtime total; it now uses the shared sizing, counts only
the bytes a partly fetched blob still needs in the store, and keeps the
per-filesystem needs in the update record. The numbers are reported
only: init still does not reject an update on size.

The integration tests of the containerd install now cover the
`storage` array of `check`, including an app whose image config is
missing from the store. The design note gains the storage check:
what is sized where, the merge per filesystem and the `storage` array.

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-storage branch from 5f36031 to 3085c7f Compare October 22, 2026 11:40
@mike-sul

Copy link
Copy Markdown
Collaborator Author

Closing: with the layers hardlinked (#148) and the store and containerd on one filesystem on devices, the existing single size check covers the install. Branch kept for reference.

@mike-sul mike-sul closed this Oct 22, 2026
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