-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix volumes with uid and gid options #10638
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mheon PTAL |
LGTM. I do wonder if we should start supporting these on their own, outside of |
ce70d09
to
a736c10
Compare
Podman uses the volume option map to check if it has to mount the volume or not when the container is started. Commit 28138da added to uid and gid options to this map, however when only uid/gid is set we cannot mount this volume because there is no filesystem or device specified. Make sure we do not try to mount the volume when only the uid/gid option is set since this is a simple chown operation. Also when a uid/gid is explicity set, do not chown the volume based on the container user when the volume is used for the first time. Fixes containers#10620 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@mheon PTAL again, I reworked the logic a bit to make all tests happy. |
To confirm, the no-chown logic is to prevent the image from overwriting our manually-specified UID/GID? I think a comment to this effect could be valuable. In general, LGTM |
/lgtm |
Podman uses the volume option map to check if it has to mount the volume
or not when the container is started. Commit 28138da added to uid
and gid options to this map, however when only uid/gid is set we cannot
mount this volume because there is no filesystem or device specified.
Make sure we do not try to mount the volume when only the uid/gid option
is set since this is a simple chown operation.
Fixes #10620