From d856cdd9cc0a8ec5db07a8e18b71b91bd13bef11 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 17 Sep 2026 13:11:25 -0700 Subject: [PATCH] deploy: retry the relay health probe after restart (raced python startup) --- scripts/deploy-remote.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index 905cd2a..62c4b4c 100755 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -231,8 +231,17 @@ install_signal_relay() { systemctl --user daemon-reload systemctl --user enable signal-relay.service systemctl --user restart signal-relay.service - curl -fsS -m 5 http://127.0.0.1:18093/health >/dev/null \ - || { echo "signal-relay is not answering on 127.0.0.1:18093" >&2; return 1; } + # The interpreter needs a moment to bind after restart; a one-shot curl + # raced the socket on 2026-09-17 and failed a healthy deploy. + local i + for i in $(seq 1 15); do + if curl -fsS -m 5 http://127.0.0.1:18093/health >/dev/null; then + return 0 + fi + sleep 1 + done + echo "signal-relay is not answering on 127.0.0.1:18093" >&2 + return 1 } copy_loki_config() {