From 7278b0d939315c130ee32f056ad2ccf6e1094217 Mon Sep 17 00:00:00 2001 From: mesutoezdil Date: Tue, 21 Jul 2026 11:12:05 +0200 Subject: [PATCH] fix(openbao-migrations): sleep between health check retries The retry loop logged Retrying in 5 seconds but never slept, so all 5 attempts ran within milliseconds. On a slow OpenBao startup the loop fell through while the service was still down and the raft list-peers call failed the migration Job. Add the missing sleep. Also replace two em dashes in comments and log text to satisfy the ASCII-only style rule. Closes #293 Signed-off-by: mesutoezdil --- migrations/openbao/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migrations/openbao/entrypoint.sh b/migrations/openbao/entrypoint.sh index 89d1c1168..962049334 100755 --- a/migrations/openbao/entrypoint.sh +++ b/migrations/openbao/entrypoint.sh @@ -63,6 +63,7 @@ while [ $retry_count -lt $MAX_RETRIES ]; do else log_info "OpenBao service not responsive. Retrying in $RETRY_DELAY seconds..." retry_count=$((retry_count + 1)) + sleep "$RETRY_DELAY" fi done @@ -93,7 +94,7 @@ initialize_mount_lists # exits non-zero whenever any required task fails. The previous behavior # (warn-and-continue, exit 0 regardless) let misconfigured deployments # green the Helm hook Job while leaving OpenBao in a half-configured -# state — surfacing later as a downstream service-cert outage instead of +# state, surfacing later as a downstream service-cert outage instead of # a blocked deployment. # # Addons enter the accumulator only when they're explicitly enabled @@ -184,7 +185,7 @@ if [ "${#FAILED_MIGRATIONS[@]}" -gt 0 ]; then log_error " - $m" done if [ "${MIGRATIONS_ALLOW_FAILURES:-false}" = "true" ]; then - log_warn "MIGRATIONS_ALLOW_FAILURES=true; exiting 0 despite ${#FAILED_MIGRATIONS[@]} failure(s) — investigate before next deploy" + log_warn "MIGRATIONS_ALLOW_FAILURES=true; exiting 0 despite ${#FAILED_MIGRATIONS[@]} failure(s); investigate before next deploy" else log_error "Exiting non-zero. Set MIGRATIONS_ALLOW_FAILURES=true only as an emergency rollback override" exit 1