Description of problem:
Looks like we are seeing the exact same issue as shown in the following bug where users are not able to connect to the socket when the /var/run/user/<uid>/libpod/tmp/socket/ does not get truncated enough which causes this to fail with the following errors.
Socket truncated with long user names using default $XDG_RUNTIME_DIR · Issue #8798 · containers/podman · GitHub
URL: https://github.com/containers/podman/issues/8798
$ podman exec -it 1a /bin/sh
ERRO[0005] Container 1acc9b5c1de29ec462dd35250574347782f1634ebb1a8b22af80995b85da817e exec session 9b6c7dc9e3fde95b4a348ba8d47ff8749fdc3c7ed67dfd55591accf73cc2495b error: failed to connect to container's attach socket: /run/user/700052478/libpod/tmp/socket/9b6c7dc9e3fde95b4a348ba8d47ff8749fdc3c7ed67dfd55591accf73cc2495b/atta: dial unixpacket /run/user/700052478/libpod/tmp/socket/9b6c7dc9e3fde95b4a348ba8d47ff8749fdc3c7ed67dfd55591accf73cc2495b/atta: connect: no such file or directory
Error: timed out waiting for file /local/data/scratch/mqlgcqa/containers/storage/overlay-containers/1acc9b5c1de29ec462dd35250574347782f1634ebb1a8b22af80995b85da817e/userdata/9b6c7dc9e3fde95b4a348ba8d47ff8749fdc3c7ed67dfd55591accf73cc2495b/exit/1acc9b5c1de29ec462dd35250574347782f1634ebb1a8b22af80995b85da817e: internal libpod error
Customer is looking for this to be backported into podman 2.2, and they have also asked for this patch to be released by the end of the month.
Looks like the commit that fixes this is here:
oci: use /proc/self/fd/FD to open unix socket by giuseppe · Pull Request #8933 · containers/podman · GitHub
URL: https://github.com/containers/podman/pull/8933
Version-Release number of selected component (if applicable):
2.2.1
How reproducible:
Every time
Actual results:
Unable to connect to podman socket
Expected results:
Be able to truncate socket path correctly and connect.
Additional info:
Also looks very similar to 1932397 so added that link to this bug as well but looks slightly different so opened a new bug to confirm this is in fact a different issue or not.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2021:1796