-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add ReadonlyMounts to make overlay mounts readonly
#8259
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
Conversation
|
Hi @laurazard. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
e7a6c96 to
f200c87
Compare
|
Oh no I'm still having issues with review requests 😅 I'll just ping @dmcgowan @AkihiroSuda @rumpl @thaJeztah |
Looks like Line 111 in e208c24
I'll add the |
1c1905a to
6354931
Compare
This is necessary so we can mount snapshots more than once with overlayfs, otherwise mounts enter an unknown state. related: moby/buildkit#1100 Signed-off-by: Laura Brehm <[email protected]> Co-authored-by: Zou Nengren <[email protected]>
6354931 to
daa3a76
Compare
|
The other failures were fixed, and these look unrelated –
|
|
I marked this PR for cherry-picking for 1.6 and 1.7. Discussed with @laurazard and we'd like to use this functionality and as far as we can see, this should probably be safe to include. (of course backports will still need to be reviewed, and I asked @laurazard to call out potential concerns on the backports 👍 ) |
|
With this patch applied, the kernel throws another warning |
|
I haven't noticed that warning, but before this change, as described in #6077, you would get: kernel: [42256.430385] overlayfs: upperdir is in-use as upperdir/workdir of another mount, accessing files from both mounts will result in undefined behavior.
kernel: [42256.430389] overlayfs: workdir is in-use as upperdir/workdir of another mount, accessing files from both mounts will result in undefined behavior.Which (in practice) is a bigger problem than remounting as
Are you seeing issues like that? |
Yes, I also got the error "No such file or directory" when reproducing the problem as #6077 said |
|
The only functional change introduced in this patch is in |
Taking over #6114 as it hasn't had activity in a while. Happy to close this PR if the original author wants to do it himself though :)
related:
docker diffmoby/moby#44964This adds an (exported) function to make overlay mounts readonly, which is necessary (with the overlayfs driver) to prevent the mounts from entering an unknown state and not working properly.
Also addressed some of the comments on the initial PR.