diff --git a/seaweed-block/core/host/master/product_loop.go b/seaweed-block/core/host/master/product_loop.go index 9d7631000d..7cbefae01c 100644 --- a/seaweed-block/core/host/master/product_loop.go +++ b/seaweed-block/core/host/master/product_loop.go @@ -414,6 +414,14 @@ func (h *Host) fencedDecision(volumeID string, current authority.AuthorityBasis, h.log.Printf("blockmaster: promotion gate volume=%s fencing round at %d failed: %v", volumeID, current.Epoch+1, err) return plain, map[string]bool{} } + // The fencing round's answers are the evidence the decision uses, so + // their profiles are checked again: a survivor reconfigured between the + // two rounds holds the volume like a mismatch in the plain round. + if fenced.ProfileMismatch != "" { + h.log.Printf("blockmaster: promotion gate volume=%s fencing round at %d: ack profile mismatch (%s); nothing published", volumeID, fenced.FencedEpoch, fenced.ProfileMismatch) + h.recordVolumeBlockedEvent(volumeID, ops.ReasonAckProfileMismatch) + return fenced, map[string]bool{} + } fenced.AckProfile, fenced.SyncAckLSN, fenced.SyncAckKnown = plain.AckProfile, plain.SyncAckLSN, plain.SyncAckKnown fenced.CurrentKnown, fenced.Current = plain.CurrentKnown, plain.Current counted := map[string]bool{} diff --git a/seaweed-block/core/host/master/services.go b/seaweed-block/core/host/master/services.go index 5356b879ce..5f7b838e6a 100644 --- a/seaweed-block/core/host/master/services.go +++ b/seaweed-block/core/host/master/services.go @@ -1176,6 +1176,18 @@ func (h *Host) ingestHeartbeatRecordingHealth(msg authority.HeartbeatMessage) er return nil } +// lineAckProfile is the master's ack profile in canonical form, as every +// assignment names it ("" when the promotion gate has none configured). +func (h *Host) lineAckProfile() string { + h.promotionMu.RLock() + prober := h.promotionProber + h.promotionMu.RUnlock() + if ap, ok := prober.(ackProfiled); ok { + return canonicalAckProfile(ap.AckProfile()) + } + return "" +} + // assignmentFact encodes one captured publication at the stream boundary. func (s *services) assignmentFact(info adapter.AssignmentInfo) *control.AssignmentFact { fact := &control.AssignmentFact{ @@ -1191,6 +1203,7 @@ func (s *services) assignmentFact(info adapter.AssignmentInfo) *control.Assignme EvidenceEpoch: info.Primary.DataEpoch, EvidenceFirstLsn: info.Primary.DataFirstLSN, LineIncarnation: info.Incarnation, + AckProfile: s.host.lineAckProfile(), } if info.Primary.StoreID != ([16]byte{}) { id := info.Primary.StoreID diff --git a/seaweed-block/core/host/volume/host.go b/seaweed-block/core/host/volume/host.go index 545ca4c84b..1bd1073375 100644 --- a/seaweed-block/core/host/volume/host.go +++ b/seaweed-block/core/host/volume/host.go @@ -180,6 +180,10 @@ type Host struct { // storeWait: the primary fact's replica-store wait (ReplicaStoresAwaited, // awaitingStoresEpoch), one value under its own lock. storeWait storeWait + // ackProfileRefusal (string; "" = none): the last primary fact named a + // replicated line under another ack profile than this volume's own + // (AckProfileRefusal); while set the frontend is not Healthy. + ackProfileRefusal atomic.Value // roleRetry: the last replica role call failed with an error a retry // may outlast (a floor that could not be persisted); runRoleRetry // re-applies the current role until it succeeds or is refused for good. @@ -1115,6 +1119,9 @@ func (h *Host) applyFact(fact *control.AssignmentFact) { } h.recordSelfAssignment(fact) + // A primary of a replicated line serves only under the master's ack + // profile: set (or cleared) before anything below can open the frontend. + h.noteAckProfile(fact) // A fact that awaits replica stores closes the frontend at once; one // that carries them all opens it only after the peers' expected stores // are installed (below), so no write is served before its peers count. diff --git a/seaweed-block/core/host/volume/projection_bridge.go b/seaweed-block/core/host/volume/projection_bridge.go index 583523b16b..475a40f396 100644 --- a/seaweed-block/core/host/volume/projection_bridge.go +++ b/seaweed-block/core/host/volume/projection_bridge.go @@ -107,7 +107,7 @@ func (v *AdapterProjectionView) projectionWithSupersede() (frontend.Projection, p := v.projector.Projection() healthy := p.Mode == engine.ModeHealthy superseded := healthy && v.isSupersededLine(p.Epoch, p.EndpointVersion) - if superseded || (healthy && v.supportingReplicaReady(p.Epoch, p.EndpointVersion)) || v.roleAdmissionFailed() || v.replicaStoresAwaited() != "" { + if superseded || (healthy && v.supportingReplicaReady(p.Epoch, p.EndpointVersion)) || v.roleAdmissionFailed() || v.replicaStoresAwaited() != "" || v.ackProfileRefusal() != "" { healthy = false } result := frontend.Projection{ @@ -167,6 +167,20 @@ func (v *AdapterProjectionView) replicaStoresAwaited() string { return probe.ReplicaStoresAwaited() } +// ackProfileRefusal: a primary of a replicated line assigned under another +// ack profile than its own serves nothing (Host.AckProfileRefusal); "" when +// it may serve. +func (v *AdapterProjectionView) ackProfileRefusal() string { + if v == nil || v.probe == nil { + return "" + } + probe, ok := v.probe.(interface{ AckProfileRefusal() string }) + if !ok { + return "" + } + return probe.AckProfileRefusal() +} + // roleAdmissionFailed is the G1 admission latch from the volume host: a role // call on its replica listener failed (floor not durable, or fence not // drained). Healthy is false until a later role call succeeds, even when the diff --git a/seaweed-block/core/host/volume/status_server.go b/seaweed-block/core/host/volume/status_server.go index c067540691..ccc09faad0 100644 --- a/seaweed-block/core/host/volume/status_server.go +++ b/seaweed-block/core/host/volume/status_server.go @@ -571,6 +571,8 @@ func (s *StatusServer) statusProjection() StatusProjection { p.NotReadyReason = backendReason case s.view.replicaStoresAwaited() != "": p.NotReadyReason = s.view.replicaStoresAwaited() + case s.view.ackProfileRefusal() != "": + p.NotReadyReason = s.view.ackProfileRefusal() case nvmePending: p.NotReadyReason = "frontend target not listening yet" case !authorityReady: diff --git a/seaweed-block/core/host/volume/workspace_startup.go b/seaweed-block/core/host/volume/workspace_startup.go index fb3b3a7111..bceb7520e2 100644 --- a/seaweed-block/core/host/volume/workspace_startup.go +++ b/seaweed-block/core/host/volume/workspace_startup.go @@ -2,6 +2,7 @@ package volume import ( "fmt" + "strings" "sync" control "github.com/seaweedfs/seaweed-block/core/rpc/control" @@ -81,3 +82,40 @@ func (h *Host) IsCurrentReplicaSuperseded() bool { defer h.ownAssignmentMu.RUnlock() return h.IsSuperseded(h.cfg.ReplicaID, h.ownAssignmentEpoch, h.ownAssignmentEV) } + +// noteAckProfile records whether this primary fact's line may be served: a +// replicated line (one with peers) is served only when its assignment names +// this volume's own ack profile. A later failover reads the writes this +// primary acknowledged by the master's profile, and the primary may not +// answer then; so a primary in another profile never acknowledges at all. +func (h *Host) noteAckProfile(f *control.AssignmentFact) { + reason := "" + if len(f.GetPeers()) > 0 { + want, own := canonicalAckProfile(f.GetAckProfile()), canonicalAckProfile(h.cfg.AckProfile) + if want != own { + reason = fmt.Sprintf("ack profile mismatch: this volume runs --replication-ack %s, its replicated line is assigned under %s; restart it with the master's profile", profileName(own), profileName(want)) + } + } + if prev, _ := h.ackProfileRefusal.Load().(string); prev != reason && reason != "" { + h.log.Printf("blockvolume: volume %s primary at epoch=%d does not serve: %s", h.cfg.VolumeID, f.GetEpoch(), reason) + } + h.ackProfileRefusal.Store(reason) +} + +// AckProfileRefusal is why this primary serves nothing under its current +// line's ack profile, or "". +func (h *Host) AckProfileRefusal() string { + reason, _ := h.ackProfileRefusal.Load().(string) + return reason +} + +func canonicalAckProfile(p string) string { + return strings.ToLower(strings.ReplaceAll(p, "-", "_")) +} + +func profileName(p string) string { + if p == "" { + return "(none)" + } + return p +} diff --git a/seaweed-block/docs/design/invariants.md b/seaweed-block/docs/design/invariants.md index 9c107d0c51..da9070e8b2 100644 --- a/seaweed-block/docs/design/invariants.md +++ b/seaweed-block/docs/design/invariants.md @@ -252,7 +252,7 @@ RF2 qualification limitation until ordered-live certification is wired (#297). S | Excluded | Excluded (no change) | an older recorded foreign fact cannot replace the newer epoch/endpoint-version fence; a stale replay cannot re-enable the frontend | `core/host/volume/host.go` `recordOtherLine`, `IsSuperseded` | `INV-AUTH-HOLDER-IDENTITY-001` | | any | role admission failed | the listener cannot be fenced or its floor cannot be persisted; the role is not adopted and the projection is not healthy | `core/host/volume/host.go` `latchRoleAdmission` | `INV-FENCE-FLOOR-DURABLE-001` | | (every inbound frame) | — | a mutating frame is refused on a primary, below the floor, or before a role is known; the rebuild port applies the same rules; a failed apply closes the connection | `core/transport/replica.go` `acceptMutationLineage`, `admitMutation`, `EnterDualLane`, `handleConn` | `INV-FENCE-SELF-ON-PROMOTE-001`, `INV-FENCE-FLOOR-DURABLE-001`, `INV-REPL-REBUILD-PORT-FENCE-001`, `INV-REPL-APPLY-FAIL-001` | -| Supporting | promotion candidate | no active recovery session; member, reachable, caught up, fenced at the current epoch, post-rebuild durable acknowledgement delivered; for RF=2 and up also a fresh probe and coverage of the required frontier: known, or proven by at least N_peers-K+1 fresh ready peers when it is unknown | `core/engine/promotion_ready.go` `BuildPromotionReadyFact`; `core/host/master/product_loop.go` `applyPromotionEvidenceGate` | `INV-REPL-PROMOTION-READY-001`, `INV-PROMOTE-FRONTIER-001`, `INV-PROMOTE-FRONTIER-PROBE-001`, `INV-PROMOTE-FRONTIER-UNKNOWN-001` | +| Supporting | promotion candidate | no active recovery session; member, reachable, caught up, fenced at the current epoch, post-rebuild durable acknowledgement delivered; for RF=2 and up also a fresh probe and coverage of the required frontier: known, or proven by at least N_peers-K+1 fresh ready peers when it is unknown; on the automatic path also a non-`best_effort` master profile that every answer of the plain and the fencing round states (a primary of a replicated line serves only under the profile its assignment names) | `core/engine/promotion_ready.go` `BuildPromotionReadyFact`; `core/host/master/product_loop.go` `applyPromotionEvidenceGate`, `automaticFailoverHold`, `fencedDecision`; `core/host/volume/workspace_startup.go` `noteAckProfile` | `INV-REPL-PROMOTION-READY-001`, `INV-PROMOTE-FRONTIER-001`, `INV-PROMOTE-FRONTIER-PROBE-001`, `INV-PROMOTE-FRONTIER-UNKNOWN-001`, `INV-PROMOTE-FRONTIER-BEST-EFFORT-001`, `INV-PROMOTE-ACK-PROFILE-MATCH-001`, `INV-PRIMARY-ACK-PROFILE-001` | | Primary (unreachable) | another replica Primary at e+1 | the operator's failover (`ExecuteFailback`) of a line whose primary has no fresh, reachable heartbeat slot: the fence is pending from the attempt; the fencing round fences every other replica at e+1; only `fencedDecision`'s allowed target is published, basis Fenced at e+1, through the line's conditional update (a concurrent promotion-loop decision at the same epoch is refused); a refused or unpublished round is healed by either gate (the line's own primary continued at e+1); `best_effort` is refused, and a reachable RF3 `sync_quorum` primary's move stays refused (needs a seal) | `core/host/master/planned_move.go` `plannedMoveEvidence`, `primaryUnreachable`, `fencedMoveEvidence`; `core/host/master/product_loop.go` `applyPromotionEvidenceGate`, `applyUnsupportedPromotionEvidenceGate` | `INV-PROMOTE-UNKNOWN-CURRENT-001` | **Recovery observation and apply ordering.** A probe publishes its fresh boundaries before reachability, and each emitted recovery is prepared under the adapter mutex before the next event. Same-identity delayed probes retain completed durable R; missing probe boundaries remain unknown until a valid observation arrives. Every lane and session shares one replica-wide per-LBA applied-LSN map under the apply mutex; session close releases coverage only. Recovery skips stale data while advancing its own coverage; stale live data fails without advancing recovery coverage. @@ -987,7 +987,8 @@ Notes: | `INV-PROMOTE-UNKNOWN-CURRENT-001` | A current primary whose status cannot be read (probe refused, timed out, pod gone) is unknown, never failed: no promotion path reassigns on it; a direct reassign needs the primary's own not-ready report. | M3 Primary → promotion candidate (both promotion paths) | `core/host/master/product_loop.go` `applyPromotionEvidenceGate` (supported path), `applyUnsupportedPromotionEvidenceGate` (unsupported path) | `TestUnsupportedPathNeverReassignsOnAnUnansweredPrimary` (`core/host/master/primary_boot_grace_gate_test.go`); `TestMountedFailover_ProductLoopRF3DoesNotReassignWhenCurrentSlotMissing` (`core/host/master/product_loop_test.go`). Limits: Kubernetes alpha failover on node or pod loss is a manual admin action in this release; the admin's failover runs the fencing round and publishes only on its decision (basis Fenced) when the primary is unreachable (no fresh, reachable heartbeat; any replica count); a reachable RF3 `sync_quorum` primary's move stays refused (it needs a seal) and `best_effort` stays refused (`core/host/master/planned_move.go` `fencedMoveEvidence`; `TestManualFailoverRF3SyncQuorumDecidesOnTheFencingRound`, `TestManualFailoverRF2UnreachablePrimaryDecidesOnTheFencingRound`, `TestManualFailoverRF2BestEffortIsNeverFenced`, `TestManualFailoverRF3ReachablePrimaryIsRefused`, `TestManualFailoverAndThePromotionLoopPublishOneLine`) | — | ACTIVE | | `INV-PROMOTE-FRONTIER-UNKNOWN-001` | With an unknown frontier under `sync_quorum` or `sync_all`, the gate allows the highest-durable ready candidate only if at least N_peers-K+1 of the N_peers peers are probed ready this tick and have a fresh heartbeat (K as in `waitForSyncAcks`); else none. | M3 Supporting → promotion candidate (RF=3 gate) | `core/host/master/product_loop.go` `promotionAllowedReplicas`, `unknownFrontierSurvivorsNeeded`, `freshPromotionPeers`; `core/replication/async_ack.go` `waitForSyncAcks` | `TestMountedFailover_ProductLoopRF3UnknownRequiredLSNFallsBackToHighestDurableLSN` (`core/host/master/product_loop_test.go`); `TestProductLoop_MissingRequiredFrontierRefusesRF3Promotion` (`core/host/master/promotion_missing_frontier_regression_test.go`); `TestUnknownFrontierSurvivorsNeeded`, `TestFreshPromotionPeers_UsesObservationFreshness`, `TestProductLoop_UnknownFrontierSurvivorReadyLastTickMissingNowRefused` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE | | `INV-PROMOTE-FRONTIER-BEST-EFFORT-001` | The automatic path never replaces a lost primary of a `best_effort` volume (a write may be on the primary alone, as for the operator's move): both gates hold it before any fencing round and show `best_effort_no_automatic_failover`. | M3 Supporting → promotion candidate (both gates) | `core/host/master/product_loop.go` `automaticFailoverHold` (supported gate before `fencedDecision`; unsupported gate before its candidates); `promotionAllowedReplicas` | `TestTheAutomaticPathHoldsABestEffortVolume` (`core/host/master/best_effort_hold_test.go`); `TestMountedFailover_ProductLoopRF3BestEffortIsHeldDespiteAHighestDurableSurvivor`, `TestMountedFailover_ProductLoopRF3RejectsBestEffortProbeForHA` (`core/host/master/product_loop_test.go`); `TestPromotionAllowedReplicas_RequiredFrontierCoverage` (`core/host/master/promotion_frontier_coverage_test.go`) | — | ACTIVE | -| `INV-PROMOTE-ACK-PROFILE-MATCH-001` | The automatic path holds a lost primary's volume, before any fencing round and showing `ack_profile_mismatch`, when a probe answer names no ack profile or another than blockmaster's `--launcher-replication-ack`; blockmaster refuses to start with an unknown one. | M3 Supporting → promotion candidate (both gates) | `core/host/master/probe_round.go` `profileMismatch`; `core/host/master/product_loop.go` `automaticFailoverHold`; `core/host/volume/probe_round.go` `probeAnswer`; `cmd/blockvolume/main.go` `hostConfig`; `cmd/blockmaster/main.go` `parseFlags` | `TestTheAutomaticPathHoldsOnAnAckProfileMismatch`, `TestProbeRound_ReportsAnAckProfileMismatch` (`core/host/master/ack_profile_mismatch_test.go`); `TestProbeAnswerNamesTheVolumesAckProfile` (`core/host/volume/probe_ack_profile_test.go`); `TestHostConfigAnswersTheVolumesOwnAckProfile` (`cmd/blockvolume/probe_ack_profile_test.go`); `TestBlockmasterRefusesAnUnknownLauncherReplicationAck` (`cmd/blockmaster/launcher_replication_ack_flag_test.go`) | — | ACTIVE | +| `INV-PROMOTE-ACK-PROFILE-MATCH-001` | The automatic path holds a lost primary's volume, before any fencing round and showing `ack_profile_mismatch`, when a probe answer names no ack profile or another than blockmaster's `--launcher-replication-ack`; blockmaster refuses to start with an unknown one. | M3 Supporting → promotion candidate (both gates) | `core/host/master/probe_round.go` `profileMismatch`; `core/host/master/product_loop.go` `automaticFailoverHold` (plain round), `fencedDecision` (fencing round); `core/host/volume/probe_round.go` `probeAnswer`; `cmd/blockvolume/main.go` `hostConfig`; `cmd/blockmaster/main.go` `parseFlags` | `TestTheAutomaticPathHoldsOnAnAckProfileMismatch`, `TestProbeRound_ReportsAnAckProfileMismatch`, `TestTheFencingRoundsAckProfileIsCheckedToo` (`core/host/master/ack_profile_mismatch_test.go`); `TestProbeAnswerNamesTheVolumesAckProfile` (`core/host/volume/probe_ack_profile_test.go`); `TestHostConfigAnswersTheVolumesOwnAckProfile` (`cmd/blockvolume/probe_ack_profile_test.go`); `TestBlockmasterRefusesAnUnknownLauncherReplicationAck` (`cmd/blockmaster/launcher_replication_ack_flag_test.go`) | — | ACTIVE | +| `INV-PRIMARY-ACK-PROFILE-001` | A primary of a replicated line serves only when its own `--replication-ack` is the profile its assignment names (blockmaster's); otherwise its frontend is not Healthy and status names both profiles. So a lost primary, which does not answer, acknowledged under the master's profile. | M1 Primary → Serving (replicated line) | `core/host/master/services.go` `assignmentFact` (`ack_profile`); `core/host/volume/workspace_startup.go` `noteAckProfile`; `core/host/volume/projection_bridge.go` `projectionWithSupersede`; `core/host/volume/status_server.go` | `TestPrimaryOfAReplicatedLineServesOnlyUnderTheMastersAckProfile` (`core/host/volume/ack_profile_refusal_test.go`); `TestAssignmentNamesTheMastersAckProfile` (`core/host/master/ack_profile_mismatch_test.go`) | — | ACTIVE | | `INV-CSI-CONSUMES-AUTHORITY-001` | CSI never imports authority code or builds assignment facts; it takes the publish target from blockmaster and refreshes it before a stage, and blockmaster mints the IDs of the events CSI reports. | M2 (read side) | `core/csi/master_backend.go` `LookupPublishTarget`; `core/csi/node.go` `refreshPublishContext`; `core/host/master/observation_service.go` `ReportClusterEvent` | `TestG15a_CSI_DoesNotImportAuthorityOrConstructAssignmentFacts` (`core/csi/boundary_guard_test.go`); `TestG15e_CSIReattachUsesFreshPublishTargetAfterUnstage` (`core/csi/node_test.go`); `TestObservationService_ReportClusterEventAppearsInVolumeTimeline` (`core/host/master/observation_service_test.go`) | — | ACTIVE | | `INV-K8S-NONLOOPBACK-001` | Generated multi-node Helm values enable external iSCSI, external status and loopback rejection; with rejection enabled CSI never publishes a loopback target and fails closed when only loopback targets exist. | M2 (read side) | `cmd/sw-block/main.go` `runOpsGenerateHelmValues`; `core/csi/master_backend.go` `rejectFrontendAddr` | `TestOpsGenerateHelmValuesMultiNodeExternalISCSI` (`cmd/sw-block/main_test.go`); `TestNodeLoss_ControlStatusLookup_RejectsLoopbackPublishTargetsWhenEnabled`, `TestNodeLoss_ControlStatusLookup_FailClosedWhenOnlyLoopbackTargets` (`core/csi/master_backend_test.go`) | — | ACTIVE | | `INV-OBS-PRODUCT-EVENTS-001` | blockmaster records placement-verified, promotion-candidate-evaluation and authority-published events, and the CSI node reports `csi_reattach_observed` after a successful stage. | M3 promotion decision (observation) | `core/host/master/product_loop.go` `recordPlacementVerifiedEvents`, `recordPromotionEvaluationEvents`, `recordAuthorityPublishedEvent` | `TestMasterTimeline_RecordsPlacementVerified`, `TestMasterTimeline_RecordsPromotionCandidateEvaluation`, `TestMasterTimeline_RecordsAuthorityPublishedAfterMint` (`core/host/master/event_ring_test.go`); `TestNodeStage_ReportsCSIReattachObservedAfterSuccessfulStage` (`core/csi/node_test.go`) | — | ACTIVE | diff --git a/seaweed-block/docs/design/kubernetes-block-design.md b/seaweed-block/docs/design/kubernetes-block-design.md index ab710d8a3b..d944668306 100644 --- a/seaweed-block/docs/design/kubernetes-block-design.md +++ b/seaweed-block/docs/design/kubernetes-block-design.md @@ -208,7 +208,7 @@ The volume computes whether it may become primary; blockmaster decides; only the | 5 | `post_close_durable_ack_needed` | a recovered replica has not delivered its post-rebuild durable acknowledgement | | 6 | `promotion_ready` | all checks pass | -**RF=3 gate** (`core/host/master/promotion_probe.go`, `promotionAllowedReplicas`, `chooseAllowedPromotionTarget`): no promotion when the probe failed or is not installed, or the ack profile is unknown; a candidate is skipped when it is not `replica_ready` with a known frontier, or its durable LSN is below the required frontier. The decision is recorded as an ops event (`candidate_covers_required_frontier`, `candidate_frontier_behind`, `no_promotion_ready_candidate`). The required frontier per volume (`RequiredLSNByVolume`) is not set by `cmd/blockmaster` today, so the frontier is unknown and coverage is proven from the survivors instead: with `sync_quorum` or `sync_all`, the ready candidate with the highest durable LSN is promoted only when at least P-K+1 of the P peers are probed ready (known durable LSN) and have a fresh heartbeat, where K is the number of peer acks a write needs (`waitForSyncAcks`: P for `sync_all`, (P+1)/2 for `sync_quorum`). Any P-K+1 peers include one that holds every acknowledged write that their sampled frontiers represent. The probes of one tick are snapshots, not a fence: a primary that is still running can acknowledge after a sample was taken (for example, r3 reports 70 in a held probe response, the old primary then acknowledges 71, and r2 at 70 is still selected). That is the missing primary lease below (§12, #195). For RF=3 that is both peers under `sync_quorum` and one under `sync_all`; with fewer, nothing is promoted. An unknown frontier is never read as zero. `best_effort` is unchanged (§12). +**RF=3 gate** (`core/host/master/promotion_probe.go`, `promotionAllowedReplicas`, `chooseAllowedPromotionTarget`): no promotion when the probe failed or is not installed, or the ack profile is unknown; a candidate is skipped when it is not `replica_ready` with a known frontier, or its durable LSN is below the required frontier. The decision is recorded as an ops event (`candidate_covers_required_frontier`, `candidate_frontier_behind`, `no_promotion_ready_candidate`). The required frontier per volume (`RequiredLSNByVolume`) is not set by `cmd/blockmaster` today, so the frontier is unknown and coverage is proven from the survivors instead: with `sync_quorum` or `sync_all`, the ready candidate with the highest durable LSN is promoted only when at least P-K+1 of the P peers are probed ready (known durable LSN) and have a fresh heartbeat, where K is the number of peer acks a write needs (`waitForSyncAcks`: P for `sync_all`, (P+1)/2 for `sync_quorum`). Any P-K+1 peers include one that holds every acknowledged write that their sampled frontiers represent. The probes of one tick are snapshots, not a fence: a primary that is still running can acknowledge after a sample was taken (for example, r3 reports 70 in a held probe response, the old primary then acknowledges 71, and r2 at 70 is still selected). That is the missing primary lease below (§12, #195). For RF=3 that is both peers under `sync_quorum` and one under `sync_all`; with fewer, nothing is promoted. An unknown frontier is never read as zero. The automatic path never fails over a `best_effort` volume (a write may be on the primary alone; the volume shows `best_effort_no_automatic_failover`), and it holds a volume, showing `ack_profile_mismatch`, when any answer of the plain or the fencing round states no ack profile or another than blockmaster's. Every assignment names blockmaster's profile, and a primary of a replicated line in another profile does not serve, so a lost primary that cannot answer acknowledged under the master's profile. **A current primary that does not answer is unknown, not failed.** When its status cannot be read (a pod gone, a partition), blockmaster does not reassign on either path, however ready the survivors: on a partition the primary may still be serving. Only the primary's own not-ready report moves the line automatically; otherwise failover is a manual admin action in this release. The admin's failover of an unreachable primary (no fresh, reachable heartbeat) is decided on the fencing round, at any replica count: every other replica is fenced at N+1, the target must hold the highest fenced end and be ready, and the line carries basis Fenced; a round that publishes nothing leaves the fence pending, and the line's own primary is continued at N+1 when it answers ready again. The round stops the old primary's writes, not its reads: confirm the old node is off or cut from its clients first.