deploy.sh: per-target health wait; 20 min for Dankclaw cold loads
Cold loads after the cache drop measured 17 minutes on 2026-08-13, longer than the previous 600s wait. HEALTH_WAIT[dankclaw]=600 iterations (20 min), dankserver stays at 300 (10 min). AGENTS.md: update cold-load figure.
This commit is contained in:
1 parent
e29071caa1
commit
42558f1707
2 files changed
+9
-4
No files matched your search
+8
-3
@@ -31,7 +31,7 @@ set -euo pipefail
|
||||
# ---------------------------------------------------------------------------
|
||||
# Target configuration
|
||||
# ---------------------------------------------------------------------------
|
||||
declare -A REMOTE_USER REMOTE_HOST REMOTE_DIR SERVICE SERVICE_HEALTH DROP_CACHES HELPER
|
||||
declare -A REMOTE_USER REMOTE_HOST REMOTE_DIR SERVICE SERVICE_HEALTH DROP_CACHES HELPER HEALTH_WAIT
|
||||
|
||||
REMOTE_USER[dankclaw]=dank
|
||||
REMOTE_HOST[dankclaw]=dankclaw
|
||||
@@ -44,6 +44,9 @@ DROP_CACHES[dankclaw]=1
|
||||
# Passwordless restart helper (root-owned, installed via /etc/sudoers.d/frank-large).
|
||||
# When present, deploy.sh uses it instead of inline sudo commands.
|
||||
HELPER[dankclaw]="/usr/local/sbin/frank-restart-large.sh"
|
||||
# Health wait in iterations of 2s. Cold loads after the cache drop measured
|
||||
# at up to 17 minutes on 2026-08-13; 600 iterations = 20 minutes.
|
||||
HEALTH_WAIT[dankclaw]=600
|
||||
|
||||
REMOTE_USER[dankserver]=dank
|
||||
REMOTE_HOST[dankserver]=dankserver
|
||||
@@ -52,6 +55,7 @@ SERVICE[dankserver]="frank-default-small"
|
||||
SERVICE_HEALTH[dankserver]="http://127.0.0.1:7770/health"
|
||||
DROP_CACHES[dankserver]=0
|
||||
HELPER[dankserver]="/usr/local/sbin/frank-restart-small.sh"
|
||||
HEALTH_WAIT[dankserver]=300
|
||||
|
||||
TARGET="${1:-}"
|
||||
DRY_RUN=0
|
||||
@@ -177,7 +181,8 @@ if [ "$DRY_RUN" = "1" ]; then
|
||||
else
|
||||
echo "[4/4] Waiting for health endpoint ${SERVICE_HEALTH[$TARGET]} (via ssh)..."
|
||||
HEALTH_URL="${SERVICE_HEALTH[$TARGET]}"
|
||||
for i in $(seq 1 300); do
|
||||
HEALTH_ITERS="${HEALTH_WAIT[$TARGET]:-300}"
|
||||
for i in $(seq 1 "$HEALTH_ITERS"); do
|
||||
if ssh "$REMOTE" "curl -sf '$HEALTH_URL'" > /dev/null 2>&1; then
|
||||
echo " Service healthy after approx $((i * 2))s"
|
||||
echo ""
|
||||
@@ -186,6 +191,6 @@ else
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
echo "FAIL: Service did not become healthy in 600s"
|
||||
echo "FAIL: Service did not become healthy in $((HEALTH_ITERS * 2))s"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user