ci(cluster): harden the two-instance smoke — nginx probe, SIGTERM drain, nightly tier (Phase 0.4) - #908
Open
aacruzgon wants to merge 1 commit into
Open
Conversation
…in, nightly tier, build features The skeleton probed nginx by proxying /health to instances that were not started yet; with nginx's default max_fails=1 fail_timeout=10s those refused connects blacklisted both upstreams for 10s, so the smoke's first request through the front could land inside that window as "no live upstreams". The stop step also used SIGINT, which is not what a rolling deploy sends. - Upstreams carry max_fails=0 and readiness probes an nginx-local /nginx-health location, so the probe never touches the upstreams. - The stop step sends SIGTERM and asserts each instance drains: it must exit within 10s and log the drain line; needing SIGKILL fails the step. - A `nightly` dispatch input plus a 06:00 UTC schedule set a NIGHTLY env for the recovery cases later cluster PRs add. - hfs is built with subscriptions and elasticsearch so later cases need no workflow change; a build-hts job produces hts-cluster-smoke-binary for the terminology cache-coherency case. Tests: YAML validated locally; dispatched on the branch (the run is linked from the PR). The smoke script is unchanged.
Contributor
Author
|
Smoke dispatched on this branch: https://github.com/HeliosSoftware/hfs/actions/runs/33669817656 — green on the first run. Both build jobs (including the new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #907 (the stop step asserts the SIGTERM drain that PR adds). Base branch is
cluster/p0.3-sigterm; GitHub retargets tomainwhen #907 merges.Summary
Phase 0.4 of the cluster-capable-state rebuild (discussion #223): hardens the two-instance smoke harness (
cluster-smoke.yml) so later cluster cases can add checks without touching the workflow's plumbing, and fixes a readiness-probe bug that made the skeleton flaky.Changes
/healthto instances that were not started yet; with nginx's defaultmax_fails=1 fail_timeout=10s, those refused connects blacklisted both upstreams for 10 s, and the smoke's first front request landed inside that window as502 no live upstreams. Bothserverlines now carrymax_fails=0, and readiness probes an nginx-locallocation = /nginx-healthwithcurl -sf.kill -TERMand its log must contain the drain line; needing SIGKILL fails the step (the process is still killed so nothing leaks). This is the CI proof for fix(hfs): drain on SIGTERM as well as Ctrl-C (Phase 0.3) #907.workflow_dispatchgains a booleannightlyinput and aschedule(0 6 * * *); a workflow-levelNIGHTLYenv is true on either, so the kill-9 recovery steps that later PRs add can gate on it. Scheduled runs executemain's copy of the file.hfsbinary is built withR4,postgres,subscriptions,elasticsearchso the WebSocket fan-out and composite-sync cases do not have to change this job; the R4/postgres smoke ignores the extra features. A secondbuild-htsjob buildshelios-hts --features R4,postgresintohts-cluster-smoke-binaryfor the terminology cache-coherency case.The smoke script itself is unchanged: health, round-robin, and CRUD A→B.
Testing
build,build-hts,cluster-smoke; triggersworkflow_dispatch,schedule.gh workflow run cluster-smoke.yml --ref cluster/p0.4-smoke-hardening): see the run linked in the PR conversation. Expected: the three skeleton checks pass, the nginx readiness step no longer needs a 502 window, and the stop step reports both instances drained on SIGTERM.Notes
shutdown_signal().subscriptionsandelasticsearchinto the smoke binary lengthens the build job somewhat; it is a one-time cost that saves a workflow change per later phase.