-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runroot is limited to 50 characters #22272
Comments
@mheon PTAL |
Although I think you might get into trouble with socket paths on long lengths. |
I think Dan is correct that this limitation is in place because of Unix
socket path length restrictions. Unfortunately not something we can easily
work around, kernel level restriction on how long we can make those paths.
…On Fri, Apr 5, 2024 at 04:29 Daniel J Walsh ***@***.***> wrote:
Although I think you might get into trouble with socket paths on long
lengths.
—
Reply to this email directly, view it on GitHub
<#22272 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCBYIDUXF3CVT55WRT3Y3ZOG7AVCNFSM6AAAAABFYITW3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGIZTSMRSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We already have workarounds in place for this restriction. If there are still places where this is needed we can convert them to use the workaround (open the path under /proc/self/fd). Also 50 is just such a arbitrary value. I would say let's remove it and if something fails we can fix this on case by cases bases IMO. |
Original change seems to be #1704, and mentions issue with conmon attach socket paths. I would hope those are fixed by now. |
Removing the check and using a base path > 108 to be greater than the socket path length seems to work fine to run a container so I am going to open a PR and remove this limitation. |
This was added ages ago in commit c65b359, however in the meantime both podman and conmon can support longer socket paths as they use a workaround to open the path via /proc/self/fd, see openUnixSocket() in libpod/oci_conmon_attach_linux.go Thus this restriction is not needed anymore and we can drop a workaround in the tests. Fixes containers#22272 Signed-off-by: Paul Holzinger <[email protected]>
Thank you for looking into this. I was not aware that this was due to a UNIX socket path restriction. However, that restriction as far as I know is defined in un.h as |
Well we must reserve space for the actual path to the socket, because we use container ids and they are 64 chars in hex so we exceed the 108 anyway even with the 50 chars limit. But regardless this kernel limitation is stupid and we have worked around that since #8933 apparently. So the solution is to just drop the limit. |
SGTM |
@Luap99, thank you for resolving this. It works in my environment. |
Issue Description
The
--runroot
argument only accepts paths that are less than 50 characters. Albeit,--root
and--tmpdir
do not seem to have that limitation.Steps to reproduce the issue
Run podman with
--runroot
with a path that is longer than 50 characters.Describe the results you received
Error: the specified runroot is longer than 50 characters
Describe the results you expected
runroot should work with paths longer than 50 characters.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: