From 8aed0bf98ea909b10e5b5702be4f3e83e16cdc71 Mon Sep 17 00:00:00 2001 From: Scooby Husky Date: Mon, 17 Aug 2026 21:15:40 -0500 Subject: [PATCH] Fix vault-raft-snapshot: mc download needs -L to follow redirects Without -L, curl silently saved dl.min.io's redirect response body (HTML/text) as the mc binary instead of the actual binary, failing at runtime with a confusing shell-script-interpretation error. Confirmed live while testing the leader-detection fix end-to-end. Co-Authored-By: Claude Sonnet 5 --- infrastructure/vault/manifests/raft-snapshot-cronjob.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infrastructure/vault/manifests/raft-snapshot-cronjob.yaml b/infrastructure/vault/manifests/raft-snapshot-cronjob.yaml index 3a8da9a..6a3d5cc 100644 --- a/infrastructure/vault/manifests/raft-snapshot-cronjob.yaml +++ b/infrastructure/vault/manifests/raft-snapshot-cronjob.yaml @@ -87,7 +87,12 @@ data: kubectl -n vault exec "$LEADER_POD" -- rm -f "/tmp/${SNAP_NAME}" echo "==> Installing mc (MinIO client)..." - curl -sf https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc + # -L is required - dl.min.io redirects, and without it curl silently + # saves the redirect response body (a small HTML/text page) as "mc" + # instead of the actual binary, which then fails at runtime with a + # confusing "line N: : No such file or directory" (bash trying + # to interpret it as a script). Confirmed live 2026-08-18. + curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc chmod +x /tmp/mc export MC_CONFIG_DIR=/tmp/.mc /tmp/mc alias set vps-minio "http://${VPS_MINIO_ENDPOINT}" \