Repository navigation
feat(compose): sync layers and resume an interrupted install - #151
Merged
Merged
Conversation
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 10:06
163ca53 to
e49676b
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 10:33
78125b5 to
4d1c0bf
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 10:33
e49676b to
30570c8
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 10:40
4d1c0bf to
374f898
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 10:40
30570c8 to
01825b5
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 11:08
374f898 to
a6c83c0
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 11:08
01825b5 to
7a60d62
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 11:09
a6c83c0 to
4a39f45
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 11:09
7a60d62 to
4be4d4a
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 12:02
4a39f45 to
276ace3
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 12:08
4be4d4a to
3748977
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 12:08
276ace3 to
7a93f6d
Compare
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 12:33
3748977 to
7234879
Compare
mike-sul
force-pushed
the
feat/containerd-install-progress
branch
from
October 22, 2026 12:33
7a93f6d to
4c598b8
Compare
An overlayfs snapshot commit is not durable: containerd syncs its metadata but not the snapshot's files, so a power cut during the unpack left committed snapshots without their directory. The install could not tell an intact snapshot from a torn one, so it deleted every leftover lease and extracted the whole app again. The unpack now applies every layer with the differ's sync_fs option: the snapshot's filesystem is synced before the snapshot is committed, so a committed snapshot is on disk. The install lease carries the label composectl/install.synced when the containerd reports 1.7.14 or later, the first version whose differ honours the option. The next install of the same app keeps such a lease, removes the snapshot the cut extraction left active, so that its space is free again, and goes on under the lease: the scan skips the layers whose snapshots exist. Every other install lease, including an unlabelled one of the same app, is deleted as before. The records are still created only after the final syncfs. The unpack watcher's poll interval is a variable so that the rig test can cut the extraction of a small layer. Assisted-by: Claude Code:claude-fable-5-1 Signed-off-by: Mike Sul <mike.sul@foundries.io>
The note said that every leftover install lease is deleted and no snapshot of an interrupted install is reused, which is necessary only while overlayfs snapshot commits are not durable. Record the sync_fs apply option with its containerd floor and the resume of the same app's labelled lease. Assisted-by: Claude Code:claude-fable-5-1 Signed-off-by: Mike Sul <mike.sul@foundries.io>
mike-sul
force-pushed
the
feat/containerd-install-resume
branch
from
October 22, 2026 12:56
7234879 to
d9900c9
Compare
mike-sul
marked this pull request as ready for review
October 22, 2026 12:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An overlayfs snapshot commit is not durable: containerd syncs its metadata but not the snapshot's files, so a power cut during the unpack left committed snapshots without their directory. The install could not tell an intact snapshot from a torn one, so it deleted every leftover lease and extracted the whole app again.
Every layer is now applied with the differ's
sync_fsoption, so a committed snapshot is on disk, and the install lease is labelled as synced when containerd is 1.7.14 or newer, the first version whose differ honours the option. The next install of the same app keeps such a lease, removes the snapshot the cut left active and continues from the first missing layer. Every other leftover lease is deleted as before.Based on #150. Test:
TestCtrdInstallResumesAfterInterruptionin the e2e suite withCONTAINERD_SNAPSHOTTER=true.