Bump wait_for_api_ready timeout from 60s to 180s

Confirmed live: on a CI-triggered run, the REST API genuinely took longer
than 60s to accept authenticated requests even though the container had
already reported healthy - verified after the fact that both the API and
the admin credentials were fine, this was purely insufficient margin
(likely due to concurrent load during the run), not a logic bug. 180s
matches the same order of magnitude as the existing 300s docker-health
wait elsewhere in this script.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
byrsapty 2026-07-22 23:05:52 +03:00
parent 3aaa1c96a8
commit 9cdef5d521

View file

@ -219,9 +219,9 @@ wait_for_api_ready() {
local waited=0 local waited=0
while true; do while true; do
gcurl GET /system/indices/index_sets | python3 -c "import json,sys;json.load(sys.stdin)" 2>/dev/null && break gcurl GET /system/indices/index_sets | python3 -c "import json,sys;json.load(sys.stdin)" 2>/dev/null && break
waited=$((waited + 3)) waited=$((waited + 5))
[ "$waited" -ge 60 ] && die "Graylog REST API did not respond with valid JSON within 60s of the container reporting healthy." [ "$waited" -ge 180 ] && die "Graylog REST API did not respond with valid JSON within 180s of the container reporting healthy."
sleep 3 sleep 5
done done
ok "Graylog REST API is ready" ok "Graylog REST API is ready"
} }