diff --git a/README.md b/README.md index 4b5cbef..8c68bf9 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Argo CD or Flux instead of Helm, from a Helm repository in the cluster (`lab/gitops/gitops-test.sh`). Nothing is applied again unchanged and no Secret changes across refreshes. The controller puts a hand edit back. An upgrade with every image pinned by digest rolls everything without signing -out webmail tabs left open across it. Then the 27.1 crossing from a 2026.x +out webmail tabs left open across it or failing one of their requests. Then the 27.1 crossing from a 2026.x store, as changes to the controller's spec: refused, then acknowledged. Under Argo CD the chart's generated secrets are off and the Secrets are made first; Flux runs Helm, so the chart keeps its own. CI runs both diff --git a/lab/chart/fresh-store.sh b/lab/chart/fresh-store.sh index e6d3732..ba42b1e 100755 --- a/lab/chart/fresh-store.sh +++ b/lab/chart/fresh-store.sh @@ -39,19 +39,28 @@ run_pod() { "${K[@]}" -n inbuxa wait --for=condition=Ready "pod/$name" --timeout=180s >/dev/null } -# Port-forward 18080 to a pod's 8080 until stop_forward; waits for it to answer +# Port-forward 18080 to a pod's 8080 until stop_forward; waits for it to +# answer. The port-forward is started again if it exits, as it does when +# the one before it hasn't let go of 18080 yet. FORWARD_PID="" forward() { - "${K[@]}" -n inbuxa port-forward "pod/$1" 18080:8080 >/dev/null 2>&1 & - FORWARD_PID=$! for _ in $(seq 1 60); do + if [ -z "$FORWARD_PID" ] || ! kill -0 "$FORWARD_PID" 2>/dev/null; then + "${K[@]}" -n inbuxa port-forward "pod/$1" 18080:8080 >/dev/null 2>&1 & + FORWARD_PID=$! + fi curl -fsS -o /dev/null http://127.0.0.1:18080/healthz/live 2>/dev/null && return 0 sleep 1 done echo "!! $1 never answered on 8080" >&2 return 1 } -stop_forward() { [ -n "$FORWARD_PID" ] && kill "$FORWARD_PID" 2>/dev/null; FORWARD_PID=""; } +stop_forward() { + [ -n "$FORWARD_PID" ] || return 0 + kill "$FORWARD_PID" 2>/dev/null + wait "$FORWARD_PID" 2>/dev/null || true + FORWARD_PID="" +} trap stop_forward EXIT # The one-off pods' config.json (the chart's own pods have theirs) diff --git a/lab/gitops/gitops-test.sh b/lab/gitops/gitops-test.sh index b7a91cf..12de4a7 100755 --- a/lab/gitops/gitops-test.sh +++ b/lab/gitops/gitops-test.sh @@ -11,7 +11,8 @@ # 2. self-heal: the webmail scaled down by hand comes back to two # 3. an upgrade, 27.1.0-lab.1 to -lab.2 with every image pinned by digest # as a chart release pins them: everything rolls, the upgrade hook -# runs, and webmail tabs open across it are never signed out +# runs, and webmail tabs open across it are never signed out and +# no request of theirs fails # 4. after it: the same Secrets, mail works, and steady again # # lab/gitops/gitops-test.sh TOOL @@ -154,6 +155,9 @@ for e in r["errors"][:10]: if r["signins"] != 1: print("!! the upgrade signed the tabs out", file=sys.stderr) sys.exit(1) +if r["failed"]: + print("!! a webmail request failed during the upgrade", file=sys.stderr) + sys.exit(1) PY echo "== 4. after the upgrade"