Bug #34595
SSH control socket path length is limited and can cause jobs to fail
Description
Since we ditched net/ssh, we spawn a multiplexed ssh connection and then reuse it for the duration of the job. Under the hood, it works by ssh creating a control unix domain socket and all following ssh invocations use it. The control socket is currently placed into the local working directory, but this can cause issues. Unix domain socket path length is limited to 108 (or 104, depending on the platform) characters, which is quite easy to hit.
In this limit is exceeded, the jobs fail with
"/$local_working_directory/foreman-ssh-cmd-636a6735-8546-4f69-844b-46f28750a928/socket.LScrQpmJTr6CsJzD" too long for Unix domain socket
We could either:
- check the path length on startup and refuse to activate the proxy feature if the control socket path would be too long
- move the control socket away from the local working directory to either
- hardcoded place such as /tmp
- configurable place
Associated revisions
History
#1
Updated by The Foreman Bot 3 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/74 added
#2
Updated by The Foreman Bot about 2 months ago
- Fixed in Releases smart_proxy_remote_execution_ssh-0.6.1 added
#3
Updated by Peter Koprda about 2 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_proxy_plugin|1a0b535188535a3d7c5ed26f7db6f19d10420217.
#4
Updated by Adam Ruzicka about 1 month ago
- Fixed in Releases smart_proxy_remote_execution_ssh-0.7.0 added
- Fixed in Releases deleted (
smart_proxy_remote_execution_ssh-0.6.1)
Fixes #34595 - Control socket path length