Skip to content

Commit eb87413

Browse files
fix(e2e): wait for LINSTOR HelmRelease Ready before polling its deployment
The previous 5-min timeout on `until kubectl get deploy/linstor-controller` fired during cold-install runs where the LINSTOR HR's dependency chain (cert-manager → piraeus-operator-crds → piraeus-operator → linstor) takes longer than 5 min to resolve, killing the whole post-install-prep script via `set -eu`. With CI's 3x retry the failure was hidden; with the retry removed it would surface every cold install. Wait on the LINSTOR HR being Ready first (the actual prerequisite), then keep the existence-poll as a near-instant backstop, then wait for Available. Same final semantics, no fragile fixed-window timeout. Surfaced by PR #2500 cozyreport diagnostics (post-install-prep.log). Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 4ee073e commit eb87413

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎hack/e2e-post-install-prep.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# overlaps with the wait instead of compounding it.
66
set -eu
77

8+
echo "[post-install-prep] waiting for linstor HelmRelease object to exist"
9+
timeout 60 sh -ec 'until kubectl get hr/linstor -n cozy-linstor >/dev/null 2>&1; do sleep 2; done'
10+
11+
echo "[post-install-prep] waiting for linstor HelmRelease to be Ready"
12+
kubectl wait helmrelease/linstor -n cozy-linstor --for=condition=Ready --timeout=15m
13+
814
echo "[post-install-prep] waiting for linstor-controller deployment to exist"
915
timeout 300 sh -ec 'until kubectl get deploy/linstor-controller -n cozy-linstor >/dev/null 2>&1; do sleep 2; done'
1016

0 commit comments

Comments
 (0)