You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ha): fix passphrase flag and failover kill cardinality check
Replace non-existent --evnode.signer.passphrase with the actual
--evnode.signer.passphrase_file flag throughout cluster-setup and
single-to-ha guides. Update passphrase setup to create a chmod 600
file at /etc/ev-node/passphrase referenced directly by the flag.
Add mapfile-based cardinality check in the failover test fallback
kill command to guard against killing the wrong process.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/guides/ha/cluster-setup.md
+29-19Lines changed: 29 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,22 @@ Do this for every node pair in both directions. If any check fails, fix your fir
72
72
73
73
Run this on every node. Each node gets its own home directory where the config, keys, and data live.
74
74
75
+
First, create a passphrase file that only root and the service account can read. This file is referenced by the binary at runtime — the passphrase never appears in process listings or logs.
76
+
75
77
```bash
76
-
# Run on every node (the binary name depends on your chain)
> Set `EV_SIGNER_PASSPHRASE` in your shell session before running this command so the passphrase does not appear in `ps aux` or your shell history. The [EnvironmentFile setup](#running-as-a-systemd-service) later in this guide shows how to store it securely.
85
+
Then initialize the node:
86
+
87
+
```bash
88
+
# Run on every node (the binary name depends on your chain)
@@ -287,10 +294,14 @@ With all five nodes running and producing blocks, simulate a leader failure:
287
294
# Preferred: use the systemd unit if ev-node runs as a service
288
295
sudo systemctl stop ev-node
289
296
290
-
# Fallback: stop the process directly (verify exactly one PID before killing)
291
-
PID=$(pgrep -f "evm start")
292
-
echo "Stopping PID $PID"
293
-
kill -SIGTERM "$PID"
297
+
# Fallback: stop the process directly
298
+
mapfile -t PIDS < <(pgrep -f "evm start")
299
+
if [ "${#PIDS[@]}" -ne 1 ]; then
300
+
echo "Expected exactly 1 evm PID, found ${#PIDS[@]}: ${PIDS[*]}"
301
+
exit 1
302
+
fi
303
+
echo "Stopping PID ${PIDS[0]}"
304
+
kill -SIGTERM "${PIDS[0]}"
294
305
```
295
306
296
307
Within `election_timeout` (368ms in this configuration), the remaining four nodes will elect a new leader and resume block production. Measure the actual gap in your logs:
@@ -308,16 +319,16 @@ The gap should be well under 1 second in most cases (a few election cycles at mo
308
319
309
320
For production, manage each node with systemd.
310
321
311
-
### Create the environment file
322
+
### Create the passphrase file
312
323
313
-
Store secrets in a file that only the service user can read. systemd loads it at start time, so the passphrase never appears in `ps aux`, `journalctl`, or the unit file itself.
324
+
If you did not create the passphrase file in Step 3, do it now. The file must exist on every node before the service starts:
314
325
315
326
```bash
316
-
# Run on every node
327
+
# Run on every node (skip if you already did this in Step 3)
317
328
sudo mkdir -p /etc/ev-node
318
-
echo "EV_SIGNER_PASSPHRASE=<YOUR_PASSPHRASE>" | sudo tee /etc/ev-node/env > /dev/null
319
-
sudo chmod 600 /etc/ev-node/env
320
-
sudo chown ev-node:ev-node /etc/ev-node/env
329
+
echo -n "<YOUR_PASSPHRASE>" | sudo tee /etc/ev-node/passphrase > /dev/null
0 commit comments