The post-install-prep helper waited for each LINSTOR prerequisite with a
separate fixed timeout anchored to the script's start: timeout 60 for the
linstor HelmRelease object to exist, timeout 300 for the controller
Deployment, timeout 60 for nodes Online. Those budgets raced the platform
reconcile chain. The cozystack-operator alone needs ~70s just to emit the
linstor HR, so the 60s exists-wait expired ~10s before the object appeared
and 'set -e' aborted the whole script, failing the install with a single
log line and no diagnostics. Across recent CI runs healthy LINSTOR
convergence is ~11-13 min, so the per-hop guesses had no margin and passed
only on favourable variance.
Replace the exists+ready pairs with a wait_for helper that polls
'kubectl wait' under one shared 15m deadline -- the same window the
installer's 'kubectl wait hr --all' already uses -- tolerating
not-yet-created objects (kubectl wait exits non-zero on NotFound) without
the set -e cliff, while still failing hard if a resource never becomes
ready inside the budget. Bump the 3-nodes-Online wait 60s to 300s for the
same reason.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Address review feedback on hack/e2e-post-install-prep.sh:31:
POSIX `wait` without arguments returns 0 even if a backgrounded
`kubectl exec` failed, which would mask partial LINSTOR prep failures
and let downstream tests run on a half-provisioned cluster. Collect
each background PID and `wait "$pid"` per job so `set -e` exits the
script on the first failed pool creation.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Two complementary changes that depend on the operator's
`--helmrelease-interval` flag landing via #2509:
1. Installer chart exposes `cozystackOperator.helmReleaseInterval`
(default empty -> flag not rendered -> operator default 5m
applies). E2E install passes `30s`. Eliminates the 8-10 min Flux
dead zone where dependency-blocked HRs (waiting on cert-manager
webhooks, CRDs) are requeued only every 5 min.
2. LINSTOR / StorageClass / MetalLB setup, previously sequential
`@test` cases after the 15 m platform HR wait, now run as a
background prep that completes during the platform reconcile.
None of them gates platform HR reconcile, so they can move out
of the critical path. Helper script `hack/e2e-post-install-prep.sh`
polls for its prerequisites and is awaited at the end of the
`Install Cozystack` test so failures still surface deterministically.
Includes the T2-race fix: wait on the LINSTOR HR being `Ready`
before polling for `deploy/linstor-controller`. The old 5-min hard
timeout fired during cold installs where the LINSTOR HR's dependency
chain takes longer than 5 min to resolve.
Production defaults are unchanged. The 30 s interval is opt-in per
install command.
Depends on:
- #2509 (operator-side `--helmrelease-interval` flag).
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>