Repository navigation
Description
Description
An OCI index can hold more than one manifest that resolves to the same config digest. A config records each layer's uncompressed digest (diffID), so packaging the same layers with different compression produces manifests that list different layer blobs but share a byte-identical config. podman manifest push --add-compression gzip,zstd produces this shape.
The unpacker holds each manifest's layers in a map keyed by the config's digest and schedules them when that config is visited. The map holds one set of layers per key, so when a second manifest resolves to a config already in the map, it overwrites the first manifest's entry. Only the surviving set is ever fetched.
The pull reports success, because nothing in the pull path checks that every manifest it walked left its blobs behind. The missing blobs surface later, when ctr images export or a push of the same image fails.
Which manifest loses varies between runs on the same image.
Steps to reproduce the issue
- Push to a registry an index with two manifests of the same platform that reference one config digest and list different layer blobs. Compressing one tar as gzip and again as zstd produces this, since the config records uncompressed digests and compression does not change them.
ctr images pull --plain-http <ref>. It reports success.ctr content ls -q. Only one of the two layer blobs is present.ctr images export /tmp/out.tar <ref>. It fails on the missing blob.
Describe the results you received and expected
Received: the pull reports success, one of the two layer blobs is absent from the content store, and the export fails with
ctr: failed to get reader: content digest sha256:<layer>: not found
Over five runs on a freshly wiped content store, every run lost a layer and every export failed. The manifest that lost varied between runs.
Expected: every manifest the pull walked has its layers in the content store, so export and push succeed.
What version of containerd are you using?
containerd github.com/containerd/containerd/v2 v2.3.0-384-g54a25ed63 54a25ed
Any other relevant information
PR #13966 has a fix. The same five runs against a build carrying it kept both layer blobs and exported cleanly every time.
Show configuration if it is related to CRI plugin.
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity