From e4177679e117a0aafe65ff01aa3d3d05e69a54aa Mon Sep 17 00:00:00 2001 From: pingqiu Date: Thu, 26 Nov 2026 00:35:07 -0800 Subject: [PATCH] docs: what the blockmaster restart for a restore target does to serving volumes Adding a restore target to the cluster spec means restarting blockmaster. Serving volumes ride through a restart answered within 10 s; a longer one is fail-closed (fence at lease end, exit 75, serve again after the barrier, at least 50 s after the restart), each with the test that shows it. The start-wait text no longer describes a start that ends before the barrier, and the operator guide's host-loss step says the returning old host exits 78 and is not restarted. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/docs/operator-guide.md | 8 +++----- seaweed-block/docs/standalone-deployment.md | 4 +++- seaweed-block/docs/volume-lifecycle.md | 11 +++++++---- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/seaweed-block/docs/operator-guide.md b/seaweed-block/docs/operator-guide.md index 16b69c4dfd..1197d5f136 100644 --- a/seaweed-block/docs/operator-guide.md +++ b/seaweed-block/docs/operator-guide.md @@ -219,11 +219,9 @@ measured up to 15 s at 32 volumes with the default 3 slots. ## When a host is lost 1. Make sure the lost host stays down for this volume. The product does not power off an old holder. - - If it comes back after the move, its blockvolume gets no assignment, does not serve, and exits with status 75. - - The example unit starts it again about every 35 s (30 s of waiting, then `RestartSec=5s`), until its start - limit (10 starts in 600 s), and then shows it as failed (`start-limit-hit`). - - A process that was already waiting on its old assignment when the move was issued exits with status 78 - (`reason=moved`) instead, and the unit does not start it again. + - If it comes back after the move, blockmaster refuses its lease: it does not serve, logs `exiting status=78 + reason=moved` and exits 78, and the example unit does not start it again + (`TestProcedureForcedMoveWithTheOldHostReturning`). - Stop and disable that unit on the old host. Run `systemctl reset-failed` only after you have dealt with its local root ([do not](volume-lifecycle.md#do-not)). 2. Run the forced move to another registered node: `--dry-run` first, then the move. See diff --git a/seaweed-block/docs/standalone-deployment.md b/seaweed-block/docs/standalone-deployment.md index 97ac85fa38..1295526a35 100644 --- a/seaweed-block/docs/standalone-deployment.md +++ b/seaweed-block/docs/standalone-deployment.md @@ -606,7 +606,9 @@ A restore makes a new volume from a snapshot. The new volume reads every chunk i replica_id: r1 ``` - Restart blockmaster to read it. An entry without `size_bytes` creates no volume record; the restore creates it, with the snapshot's geometry. An entry with `size_bytes` creates an ordinary empty volume, and the restore into it is then refused with `target_exists` (`v2 is bound to another restore request`). + Restart blockmaster to read it (it reads the cluster spec only at start). Volumes already serving keep serving through a short restart: each holder renews every 10 s or less and may serve until 20 s after its last renewal (the 30 s lease less half the 20 s clock-skew margin, with defaults), so a blockmaster that answers again within 10 s interrupts nothing (`TestPhase0BaselineMasterKilledAndRestartedUnderWrites`: killed and back after 5 s, no guest write fails). A longer restart is fail-closed: a holder whose lease ends stops I/O, exits 75 (`reason=lease_expired`), is started again by the unit and waits, and serves again once blockmaster is back and its barrier has passed, at least 50 s after the restart (`TestPhase0BaselineMasterDown60sOneVolume`, `TestUnitSurvivesTenMinuteMasterOutage`). Add restore targets ahead of time, several at once, to restart less often. + + An entry without `size_bytes` creates no volume record; the restore creates it, with the snapshot's geometry. An entry with `size_bytes` creates an ordinary empty volume, and the restore into it is then refused with `target_exists` (`v2 is bound to another restore request`). 2. **Create the restore:** ```bash diff --git a/seaweed-block/docs/volume-lifecycle.md b/seaweed-block/docs/volume-lifecycle.md index e50345af49..1be1e95fc0 100644 --- a/seaweed-block/docs/volume-lifecycle.md +++ b/seaweed-block/docs/volume-lifecycle.md @@ -81,7 +81,8 @@ entry places the volume but creates no record; `sw-block ops chunk restore` creates the record, with the source snapshot's geometry. With `size_bytes` the entry creates an ordinary empty volume, and the restore into it is refused with `target_exists`. Use a new name: a name that was ever deleted is never -created again. +created again. blockmaster reads the cluster spec only at start, so adding the +target means restarting it: see [what that does to serving volumes](standalone-deployment.md#restoring-a-snapshot-into-a-new-volume). ```yaml - id: v2 # restore target: no size_bytes @@ -349,10 +350,12 @@ and logs `blockvolume: waiting for the master: since