Notify user if path is too long during installation
Overview
When installing GDK, some services can fail to boot because the working directory path is too long.
This is related to Cells in particular (see #1945 (comment 2022663762)) but could be an issue with GDK services in general if it’s cloned to a deep directory.
According to unix(4)
: “UNIX-domain addresses are variable-length filesystem pathnames of at most 104 characters.”
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate
- Clone GDK to
/Users/kev/development/gitlab/gitlab-development-kit
or in a directory path of equal length - Enable cells (see
doc/howto/cells.md
) - After running
gdk cells up
, see that thedb:seed_fu
rake task failed
The gitaly test socket path that fails in this example is e.g. /Users/kev/development/gitlab/gitlab-development-kit/gitlab-cells/cell-1/tmp/gitaly-55527/sock.d/tsocket
, which has exactly a length of 104 (or 107 as sockaddr_un
pathname, see unix(4)
).
Proposal
Detect if any socket file path would exceed 104 characters. Then:
- if this is the case for a top-level GDK installation (or a cell), abort the installation with an error and suggest to install (or move) GDK in a shorter path, and
- maybe: if this could be the case for cells, warn the developer when they run
gdk doctor
.
Edited by Kev Kloss