fix(deploy): busybox ash lacks SECONDS; use date +%s for health deadline
This commit is contained in:
+3
-2
@@ -249,9 +249,10 @@ chmod 755 /etc/init.d/mk8-guard
|
|||||||
|
|
||||||
# Post-deploy verification: API must answer within ~60s (deadline-capped so
|
# Post-deploy verification: API must answer within ~60s (deadline-capped so
|
||||||
# hung connections cannot stretch the window) or we roll back.
|
# hung connections cannot stretch the window) or we roll back.
|
||||||
DEADLINE=\$((SECONDS + 60))
|
T0=\$(date +%s)
|
||||||
|
DEADLINE=\$((\$T0 + 60))
|
||||||
HEALTH_OK=''
|
HEALTH_OK=''
|
||||||
while [ \$SECONDS -lt \$DEADLINE ]; do
|
while [ \$(date +%s) -lt \$DEADLINE ]; do
|
||||||
if curl -fsS -m 3 http://127.0.0.1:8080/ >/dev/null 2>&1; then
|
if curl -fsS -m 3 http://127.0.0.1:8080/ >/dev/null 2>&1; then
|
||||||
HEALTH_OK=1
|
HEALTH_OK=1
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user