Closed superseby2 closed 5 months ago
Containers in a pod do not share the mount namespace (and that is not even possible with OCI containers), so you need to handle that by yourself.
Have you tried specifying the :[r]shared
mount option for the volume mount where the fuse mount will be done?
Thx Giuseppe, I am indeed using rshared.
Having made more tests it turns out that this is not working ony in a rootless scenario.
Here are a steps I am following in rootful:
create a new pod podman pod create --volume namedvolumes/mymount --device /dev/fuse podshared
run a new container inside this pod podman run --cap-add SYS_ADMIN -it --rm --pod podshared docker.io/alpine /bin/sh sshfs <@>:/tmp /mymount
running a new container inside the pod podman run --cap-add SYS_ADMIN -it --rm --pod podshared docker.io/alpine /bin/sh ls /mymount ---> I can see the same content as in container number 1
When running this in rootless, the only difference is when running the container, where I am passing the map-gw to be able to run my sshfs command to.
podman run --cap-add SYS_ADMIN -it --rm --network pasta:--map-gw --pod podshared docker.io/alpine /bin/sh
In that scenario, container number 2 does not see the content of /mymount
rootless cannot propagate mounts to the host mount namespace.
What you can try to do is to use podman unshare
to join the user+mount namespace used for the rootless environment and make sure the mounts there are shared
. What do you get with podman unshare findmnt -o TARGET,PROPAGATION -R /
. If you see private,slave
then please fix it with podman unshare mount --make-rshared /
A friendly reminder that this issue had no activity for 30 days.
As there never was a reply closing
Issue Description
When running multiple containers in one POD; When one container mount a fuse-related mount inside the Pod's volume, the content of the mount is visible within only the container that did the mount.
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
The second container :
Describe the results you expected
The second container should see the content of /mymount/fuse
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting