sylabs / singularity

SingularityCE is the Community Edition of Singularity, an open source container platform designed to be simple, fast, and secure.
https://sylabs.io/docs/
Other
760 stars 98 forks source link

oci: tar2sqfs error on OCI images with certain hard links #2686

Closed dtrudg closed 6 months ago

dtrudg commented 7 months ago

Version of Singularity

main / 4.1

Describe the bug

This is the --oci mode equivalent of #2684

tar2sqfs chokes on the output of ggcr mutate.Extract, which is called from oci-tools mutate.Squash.

There is a workaround in OCI mode, unlike native mode... --keep-layers avoids the issue.

Underlying bug is https://github.com/google/go-containerregistry/issues/977

$ singularity pull --oci docker://quay.io/broadsword/recount-unify:1.1.1
...
INFO:    Converting OCI image to OCI-SIF format
INFO:    Squashing image to single layer
INFO:    Writing OCI-SIF image
INFO:    Cleaning up.
FATAL:   While making image from oci registry: error fetching image to cache: while creating OCI-SIF: /usr/bin/tar2sqfs error: exit status 1, output: Packing recount-unify
tri-adam commented 6 months ago

Fixed by #2785.

$ singularity pull --oci docker://quay.io/broadsword/recount-unify:1.1.1
...
INFO:    Converting OCI image to OCI-SIF format
INFO:    Squashing image to single layer
INFO:    Writing OCI-SIF image
INFO:    Cleaning up.