mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
docs: the failover holds, the ack profile rule, delete and move answers
- best-effort volumes and an ack-profile mismatch are held, not failed
over by themselves (best_effort_no_automatic_failover,
ack_profile_mismatch); blockmaster refuses an unknown
--launcher-replication-ack.
- Change the ack profile only with the replicated volumes stopped; a
primary assigned under another profile does not serve and says so.
- A volume created at run time and not in the cluster spec is served only
with the lifecycle loop on.
- volume-lifecycle: a delete under a live lease answers not_admitted
("deletion refused before persistence"); ordinary snapshots never refuse
a delete, a snapshot with dependents does (snapshot_has_dependents);
blockmaster has no same-host refusal for a forced move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
021cc4e3a7
commit
ecdaaaf59b
3 files changed
+37
-19
No files matched your search
@@ -220,11 +220,12 @@ measured up to 15 s at 32 volumes with the default 3 slots.
|
||||
|
||||
## When a host is lost
|
||||
|
||||
The steps below are for a single-replica volume. A replicated volume under
|
||||
`--cluster-spec` with the lifecycle loop on is failed over by blockmaster
|
||||
itself when its primary's heartbeat goes stale and enough replicas answer the
|
||||
fencing round; the operator's `sw-block ops failover` is for when that round
|
||||
cannot decide (see
|
||||
The steps below are for a single-replica volume. A `sync-quorum` or `sync-all`
|
||||
replicated volume under `--cluster-spec` with the lifecycle loop on is failed
|
||||
over by blockmaster itself when its primary's heartbeat goes stale and enough
|
||||
replicas answer the fencing round; the operator's `sw-block ops failover` is for
|
||||
when that round cannot decide, and for a `best-effort` volume, which is never
|
||||
failed over by itself (see
|
||||
[replicated volumes in this release](standalone-deployment.md)).
|
||||
|
||||
1. Make sure the lost host stays down for this volume. The product does not power off an old holder.
|
||||
|
||||
@@ -143,6 +143,9 @@ Do these steps before you start blockvolume:
|
||||
- creating a replicated volume is refused (`create volume: v1 has
|
||||
replication factor 3 but --lifecycle-product-loop-interval is 0
|
||||
(off): ...`).
|
||||
- a volume created at run time (`CreateVolume`) and not placed in the
|
||||
cluster spec is served only with the loop on; the shipped Kubernetes
|
||||
stacks set it. A refusal at create is planned for 1.0.1.
|
||||
- `--failback-runtime-rpc`: the operator's failover (`sw-block ops
|
||||
failover`, below) calls it. Without it there is no manual failover.
|
||||
|
||||
@@ -155,7 +158,14 @@ Do these steps before you start blockvolume:
|
||||
Set `--launcher-replication-ack` to the same mode as every replicated
|
||||
volume's blockvolume `--replication-ack`; the examples use `sync-quorum`.
|
||||
Both default to `best-effort`, which acknowledges a write with no replica
|
||||
(see Failover below).
|
||||
(see Failover below). blockmaster refuses to start with any other value
|
||||
(`--launcher-replication-ack="x" invalid; want best-effort, sync-quorum,
|
||||
or sync-all`). Change the profile (blockmaster's
|
||||
`--launcher-replication-ack` and every replicated volume's
|
||||
`--replication-ack`) only with the replicated volumes stopped: a primary
|
||||
whose line is assigned under another profile than its own does not serve
|
||||
and logs `ack profile mismatch: this volume runs --replication-ack X, its
|
||||
replicated line is assigned under Y; restart it with the master's profile`.
|
||||
|
||||
```bash
|
||||
blockmaster --authority-store /var/lib/sw-block-master/authority \
|
||||
@@ -185,8 +195,9 @@ Do these steps before you start blockvolume:
|
||||
start: one volume with another slot count stops assignment for all of
|
||||
them, and shows only as a controller error on every tick.
|
||||
- **Failover.** Under `--cluster-spec` with the lifecycle loop on,
|
||||
blockmaster replaces a lost primary by itself
|
||||
(`core/host/master/product_loop.go`, `applyPromotionEvidenceGate`).
|
||||
blockmaster replaces a lost primary of a `sync-quorum` or `sync-all`
|
||||
volume by itself (`core/host/master/product_loop.go`,
|
||||
`applyPromotionEvidenceGate`).
|
||||
- A primary whose heartbeat is stale (its host is off, or blockmaster
|
||||
cannot reach it), or that answers that it is not ready, is replaced
|
||||
through a fencing round. blockmaster fences the other replicas at the
|
||||
@@ -194,12 +205,19 @@ Do these steps before you start blockvolume:
|
||||
`--replication-ack` `sync-quorum` or `sync-all`, the new primary holds
|
||||
every write the old one acknowledged.
|
||||
- With `best-effort` (the default of `--replication-ack`) a write is
|
||||
acknowledged after the primary's own sync, with no replica. An
|
||||
automatic failover can then lose the writes acknowledged last, and an
|
||||
old primary that is only partitioned keeps accepting writes that the
|
||||
new primary never sees. Do not use it for a replicated volume whose
|
||||
acknowledged writes must survive a failover: set `--replication-ack`
|
||||
to `sync-quorum` (or `sync-all`).
|
||||
acknowledged after the primary's own sync, with no replica, so
|
||||
blockmaster does not replace a lost primary by itself: the volume
|
||||
waits and is shown as `best_effort_no_automatic_failover`. Only the
|
||||
operator's failover changes its primary, and it can lose the writes
|
||||
acknowledged last; an old primary that is only partitioned keeps
|
||||
accepting writes that the new primary never sees. For a replicated
|
||||
volume whose acknowledged writes must survive a failover, set
|
||||
`--replication-ack` to `sync-quorum` (or `sync-all`).
|
||||
- A volume whose replicas answer with no profile, or with another one
|
||||
than blockmaster's `--launcher-replication-ack`, is not replaced by
|
||||
itself either: it waits and is shown as `ack_profile_mismatch`, and
|
||||
the round names each answer (`master sync_quorum, answers
|
||||
r2=best_effort`).
|
||||
- A primary whose heartbeat is fresh but that does not answer the probe
|
||||
is unknown, not failed: it is not replaced by itself. Nor is a
|
||||
restarted primary inside its start grace.
|
||||
|
||||
@@ -502,8 +502,7 @@ follow from that order:
|
||||
`sw-block ops chunk snapshots` shows only published snapshots. If a snapshot request
|
||||
was interrupted after it took its name (the process crashed, or the caller gave up),
|
||||
the name does not appear in the list, yet another request for that name is refused
|
||||
with `snapshot_exists`, and deleting the volume is refused with `volume v1 has
|
||||
snapshots (NAME); delete them first`. Free it with
|
||||
with `snapshot_exists`. Free it with
|
||||
`sw-block ops chunk snapshot-delete --master MASTER --volume v1 --chunk-filer FILER --name NAME`,
|
||||
or finish it by repeating the request with the same `--request-id`.
|
||||
- **After `outcome_unknown`, repeat the request with the same `--request-id` within
|
||||
@@ -524,15 +523,15 @@ follow from that order:
|
||||
| `sw-block ops chunk detach: plain_detach_busy: durable: plain detach requires idle frontend I/O` | I/O was in flight; nothing changed | Stop the writer, retry step 3 |
|
||||
| detach answers `detach_aborted` | Nothing was published; the volume serves here again | Retry step 3 |
|
||||
| detach answers `outcome_unknown` | The seal may have landed; I/O stays stopped | Retry step 3: it settles the outcome |
|
||||
| volume-delete: `volume_in_use: ... live authority requires clean revocation ACK` | The volume was sealed (or only stopped) but never revoked and acknowledged; nothing was deleted | "Delete a volume", step 2 |
|
||||
| volume-delete: `volume v1 has snapshots (s1); delete them first` | Snapshots still exist, or a name is held by an unfinished request (such a name is not in the list); nothing was deleted | "Delete a volume", step 3; for a name that is not listed, "Snapshot names and retries" |
|
||||
| volume-delete: `not_admitted: ... workspace: deletion refused before persistence: workspace delete: live until <time>: ...` | The volume's lease is still live: it was not revoked and acknowledged, or its lease horizon has not passed; nothing was persisted | "Delete a volume", step 2, then run it again after the horizon |
|
||||
| volume-delete: `snapshot_has_dependents: ... layout: a snapshot has dependents: snapshot "s1" has 1` | A restored volume still depends on that snapshot; ordinary snapshots never refuse a delete (they are deleted with the volume); nothing was deleted | "Delete a volume", step 3 |
|
||||
| snapshot: `snapshot_exists ... this request's attempt was aborted; delete the name to reuse it` | An earlier attempt of this request did not finish and was swept | `snapshot-delete` the name, then take the snapshot again |
|
||||
| snapshot: `snapshot_deleting ... is being deleted; wait for the delete to finish, then reuse the name` | The request was repeated while its snapshot is being deleted | Wait for the delete to finish; take the snapshot again if it is still wanted |
|
||||
| revoke: `workspace revoke: no matching lease` | `--replica`/`--epoch` are not the current holder | Read them again with `show` |
|
||||
| move: `workspace clean move needs detached HEAD and matching revocation ACK` | No ACK yet, or its generation differs from HEAD | Wait for the ACK line (step 5); compare `G` with `ops chunk show` |
|
||||
| move: `move target node "S2" is not registered` | `S2` is not under `nodes` | Add it to the cluster spec, restart blockmaster |
|
||||
| move: `move target endpoints ... are not registered (...)` | The addresses are not on the node's host | Use addresses on that host |
|
||||
| move: `move target "s1" is the current source host` | A forced move named its own host | Choose another node |
|
||||
| A forced move names the volume's own host | blockmaster has no same-host refusal: the move is checked like any forced move (barrier, registered endpoints) | To bring the volume back on the same host, follow "Same host" instead |
|
||||
| old holder logs `blockvolume: workspace lease closeout: workspace lease expired before clean ACK` | Revoked, but no ACK | Only a forced move to another node remains (HEAD is sealed: if step 3 succeeded, nothing is lost) |
|
||||
| renewal fails with `workspace lease: revocation or move pending` | The volume was revoked or moved | The process cannot serve again; continue the hand-over |
|
||||
| renewal fails with `workspace lease: stale authority` | A move gave the volume a newer epoch | This process is the old holder: stop it, do not restart it |
|
||||
|
||||
Reference in new issue
Block a user