Bug #34595
closedSSH 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
Updated by The Foreman Bot over 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/74 added
Updated by Peter Koprda over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_proxy_plugin|1a0b535188535a3d7c5ed26f7db6f19d10420217.
Updated by Adam Ruzicka over 2 years ago
- Fixed in Releases smart_proxy_remote_execution_ssh-0.7.0 added
- Fixed in Releases deleted (
)