Skip to content

Conversation

@dtrudg
Copy link
Member

@dtrudg dtrudg commented May 9, 2022

Description of the Pull Request (PR):

If an image cannot be read, attempts to open it with the various image format handling code will fail. Since we are using a fall-through approach to find the correct image format, these failures did not give a sensible error message.

Add an explicit check that the image is readable.

$ ls -lah overlay.img 
----------. 1 dtrudg dtrudg 1.0G May  4 10:55 overlay.img

Before...

$ singularity run --overlay overlay.img busybox_latest.sif 
FATAL:   while loading overlay images: failed to open overlay image overlay.img: image format not recognized

After...

$ singularity run --overlay overlay.img busybox_latest.sif 
FATAL:   while loading overlay images: failed to open overlay image overlay.img: /home/dtrudg/overlay.img is not readable by the current user, check permissions

This fixes or addresses the following GitHub issues:

Before submitting a PR, make sure you have done the following:

@dtrudg dtrudg added the bug Something isn't working label May 9, 2022
@dtrudg dtrudg added this to the SingularityCE 3.10 milestone May 9, 2022
@dtrudg dtrudg self-assigned this May 9, 2022
If an image cannot be read, attempts to open it with the various image
format handling code will fail. Since we are using a fall-through
approach to find the correct image format, these failures did not give
a sensible error message.

Add an explicit check that the image is readable.

Fixes sylabs#786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing 'overlay image format not recognized' error when file is not readable (perms)

2 participants