host-ctr: protect cached snapshots during image unpack - #1063
Open
AnthonyDiSanti wants to merge 2 commits into
Open
AnthonyDiSanti wants to merge 2 commits into
AnthonyDiSanti wants to merge 2 commits into
Conversation
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.
Closes #1059
Description of Changes
Runs unpacking inside
Client.PullusingWithPullUnpackand the existing default snapshotter. The separateImage.Unpackcached-layer path can return success after garbage collection has removed a parent snapshot, leaving the image unusable whenhost-ctrcreates a container. The integrated unpacker protects cached snapshots during this boundary.Preserves the resolver, schema conversion, labels and retry loop - unpack failures now participate in the same bounded retry. Adds an opt-in integration test calling the real
pullImageagainst disposable containerd. It forces synchronous GC at the cached-layer boundary and again after Pull returns, then creates a child snapshot. The test needs no external registry, credentials or image execution and includes a companion note documenting how to run it.Testing
gofmtandgo test ./...insources/host-ctr, Go 1.26.1.parent snapshot ... does not exist; patched source passes.By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.