mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
72fc5ae349
commit
e4177679e1
3 files changed
+13
-10
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: <reason> since <time> (no bound)`
|
||||
the reason changes and every 10 minutes (`/status` shows the same as `MasterWait`).
|
||||
The wait ends 30 seconds after the first answer received once the local store is
|
||||
open and recovered, or 30 seconds after the master's barrier time when that is later
|
||||
(fixed, no flag): a slow open does not use up the wait. If the
|
||||
grant comes inside the wait, the process serves. If it does not, the process logs
|
||||
(fixed, no flag): a slow open does not use up the wait, and a start before the
|
||||
barrier waits through it and serves once re-granted
|
||||
(`TestProcedureStartInsideTheBarrierWaitIsReGranted`). Only when blockmaster keeps
|
||||
answering without a grant for 30 seconds past its barrier does the process log
|
||||
`durable: chunk authority wait for volume=v1 ended after ...: assignment unavailable,
|
||||
not serving (...)` and exits with `blockvolume: exiting status=75
|
||||
not serving (...)` and exit with `blockvolume: exiting status=75
|
||||
reason=assignment_timeout`; the unit starts it again. A master outage therefore costs
|
||||
at most one restart (the holder's lease fence), not the unit's start limit (10 starts
|
||||
in 10 minutes). A master that answers and drops in turn postpones the 30 seconds for
|
||||
|
||||
Reference in new issue
Block a user