From eb87413556f67215d7fc947e67ed32dbdbfbb480 Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Mon, 27 Apr 2026 23:10:16 +0500 Subject: [PATCH] fix(e2e): wait for LINSTOR HelmRelease Ready before polling its deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hack/e2e-post-install-prep.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hack/e2e-post-install-prep.sh b/hack/e2e-post-install-prep.sh index 495bf72a..7a6fc798 100755 --- a/hack/e2e-post-install-prep.sh +++ b/hack/e2e-post-install-prep.sh @@ -5,6 +5,12 @@ # overlaps with the wait instead of compounding it. set -eu +echo "[post-install-prep] waiting for linstor HelmRelease object to exist" +timeout 60 sh -ec 'until kubectl get hr/linstor -n cozy-linstor >/dev/null 2>&1; do sleep 2; done' + +echo "[post-install-prep] waiting for linstor HelmRelease to be Ready" +kubectl wait helmrelease/linstor -n cozy-linstor --for=condition=Ready --timeout=15m + echo "[post-install-prep] waiting for linstor-controller deployment to exist" timeout 300 sh -ec 'until kubectl get deploy/linstor-controller -n cozy-linstor >/dev/null 2>&1; do sleep 2; done'