Project

General

Profile

Actions

Bug #34595

closed

SSH control socket path length is limited and can cause jobs to fail

Added by Adam Ruzicka over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Difficulty:
Triaged:
No
Found in Releases:

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

Actions

Also available in: Atom PDF