-
If I enter a mount namespace and then create a podman container, I see two podman processes instead of one:
In above:
In comparison, if I just create a podman container without entering any mount namespace, then I only see 1 podman process:
In above:
Question: Why in 1st case there are apparently two podman processes? In the 1st case it appears that bind-mounts are performed from user-namespace of pid 6738, which has different uid as compared to the user; this is creating problems for bind-mounting of some fuse fs apparently (The fuse kernel layer itself restricts file system access to the mounting user (fuse.txt)). In 2nd case, it appears that bind-mounts are performed from user-namespace of pid 4714 (which has same uid as the user so it doesn't create any problems) Example showing error while bind-mounting a fuse fs when podman container is created within a mount namespace:
The above error doesn't occur when I am not within a mount namespace:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Update:
|
Beta Was this translation helpful? Give feedback.
-
The two processes are because of the reexec, the first podman command you run after the boot will always reexec to create+enter the podman userns+mounts. All following commands can just join that userns and do not need rexxec part. Now if you involve mount namesapces then you very likely completely break the podman storage management unless you know exactly what you are doing. Thus running podman commands in different mount namespaces is definitely not recommend. Using |
Beta Was this translation helpful? Give feedback.
-
Thanks @Luap99, that answers my question, I'll then just mount it both with & without I had few more related questions, it would be very helpful for me if you could answer these:
|
Beta Was this translation helpful? Give feedback.
The two processes are because of the reexec, the first podman command you run after the boot will always reexec to create+enter the podman userns+mounts. All following commands can just join that userns and do not need rexxec part.
Now if you involve mount namesapces then you very likely completely break the podman storage management unless you know exactly what you are doing. Thus running podman commands in different mount namespaces is definitely not recommend.
Likely because the new mounts the joining the existing namesapces is not possible and it falls back to reexec part.
Using
podman unshare
is a good way to do this as you are in the correct environment with that and it should not h…