A chunk layer that fences after startup (HEAD has another publication
owner) while the lease is still valid now latches the backend not
operational with that evidence, and the process owner chooses the
no-restart exit 78 head_fenced through processExit.choose. I/O is refused
from the fence itself.
The first-grant log line is written only for a reply that grants: a first
reply that revokes fences the guard and logs no grant.
The frontend-gate tests own their workers: cleanup is registered before
each worker starts and every receive is bounded.
docs/design/invariants.md: INV-WS-SERVE-LEASE-HELD-001 (V1-SPEC r2.37);
INV-FE-PRIMARY-READY-OPERATIONAL-001 statement within 300 characters, with
the runtime fence enforcement and tests; M1 diagram and table carry the
lease-held order and the runtime fence exit; C.W names the runVolume
receive of the stop waiter's result. 306 rows, 220 ACTIVE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A workspace primary whose lease guard is missing or holds no granted lease
now reports NotReadyReason=lease_not_held first (the guard decides, through
the new WorkspaceLeaseGuard.Held, the lease term permits already used). The
guard logs its first grant once, as "re-granted after N refused renewal(s)"
when renewals were refused first (a restart before the forced-move barrier),
with the request-start time in unix_ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restarted old holder (G-O2 r8) started its NVMe target unconditionally
at startup and reported FrontendPrimaryReady=true from the authority view
alone, before and after its chunk-layer claim was refused ("fenced, not
serving"). The admit gate refused every command with Namespace Not Ready,
but that status is retried on the same path and then fails to the guest,
and the path advertised ANA optimized, so a listening, ready-looking but
fenced target is not safe.
- status: FrontendPrimaryReady is false while the volume's local durable
backend admits no I/O (attach pending, fenced, detached), with the
backend's evidence in the new NotReadyReason; Healthy stays the authority
view.
- blockvolume: the iSCSI, NVMe and ublk targets start only once the backend
first admits I/O (awaitBackendAdmitsIO, 10 ms); signals and the workspace
lease guard now start before that wait, and a stop requested during it
skips the frontends and goes straight to shutdown.
INV-FE-PRIMARY-READY-OPERATIONAL-001 (304 rows, 218 ACTIVE); M1 Recovering
-> Serving names the guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codex01 review of #416 2cba5881: two primary-owned units of one IQN (q/LUN1 at A, q/LUN2
at B) are two targets, never one multipath target with LUN1 for both. Control added.
INV-WS-RENEW-NONBLOCKING-001 lists TestLiveRenewalDoesNotWaitForAHeldRegistrationWrite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codex01 review of #416 3439d278 (INV-AUTH-HOLDER-IDENTITY-001, INV-WS-RENEW-NONBLOCKING-001):
- P1: primaryOwnedFrontends keys an iSCSI target by IQN AND LUN, so a supporting q/LUN2 never
becomes a multipath path of the primary's q/LUN1 (mismatch and nonzero-match controls).
- P2: TestLiveRenewalDoesNotWaitForAHeldRegistrationWrite renews through holderMatches over
gRPC while a registration write is held (NodeInventoryStore.HoldWritesForTest), and shows
the hold is real.
- Standards: the workspace lease diagram's holder edges name the registered-host guard; the
snapshot test's control reader has a bounded, owned join.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codex01 review of #416 e56f1de1 (INV-AUTH-HOLDER-IDENTITY-001, INV-WS-RENEW-NONBLOCKING-001):
- P1-1: the holder host check reads NodeInventoryStore.GetNodeSnapshot (published after each
committed write), never the store mutex RegisterNode holds across file I/O.
Held-registration-write control in core/lifecycle.
- P1-2: a primary slot with no frontend lists nothing; status frontends carry their replica
(FrontendTarget.replica_id = 8); CSI publishes a target only when the primary has a usable
frontend, another replica's frontend joining only as an extra path to the same target.
Real CSI lookup negatives (no primary frontend; rejected loopback primary).
- P2: a deletion-reserved workspace volume keeps the assignment stream host check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codex01 review of #416 (INV-AUTH-HOLDER-IDENTITY-001):
- P1: when the line's server has no evidence for the primary, QueryVolumeStatus lists no
frontend, so CSI never publishes a supporting replica's frontend under the primary.
Real CSI ControlStatusLookup negative (old host only: not found) and positive cases.
- P2: the primary replica row (server id, node, frontend) is the issued holder as a whole.
- Row: guard trace (Enforced in), tests, host scope and limits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The holder host check (INV-AUTH-HOLDER-IDENTITY-001) reads the gRPC network peer and
requires a registered server id; tests that call the service in-process now arrive as
from 127.0.0.1, and tests that renew as node-a register it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-AUTH-HOLDER-IDENTITY-001 (claude06 review of #416; claude01 decisions):
- holderMatches (lease renew and revocation ACK) refuses an unregistered server id and a
call whose gRPC network peer is not on the host registered for its server id.
- SubscribeAssignments refuses the same for a workspace volume, so the line is never
delivered to a second host with a copied --server-id; SubscribeRequest carries the
subscriber's server_id (field 4), sent by the volume.
- Refusals are logged. The heartbeat check stays (observations).
- Limits: trusts the network peer address (no NAT or proxy between volume and master in
OSS); not authentication.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-ASSIGNMENT-HOLDER-IDENTITY-001.
- ReportHeartbeat refuses (FailedPrecondition) a heartbeat whose slot addresses are
on a host other than the one registered for its server id. Only the host part is
compared; several server ids on one host stay allowed; an unregistered id has
nothing to contradict.
- QueryVolumeStatus lists the primary's frontends from the server on the authority
line (workspaceSourceHost), never a fresher same-replica claim from another server.
- ClusterStatus primary node is the line's server (issued holder), not placement, and
the primary replica's evidence and publish target come only from that server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-ASSIGNMENT-HOLDER-IDENTITY-001: the same --server-id reported from a host other
than its registered one must be refused, and the CSI portal and displayed primary must
come from the server on the authority line, not the freshest heartbeat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>