Project

General

Profile

Bug #34595

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

Added by Adam Ruzicka 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Difficulty:
Triaged:
No
Bugzilla link:

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

Revision 1a0b5351 (diff)
Added by Peter Koprda about 2 months ago

Fixes #34595 - Control socket path length

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

#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)

Also available in: Atom PDF