Wait until Garage is up by polling port 3900

This commit is contained in:
Nicolas Jeannerod 2024-09-10 12:41:53 +00:00
parent 8205330341
commit 03995ca922

View file

@ -172,8 +172,10 @@ in {
path = [ cfg.package pkgs.perl pkgs.awscli ]; path = [ cfg.package pkgs.perl pkgs.awscli ];
script = '' script = ''
set -xeuo pipefail set -xeuo pipefail
# give garage time to start up
sleep 10 # Give garage time to start up by waiting until somethings speaks HTTP
# behind localhost:3900.
until curl -sio /dev/null http://localhost:3900/; do sleep 1; done
# XXX: this is very sensitive to being a single instance # XXX: this is very sensitive to being a single instance
# (doing the bare minimum to get garage up and running) # (doing the bare minimum to get garage up and running)