From ecdaaaf59bbba7975ec55e0f16f18c31a5617481 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Thu, 26 Nov 2026 16:12:09 -0800 Subject: [PATCH] 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 --- seaweed-block/docs/operator-guide.md | 11 ++++--- seaweed-block/docs/standalone-deployment.md | 36 +++++++++++++++------ seaweed-block/docs/volume-lifecycle.md | 9 +++--- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/seaweed-block/docs/operator-guide.md b/seaweed-block/docs/operator-guide.md index a767bfa4db..b1d3700086 100644 --- a/seaweed-block/docs/operator-guide.md +++ b/seaweed-block/docs/operator-guide.md @@ -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. diff --git a/seaweed-block/docs/standalone-deployment.md b/seaweed-block/docs/standalone-deployment.md index c27741956a..cb215ace67 100644 --- a/seaweed-block/docs/standalone-deployment.md +++ b/seaweed-block/docs/standalone-deployment.md @@ -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. diff --git a/seaweed-block/docs/volume-lifecycle.md b/seaweed-block/docs/volume-lifecycle.md index dcf384c846..6ed786a63d 100644 --- a/seaweed-block/docs/volume-lifecycle.md +++ b/seaweed-block/docs/volume-lifecycle.md @@ -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