Files
containerd/integration
Fabiano Fidêncio a5f83d8c2b cri: unpack images with per-layer labels for runtime-specific snapshotters
Remote/proxy snapshotters like nydus need per-layer annotations on each
snapshot (cri.image-ref, cri.layer-digest, cri.manifest-digest,
cri.image-layers) so they can lazily fetch content inside the guest VM.
During a normal PullImage, these annotations are set by
AppendInfoHandlerWrapper and flow through the core/unpack.Unpacker to
each layer's Prepare/Commit call.

However, when an image is already present for one snapshotter (e.g.,
overlayfs) and needs to be used with a different one (e.g., nydus for
Kata), no pull occurs.  The image must be unpacked into the target
snapshotter with the correct per-layer labels.

Replace the image.Unpack() fallback in customopts.WithNewSnapshot with
unpackImage, which leverages the existing core/unpack.Unpacker and wraps
the image handler with AppendInfoHandlerWrapper when snapshot annotations
are enabled (!DisableSnapshotAnnotations).  This reuses the same unpack
machinery as PullImage, including retry handling, parallel layer
support, and deduplication.

Note: this is a manual backport of PR #12835 (targeting main).  On
release/2.2, DisableSnapshotAnnotations lives on ImageConfig which is
not embedded in criconfig.Config, so we expose it via a new
DisableSnapshotAnnotations() method on the ImageService interface
instead of accessing the config field directly.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-24 23:44:24 +01:00
..
2025-10-24 17:54:26 +00:00
2024-06-20 23:12:31 +00:00
2023-11-01 10:37:00 -07:00
2023-11-01 15:32:43 -07:00