Commit 84304c7
lvol: block all LVS ports (all roles) on network-outage self-detection
spdk_lvs_change_leader_state gated the whole block sequence (freeze,
block_port, add_reject_hublvol_port, leadership drop) on lvs->leader, so
on a JC-detected network outage only the current leaders blocked their
ports. But leadership can move during an outage — e.g. the primary goes
offline while a node is partitioned, so on recovery the secondary is the
new leader — leaving a follower's port unblocked while it comes back with
stale redirect/leadership state (2026-07-07 soak: LVS_1 tertiary served
IO paths it could not forward, then failed over into the live secondary
leader).
Scope the change to the network-outage path only: that caller uniquely
enters with groupid == 0 (api_bdev_distrib_set_non_leader() no-arg, from
the JC network-outage detector), whereas the writer-conflict and targeted
JC-signal callers pass a non-zero jm_vuid. So when groupid == 0, run the
full block for every LVS regardless of lvs->leader (the leadership-drop
lines are no-ops on a follower; freeze + block_port + hublvol-port reject
run the same as for a leader, subject to the existing node_role !=
NODE_TERTIARY guard). Non-zero groupid (conflict) is unchanged.
No new unblock needed: the hublvol-port reject self-clears via the
existing 10s spdk_lvs_remove_rules_poller; the subsystem block_port is
unblocked by the control plane on recovery (which now reopens all of the
node's LVS ports).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 06896dc commit 84304c7
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3528 | 3528 | | |
3529 | 3529 | | |
3530 | 3530 | | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
3531 | 3543 | | |
3532 | | - | |
| 3544 | + | |
3533 | 3545 | | |
3534 | 3546 | | |
3535 | 3547 | | |
| |||
0 commit comments