Commit 834b172
committed
feat(scripts): M5a — 4 gemini medium fixes on PR #924 (cleanup, nc, helper-presence)
gemini-code-assist medium findings on f618144:
* helper-binary presence guard (line 75) — with --no-rebuild,
$ROUTE_KEY_BIN / $LIST_ROUTES_BIN may not exist; the script
would fail with a misleading 'No such file or directory'
buried in set -e output. Added a for-loop guard that
checks all three helpers ([$ROUTE_KEY_BIN, $LIST_ROUTES_BIN,
$BINARY]) up-front and exits 1 with a clear remediation
message.
* nc -> /dev/tcp (line 140) — bash's built-in
(echo > /dev/tcp/127.0.0.1/63801) probe works on minimal
CI images that don't ship netcat. Same semantics (succeeds
iff the port accepts a TCP connection); no behavioural
change.
* trap stop_cluster EXIT INT TERM (line 99) — installed
BEFORE the cluster launch so an exception during launch
(bind-port collision, missing flag) still tears down the
half-started state. Covers normal exit, Ctrl-C, and CI
cancellation.
* trailing manual stop_cluster removed (line 184) — the
EXIT trap is the canonical teardown path; calling
stop_cluster manually would double-call on success
(harmless but noisy).
Verification: bash -n scripts/run-jepsen-m5-local.sh -> OK.1 parent f618144 commit 834b172
1 file changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
| |||
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| |||
134 | 154 | | |
135 | 155 | | |
136 | 156 | | |
137 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
138 | 161 | | |
139 | 162 | | |
140 | 163 | | |
| |||
178 | 201 | | |
179 | 202 | | |
180 | 203 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
185 | 210 | | |
186 | 211 | | |
0 commit comments