New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create readonly locks if the lockfile does not exists #1030
Conversation
Users are setting up readonly shares and sometimes they forget, or do not even know that they need to create the lockfile. Even in the quay.io/podman/stable images Dockerfile, I have to manually create these files. Fixes: containers#1029 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but want a head nod from @nalind
If the underlying filesystem is mounted read-only, we're not going to be able to create lock files on it, but otherwise, sure. |
Well in that case we will return a more clear error. |
LGTM , I might be completely wrong but since we are trying to create file in a |
I am assuming |
LGTM, nvm that should be only when underlying FS is readonly. |
/lgtm |
Right additional stores are only treated as read/only from container/storage point of view. There is nothing that requires them to be actually on read/only file systems. The create attempt when the file actually does not exist. |
Looking through the change, does this actually fix the issue? After all the |
Maybe not, you would want it to create the entire path? |
Ok not fail on additonal stores that return errors. |
Yeah it would be great if it would simply skip the store if there is nothing in there. Think of it like that: I can mount an empty store in and fill it at a later time for instance… Currently it requires it to have at least one image there (or at least run any other command that fills up that directory & lock structure). |
This patch in Podman worked for me. I added "/var/lib/shared", to /etc/containers/storage.conf
Seems like containers storage creates the /var/lib/shared/overlay-images now, and with my fix it now creates the images.lock file. |
Ah well it probably did not create overlay-images for me since I mounted the volume |
Users are setting up readonly shares and sometimes they forget, or do
not even know that they need to create the lockfile.
Even in the quay.io/podman/stable images Dockerfile, I have to manually
create these files.
Fixes: #1029
Signed-off-by: Daniel J Walsh dwalsh@redhat.com