Skip to content

Commit f4e50c4

Browse files
committed
fix(deploy): post-verify marker β†’ /healthz (invite/revoke went stale once M8a shipped) 🎯
The live hub already returns 401 for /v1/invite/revoke (M8a deployed), so that marker no longer proves a swap took — it'd pass even on the old binary. /healthz is the clean old→new discriminator (pre-round-1 hub 404s it; new code 200s with version), plus a /readyz DB-ping check. Used this to verify the 7-round redeploy.
1 parent 09fd944 commit f4e50c4

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

β€Ždeploy/redeploy-hub.shβ€Ž

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,18 @@ rollback() {
6666
echo "πŸ›‘ redeploy FAILED β€” rolled back to the previous binary"; exit 1
6767
}
6868
curl --retry 20 --retry-connrefused --retry-delay 1 --max-time 25 -sf "$URL/metrics" >/dev/null || rollback
69-
code=$(curl -s -o /dev/null -w '%{http_code}' -X POST "$URL/v1/invite/revoke")
70-
[ "$code" = 401 ] || { echo " βœ— /v1/invite/revoke = $code (want 401 β€” new code not live)"; rollback; }
71-
echo " βœ“ /v1/invite/revoke present (401 unauth) β€” P2 code is LIVE"
69+
# Marker: /healthz is the clean old→new discriminator — the pre-round-1 hub 404s
70+
# it, the new code returns 200 "ok <version>". (invite/revoke is already 401 on the
71+
# live M8a hub, so it can no longer prove the swap took.)
72+
code=$(curl -s -o /dev/null -w '%{http_code}' "$URL/healthz")
73+
[ "$code" = 200 ] || { echo " βœ— /healthz = $code (want 200 β€” new code not live; the old hub 404s it)"; rollback; }
74+
echo " βœ“ /healthz present (200) β€” new hub code is LIVE: $(curl -s --max-time 5 "$URL/healthz")"
75+
# /readyz pings the DB β€” proves the metadata store opened post-migration.
76+
rcode=$(curl -s -o /dev/null -w '%{http_code}' "$URL/readyz")
77+
[ "$rcode" = 200 ] || { echo " βœ— /readyz = $rcode (DB not ready)"; rollback; }
78+
echo " βœ“ /readyz present (200) β€” metadata DB is reachable"
7279

7380
say "πŸ”’ post-deploy counts (compare to pre β€” device/share/chunk should match)"
7481
echo "$(counts)"
7582

76-
say "βœ… hub redeployed safely β€” P2 (+s attenuation Β· invite revocation) + P3 (gc-every) are live."
83+
say "βœ… hub redeployed safely β€” 7 rounds live (push-verify, HTTP_PROXY fix, backup⇄gc flock, fsck, /healthz+/readyz, /metrics counters, device/share ls, …)."

0 commit comments

Comments
Β (0)