remote_access: use hostname, etc., hash
When using fairly long hostnames (e.g., the
chromeosA-rowB-rackC-hostD.<sub1>.<sub2>.google.com hostnames spat out
by `skylab lease-dut`), one can run into limitations on unix socket path
length:
unix_listener: path "/tmp/update_kernel.GkRDhJ/ssh_controlroot@chromeosA-rowB-rackC-hostD.<sub1>.<sub2>.google.com:22.wzHsMUlaYTn0GP73" too long for Unix domain socket
ssh_config(5) provides '%C' ("hash of %l%h%p%r") as a helpful
fixed-length alternative. The basename ("ssh_control...") in this case
reduces from 87 to 52 characters, leaving room for the "${TMP}" portion.
BUG=none
TEST=`./update_kernel.sh --remote=root@chromeosA-rowB-rackC-hostD.<sub1>.<sub2>.google.com`
Change-Id: I9e2ad65bd7c49f1d5320dc880b467ef44e012d9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2310866
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed