You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nerdctl image save fails when discard_unpacked_layers=true is enabled #2588
When GC layers optimization is enabled (discard_unpacked_layers=true) some/all layers may be missing from containerd content storage.
Thus nerdctl image save fails to export image. Can CLI be fixed to export image content? Practically the content is present on the disk
Enable discard_unpacked_layers=true in /etc/containerd/config.toml
Alternatively you may create e.g. GKE 1.27
list images using sudo nerdctl -n k8s.io images, choose some image. Instead run pod with some image e.g. alpine:latest sudo nerdctl -n k8s.io image save <image_ref> > /dev/null e.g. sudo nerdctl -n k8s.io image save docker.io/library/alpine:latest > /dev/null
Describe the results you received and expected
You will get error:
FATA[0000] failed to get reader: content digest sha256:89d9c30c1d48bac627e5c6cb0d1ed1eec28e7dbdfbcc04712e4c79c0f83faf17: not found
Thanks for the update @apostasie! So, image save should work now even when discard_unpacked_layers=true?
We have implemented some workaround based on snapshots. I don't think I will get to test the latest main nerdctl soon. If you prefer - the issue can be closed.
Thanks for the update @apostasie! So, image save should work now even when discard_unpacked_layers=true?
We need confirmation for that specific case, though we did fix a slew of image save issues with missing unpacked layers.
We have implemented some workaround based on snapshots. I don't think I will get to test the latest main nerdctl soon. If you prefer - the issue can be closed.
Ok, I will give it a spin on a kind cluster and let you know.
Alternatively, we can just keep this around until the next patch release so that you can confirm in your specific environment?
Since I'm working on a different project, I'm not sure I could spend some
time confirming this case when the next patch release is out. I'm ok with
whatever fits you regarding this issue status
Activity
dineshp-09 commentedon Nov 7, 2023
Any updates on this? The issue is reproducible on GKE version 1.27 and above and EKS version 1.26 and above.
2rigor commentedon Nov 7, 2023
In fact, @dineshp-09, based on the below it should probably hannep on any support EKS with recent AMIs (since Jul-28 this year): https://github.com/awslabs/amazon-eks-ami/blob/5b54e37cde1e8a4c67a3ddaff27c953fc7b7b37f/CHANGELOG.md?plain=1#L270
apostasie commentedon Apr 18, 2025
@2rigor we (recently) merged a slew of fixes related to the specific problem of missing layers, including for
save, especially for Kube.If this is still a concern for you, would you be able to give it a spin with the latest
mainnerdctl? (or at least the latest v2.0.x released version)Alternatively, I believe we should close this as fixed.
cc @AkihiroSuda
2rigor commentedon Apr 27, 2025
Thanks for the update @apostasie! So, image save should work now even when
discard_unpacked_layers=true?We have implemented some workaround based on snapshots. I don't think I will get to test the latest
mainnerdctl soon. If you prefer - the issue can be closed.apostasie commentedon Apr 27, 2025
We need confirmation for that specific case, though we did fix a slew of image save issues with missing unpacked layers.
Ok, I will give it a spin on a kind cluster and let you know.
Alternatively, we can just keep this around until the next patch release so that you can confirm in your specific environment?
2rigor commentedon Apr 27, 2025
apostasie commentedon Apr 27, 2025
@2rigor all good - I'll just confirm in a CRI env on my side and close if needed.
Cheers!