Repository navigation
fix(helm): protect WAL recovery with a startup probe - #700
Conversation
|
All contributors have signed the CLA. Thanks! |
xe-nvdk
left a comment
There was a problem hiding this comment.
This lands the right fix for the liveness prong of #676, and the design checks out at every level I could test. The code itself is ready; two administrative items block the merge, listed at the end.
What I verified:
Source ordering. The probe comment's claim is accurate: WAL recovery runs synchronously in main() (RecoverWithOptions, cmd/arc/main.go) well before api.NewServer is constructed and Fiber binds the listener, so /health cannot answer until replay finishes. The startup probe therefore measures exactly the window that needs protecting.
Static checks. helm lint clean, helm template renders the probe correctly at the default and with --set startupProbeFailureThreshold=45, scripts/test_startup_probe.sh passes on this branch and fails against the pre-fix chart (regression coverage confirmed), and shellcheck reports nothing.
Live cluster A/B. I installed both charts side by side on a local k3s cluster with the container command wrapped in a 120-second sleep before exec, simulating a long replay ahead of the listener bind:
- Pre-fix chart: liveness killed the container on a ~70s cycle ("Container arc failed liveness probe, will be restarted"), 4 restarts in 5 minutes, never Ready. This reproduces the #676 crash loop exactly.
- This branch: the startup probe absorbed 12 failed checks against its budget of 30, zero restarts, pod Ready at 2m32s.
Optional polish, fine to fold into the rebase or skip:
startupProbeinheritstimeoutSeconds: 1while liveness uses 5. During replay the port refuses instantly so it rarely matters, and a slow first/healthright after the listener binds would only cost one 10s period. Setting 5 for consistency is cheap.check_probe 30passes--setwith the default value, so the values.yaml default itself is never exercised; one run without--setwould pin it.- The assertions exit silently on failure under
set -e; an error echo would make a CI failure readable. - The CI call templates
helm/arcwhile the job installsdist/arc-*.tgz; pointing the script at the tgz would test the exact artifact being released.
Blocking for merge, both quick:
- CLA. The CLA check is failing; signing is now required on every PR (#699). Please sign per the bot's instructions in this thread and comment
recheck. - Rebase. RELEASE_NOTES_2026.09.2.md conflicts with main (the Bug fixes section gained the #697 entry this morning; that is the only conflicting file). Please rebase and keep your entry at the top of the section.
4d548fe to
e30f3c4
Compare
|
rebased onto main and kept the #676 entry at the top of Bug fixes. |
|
thx for the review. I pushed the test follow-up: the default chart render is now checked without an override, the 45 override stays covered, and assertion failures name the missing probe field. kept |
|
I have read the CLA Document and I hereby sign the CLA |
xe-nvdk
left a comment
There was a problem hiding this comment.
CLA is green and the rebase is clean: the chart, workflow, and release-notes content match what was verified in the first round (including the live cluster A/B), with your entry at the top of the Bug fixes section. The new test commit improves on two of the optional notes: the default case now templates without --set, so the values.yaml default is actually exercised, and the assertions report what failed instead of exiting silently. I re-ran the script against a sabotaged threshold to confirm the failure message fires. Merging.
Summary
Refs #676
Test plan
helm lint ./helm/archelm template arc ./helm/arcchecks the default/healthstartup probe and the unchanged liveness/readiness probes.helm template arc ./helm/arc --set startupProbeFailureThreshold=45checks the grace-period override.