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
overlay: do not clone source recursively #1309
overlay: do not clone source recursively #1309
Conversation
do not clone the source directory in recursive mode (the equivalent of MS_BIND|MS_RECURSIVE) but use only a regular bind mount. If not recursive bind mount is used then the existing overlay mounts are not replicated. In this way a new idmapped mount won't need to map the overlay mount as well, causing the mount_settattr(2) syscall to fail with EINVAL since it is not possible to idmap an overlay mount yet. Closes: containers#1308 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
LGTM |
@markhuang1212 PTAL and see if this solves your issue. |
It solved my issue. |
Sounds reasonable. Is there a test that exercises this scenario? |
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
Just waiting for this ^ |
remove some constants that are also defined in the unix package. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
I've added another commit that drops these constants. I am not sure about a test, it is not a new feature just a different way to mount the layers when there are mappings so we are taking advantage of the existing ones. We have not caught the issue in the CI because the new feature requires Linux 5.19 that is currently only available on Rawhide |
LGTM |
Thanks for the fix to #1308. Referring to the comment, and as I understood it, and I hope I didn't get it wrong, it resolves for Arch Linux users with a new release of containers/storage, afterwards including it in podman with a new podman release (for reference, see FS#75605). I would appreciate considering a new containers/storage release to allow it to proceed down to the downstream. Thanks for your consideration and taking the time. Hope you are all safe & best regards |
do not clone the source directory in recursive mode (the equivalent of
MS_BIND|MS_RECURSIVE) but use only a regular bind mount. If
not recursive bind mount is used then the existing overlay mounts are
not replicated. In this way a new idmapped mount won't need to map
the overlay mount as well, causing the mount_settattr(2) syscall to
fail with EINVAL since it is not possible to idmap an overlay mount
yet.
Closes: #1308
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com