Closed paulraines68 closed 2 years ago
I think we'd need to look at Singularity and figure out what exactly they're doing to make this work.
Can you provide more detailed info on how Singularity is being invoked vs how Podman is invoked? Are you mounting specific directories in /autofs
with Podman but the whole /autofs
directory with Singularity?
Does -v /autofs:/autofs:slave
work?
Does
-v /autofs:/autofs:slave
work?
Yes, that does work! Thanks, did not know about that.
@mheon
In Singularity I am simply running:
singularity exec -B /autofs -B /run/user fedora.sif bash
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Bind mounted automount points that are not already mounted fail inside the container
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Its the latest version that dnf gives me on CentOS8 Stream and Yes I looked in the Guide
Additional environment details (AWS, VirtualBox, physical, etc.):
I am trying out rootless podman as an alternative to singularity for our HPC users. One first issue had to do with secondary groups which has mostly been resolved as per https://github.com/containers/podman/issues/4185
Now I have another issue with the interaction of podman with the host's automounted directories. Our nodes have a /autofs directory with a few autofs mananged subdirs each with their own maps with names like 'cluster' and 'space'. When running singularity containers we can just pass "-B /autofs" to it and all those NFS volumes are available in the container whether they were mounted at the time the container was started or not.
But in podman we are finding after passing "-v /autofs:/autofs" that only those NFS volumes already mounted work. When accessing the path of an automount not yet mounted in the container one gets the error "Symbolic link loop". Doing this does cause the automount to happen on the host side. But even trying to access the path a second time still fails with the same error.
On the syslog of the host one sees
The last two lines repeats many times
Is this understood? Any solution?
Yes, if one is certain of what remote volumes one will need running podman with explict bind options like "-v /autofs/cluster/itgroup:/autofs/cluster/itgroup" even when it is not currently mounted works as it forces the mount at the podman start time. But I would like to avoid having to do that to enable generic podman based scripts that users can use without thinking through all the locations that could be accessed -- like we do in Singularity.