-
Notifications
You must be signed in to change notification settings - Fork 26
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
Cannot move mount from /tmp/ocitmp.XXXX to .../merged/run #92
Comments
my_mount.c:
|
@rhvgoyal PTAL @aalba6675 Do you think this is the comination of the mounts oci-systemd-hook is creating is conflicting with the bind mounted volume? So the kernel does not like it when we do a MS_MOVE? Did you attempt to change the mount propagation of the internel mounts in oci-systemd-hook? |
@mrunalp WDYT? |
@rhatdan I created a submount of /tmp at /tmp/oci and changed the template to /tmp/oci/otctmp.XXXX. For
so the original code would not work if Now I can create a container+bind mount but I will then hit my other issue (cgroup leakage) containers/podman#730 |
It will be difficult to enforce this within podman. I guess we could change the default of mounted volumes to be private but that might break users assumptions. |
@mrunalp I wonder if we could run through the bind mounts and force them to be all mountprivate, and then update the docs to state that if you run with systemd as your pid1, mountpropagation is not supported. |
I vaguely remember this restriction on MS_MOVE as well as pivot_root() that parent mount can not be shared. So this will have to be worked around. That's why we make parent mount of container root private so that pivot_root() can succeed. (in runc) |
Confusion: But, If there is no volume mounts on /tmp, and there is content in the container image's /run and /tmp, |
If you have an image with /run/httpd/httpd.pid in it, and run with oci-systemd-hook, and do not have any volumes mounted on /run or /run/httpd, oci-systemd-hook should mount a tmpfs on /run with the httpd/http.pid file in it. |
I'm using the latest oci-systemd-hook and have an image with /tmp/tmp.xxxx in it. and run with oci-systemd-hook, and do not have any volumes mounted on /tmp, oci-systemd-hook mount a tmpfs on /tmp without /tmp/tmp.xxx in it. If this is going to be a bug, could you have a look ? |
On Fedora 28
/tmp
is mounted asshared
.When doing the move mount from
/tmp/ocitmp.XXXX
to the container overlay it fails withEINVAL
.Steps:
/tmp
toprivate
, but makes this work twice but leads to other problems with containers+bind mounts namely cgroup debris: podman with bind mount leaving cgroup debris and prevents container restart containers/podman#730The text was updated successfully, but these errors were encountered: