-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Wierd issue with User Namespace and mounting volumes. #1229
Comments
If you mount the volume without the :ro, it works.
|
I have not isolated this to runc, but I am pretty sure the problem is there. Also, cgroupfs is the only one we have round this issue with, mounting in /sys/fs/selinux:ro works, and turning off user namespace works. Only cgroupsfs with usernamespace. |
Gotten this to happen within runc. This example attempts to mount /sys/fs/cgroup on /mnt readonly using runc. Fails with usernamespace. I believe this is a kernel issue. We fixed a similar issue We are now looking into the kernel. |
@rhvgoyal PTAL |
@rhatdan This sounds like an issue in And when you set |
I don't believe it is runc. I have it failing if I do -v /sys/fs/cgroup:/mnt:ro From runc point of view this is just a bind mount, but the kernel looks at this as changing the mount attributes of a cgroupfs. 30118 mount("/sys/fs/cgroup/systemd", "/mnt/rootfs/mnt", 0xc4200cfa40, MS_RDONLY|MS_REMOUNT|MS_BIND|MS_REC, NULL) = -1 EPERM (Operation not permitted) |
@rhatdan Can you try with #1222 applied? @justincormack has proposed changing code that is handling our read-only remounting code. |
Stil fails with patch.
|
uname -r |
Ok @rhvgoyal reproduced this with usernamespace and mounting cgroups outside of runc, definitely a kernel issue. |
Alright, keep us up to date on what happens. 😸 |
@rhvgoyal Isn't this fixed in the kernel now? |
I still see things failing with kernel-4.16.6-202.fc27.x86_64 and kernel-4.16.7-300.fc28.x86_64, noted in https://bugzilla.redhat.com/show_bug.cgi?id=1401944#c13. |
I can reproduce this behaviour on Linux 5.6.11-200.fc31.x86_64 with runc-master (09ddc63) on Error message:
Strace shows a bind mount followed by a remount:
The difference between See checks in the kernel https://github.com/torvalds/linux/blob/v5.8/fs/namespace.c#L2482-L2488
The
So I think this is not a bug and users should add Reproducible steps:
|
The text was updated successfully, but these errors were encountered: