Closed yrro closed 3 years ago
https://github.com/containers/podman/pull/1704 sounds similar but is quite old - hence this seems like a regression
With podman 2.2.1 the sockets are called:
/run/user/876099160/libpod/tmp/socket/237f67c9648f6c96ea1f945171266f0dc15add77dbb26f650ff833c706bb340a/atta
i.e. the socket path is truncated to 108 bytes (including the NUL terminating byte).
Probably actually a dupe of https://github.com/containers/podman/issues/8798
... maybe not. As far as I can tell, https://github.com/containers/podman/pull/8933/files is already present in 3.0.0-rc2.
Delving in with strace, I can see...
633674 openat(AT_FDCWD, "/run/user/876099160/libpod/tmp/socket/9d27a9c3b532d9bfc9687c1c98e4438e7e12f35a36a8e8cd1bbe62008ba4fe95/attach", O_RDONLY|O_PATH) = -1 ENOENT (No such file or directory)
... which probably corresponds to https://github.com/containers/podman/blob/master/libpod/oci_attach_linux.go#L32 so maybe whatever is supposed to create that socket is no longer able to do so.
If I create the container detached...
$ podman run -d --name=foo --rm -it docker.io/library/debian:10
bb0e59cd1cbeca78858afbe07c0ba6b09970d4a0da1a55b0f43fe4d08a27aa43
$ ls -F /run/user/876099160/libpod/tmp/socket/bb0e59cd1cbeca78858afbe07c0ba6b09970d4a0da1a55b0f43fe4d08a27aa43/
artifacts/ atta= config.json ctl| ctr.log shm/ winsz|
Note the socket is present but it's called atta
like it was under Podman 2.2.1!
And this explains why I can't attach to it:
$ podman attach foo
Error: error attaching to container bb0e59cd1cbeca78858afbe07c0ba6b09970d4a0da1a55b0f43fe4d08a27aa43: failed to connect to container's attach socket: /run/user/876099160/libpod/tmp/socket/bb0e59cd1cbeca78858afbe07c0ba6b09970d4a0da1a55b0f43fe4d08a27aa43/attach: no such file or directory
i.e., the socket is created with a truncated path, and the attach operation fails because it uses the untruncated path.
Aha, if I upgrade conmon (from 2.20.20 to 2.20.25) then the attach
socket is created with its full path and podman can now attach to it. Sorry for the noise!
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I can't start new containers with 3.0.0rc2. Previously (<= 2.1.1) this was not a problem.
Steps to reproduce the issue:
Describe the results you received:
The path
/run/user/876099160/libpod/tmp/socket/8b370207625cd9ab38eaa5bb142ff3077ef65f307b4ae8e6b8ac3668d8f3d4ae/attach
is 109 bytes long. This is longer than the maximum length of a unix socket path of 108 bytes.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?
Yes