`gdk start/status` returns only a single line with `timeout waiting for runsv in ./services/<first-service>`
Problem
gitlab!19276 (comment 237027606) and @danielgruesso have both reported similar problems with running gdk start/status only returning a single timeout waiting for runsv in ./services/<first-service> message:
gitlab-development-kit $gdk start
(in /Users/danielgruesso/projects/gitlab-development-kit)
timeout waiting for runsv in ./services/gitlab-workhorse
@danielgruesso kindly let me debug the issue remotely and I was able to determine the services and sv directories (as well as Procfile) were all clean and correct:
gitlab-development-kit $ls -la services/
total 0
drwxr-xr-x 11 user staff 352 Nov 6 22:45 .
drwxr-xr-x 76 user staff 2432 Nov 6 22:45 ..
lrwxr-xr-x 1 user staff 72 Nov 6 22:45 gitlab-workhorse -> /Users/user/projects/gitlab-development-kit/sv/gitlab-workhorse
lrwxr-xr-x 1 user staff 61 Nov 6 22:45 minio -> /Users/user/projects/gitlab-development-kit/sv/minio
lrwxr-xr-x 1 user staff 66 Nov 6 22:45 postgresql -> /Users/user/projects/gitlab-development-kit/sv/postgresql
lrwxr-xr-x 1 user staff 64 Nov 6 22:45 praefect -> /Users/user/projects/gitlab-development-kit/sv/praefect
lrwxr-xr-x 1 user staff 73 Nov 6 22:45 praefect-gitaly-0 -> /Users/user/projects/gitlab-development-kit/sv/praefect-gitaly-0
lrwxr-xr-x 1 user staff 77 Nov 6 22:45 rails-background-jobs -> /Users/user/projects/gitlab-development-kit/sv/rails-background-jobs
lrwxr-xr-x 1 user staff 65 Nov 6 22:45 rails-web -> /Users/user/projects/gitlab-development-kit/sv/rails-web
lrwxr-xr-x 1 user staff 61 Nov 6 22:45 redis -> /Users/user/projects/gitlab-development-kit/sv/redis
lrwxr-xr-x 1 user staff 63 Nov 6 22:45 webpack -> /Users/user/projects/gitlab-development-kit/sv/webpack
(sv was correct also)
Root cause
I tracked the root cause of the issue down to the use of the chpst command causing issues:
(ls used as a really basic example)
chpst -P ls
fails with chpst: fatal: unable to run: ls: not a directory. However, the following does work:
chpst -P /bin/ls
I manually modified each services/<service>/run to ensure all exec <executable> calls were fully qualified, e.g. for services/redis/run I changed:
exec chpst -P redis-server /Users/user/src/gdk/gdk-primary/redis/redis.conf
to:
exec chpst -P /usr/local/bin/redis-server /Users/user/src/gdk/gdk-primary/redis/redis.conf
and this did allow ./services/redis/run to be called and did work. However, whilst services can be run via calling ./services/redis/run directly, running via gdk start still does not work.
Am unsure why fully qualified paths are required in this case, but making the <executable> fully qualified does improve things.
@danielgruesso is running macOS 10.13.? (couldn't remember the patch version) and 2.1.2 of runit (which includes chpst). I removed and re-installed runit too with no change. @danielgruesso also rebooted with no change.