Commit Graph
2615 Commits
Author SHA1 Message Date
Ping Qiu f9ebc99749 Merge pull request #432 from seaweedfs/train/20261122-24
Train 24 (P0 train B): start-time retry exits, listen/ready gate, runtime HEAD-fence exit
2026-11-22 08:26:33 -08:00
pingqiu 9a01fd8a5b Merge #409 + #410: start-time retry exits (75/78), listen/ready gate on one AdmitsIO, runtime HEAD-fence exit 2026-11-22 07:26:51 -08:00
pingqiuandClaude Opus 5.5 870a3d9be0 docs, test: name the spec row, not a seat; say channel capacity, not slots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:14:03 -08:00
pingqiuandClaude Opus 5.5 10ce25ee9c blockvolume: firstAdmitted reports its own completion; the exit diagram carries the runtime HEAD fence
The stop test now observes the worker's return on its own channel with
bounded joins on both paths (a re-check that ignores the stop fails in 12 s);
agent-workspace-design.md's supervisor diagram adds Serving -> Exit78 on a
runtime HEAD fence (head_fenced), independent of the lease.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:14:03 -08:00
pingqiuandClaude Opus 5.5 50d6d92845 blockvolume: one "may serve" function: AdmitsIO for status and the workspace start gate
V1-SPEC r2.39: StorageBackend.AdmitsIO is the I/O gate itself (the backend
admits I/O AND the guarded projection names this lineage as the healthy
primary). /status FrontendPrimaryReady and NotReadyReason read it through
the provider (lease_not_held stays first; an unopened volume fails closed).

A workspace chunk primary's frontends start once AdmitsIO passes after the
backend first admitted I/O (firstAdmitted: a bounded 50 ms re-check until
first served, workspace primaries only; the backend has no projection-change
signal). Non-chunk volumes and supporting replicas start after open as
before (the #410 design condition, V1-SPEC r2.39), now pinned by a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:14:02 -08:00
pingqiuandClaude Opus 5.5 c0e243a888 docs: INV-FE-FENCE-EXIT-001 statement as ruled (both detection terms named)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:14:02 -08:00
pingqiuandClaude Opus 5.5 33e72fd083 blockvolume: state the fence-to-exit bound as detection plus cleanup; join the fence watcher
INV-FE-PRIMARY-READY-OPERATIONAL-001 keeps the readiness and listen
property; the fence-to-exit bound is its own row, INV-FE-FENCE-EXIT-001,
stated as what is guaranteed: the fence's detection time (a HEAD fence:
50 ms) plus the existing 5 s cleanup bound from the decision. 307 rows,
221 ACTIVE.

Provider Close joins each layer's fence watcher through p.inflight
(counted under p.mu while not closed). C.W lists the two new waits.

The runtime-fence watcher test owns its worker: cleanup registered before
the start, the return joined with a bound on both paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:14:02 -08:00
pingqiuandClaude Opus 5.5 22a540d34d blockvolume: a runtime HEAD fence exits 78 head_fenced; serve only while the lease is held
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>
2026-11-22 07:14:02 -08:00
pingqiuandClaude Opus 5.5 1b675b39d0 blockvolume: lease_not_held reason and a one-time grant log for a workspace primary
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>
2026-11-22 07:14:02 -08:00
pingqiuandClaude Opus 5.5 34675c0930 blockvolume: no frontend listens and status is not primary-ready until the backend admits I/O
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>
2026-11-22 07:14:02 -08:00
pingqiu 564c0df27f fix(blockvolume): restore workspace drain diagnostic 2026-11-22 07:12:31 -08:00
Ping Qiu 46d998af50 Merge pull request #427 from seaweedfs/docs/owner-label-simulation-index
docs: publish model results and behavioral comments without internal references
2026-11-22 06:59:20 -08:00
pingqiu a9ff14e232 test: use explicit external bind and validate readiness response schema 2026-11-22 06:38:53 -08:00
pingqiu 0a01e8156c test: use neutral startup qualification names 2026-11-22 06:34:39 -08:00
pingqiu 4a517ed9ae test: qualify supervised target started before its clean move 2026-11-22 06:29:14 -08:00
pingqiu 5e7728e65a docs: keep model results and identity comments public-facing 2026-11-22 06:28:48 -08:00
pingqiu 027c161719 docs: state nonzero observed-lineage requirement for superseded exit 2026-11-22 06:21:22 -08:00
pingqiu d7b7f2a432 test: observe retry exit before checking its restarted process 2026-11-22 06:19:50 -08:00
pingqiu e1edfe04da fix: apply zero-lineage retry rule to observed and adopted facts 2026-11-22 06:19:34 -08:00
pingqiu 2332cba696 test: assert observed lineage precedes every adoption handoff 2026-11-22 06:09:57 -08:00
pingqiu 764a208f4e fix: share supersession comparison across named lineage evidence 2026-11-22 06:05:41 -08:00
pingqiu 2ffcafb11f merge: update startup retry onto Train A identity rules 2026-11-22 06:01:49 -08:00
pingqiu 94a6c0de4b docs(spec): index owner-label simulations and clarify trace units 2026-11-22 05:58:38 -08:00
Ping Qiu 0218544115 Merge pull request #426 from seaweedfs/train/20261122-22
Train 22 (P0 train A): Part T, primary holder identity, one server id per host, one line-owner function
2026-11-22 05:56:58 -08:00
pingqiu 9972921e6b Merge #411 + #416 + #423: holder identity (server id + replica id), one server id per host, one line-owner function
# Conflicts:
#	docs/design/invariants.md
2026-11-22 05:23:44 -08:00
pingqiu 38aa1f529b Merge #422: Part T, terms bound to code 2026-11-22 05:23:07 -08:00
pingqiu d65ac54ffb fix(master): capture line owner and bind its model trace 2026-11-22 05:22:16 -08:00
pingqiuandClaude Opus 5.5 31878ce8d8 docs: re-apply the #416 trace on #411's final docs: Part A guards, volume diagram edge, INV-AUTH and NONBLOCKING rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:22 -08:00
pingqiuandClaude Opus 5.5 a2e9930d49 fix: the iSCSI multipath grouping binds IQN and LUN; NONBLOCKING row names the live renewal control
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 8d103b2c85 fix: iSCSI CSI paths bind IQN and LUN; live-renewal held-registration control; lease diagram guard
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 e7d0114b1d docs: the volume role diagram's adopt edge names the registered-host delivery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 abc57ceb61 fix: registry read from a committed snapshot; CSI publishes only a primary-owned target; deletion keeps the stream check
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 fc6365232b fix: no portal without the primary's holder evidence; the primary row is the issued holder
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 772cdef3ae test: the workspace assignment stream names its server id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 cf40f8a5b5 test: in-process workspace RPCs carry a loopback peer; workspace holders are registered
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 b38462d01a fix: workspace holder RPCs refuse a server id from a host other than its registered one
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 f53bddf24e test: displayed primary is the issued holder, not the placement slot; id renamed to INV-AUTH-HOLDER-IDENTITY-001
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 9db53255ff test: derive the holder's portal from the fixture; documentation-range address for the stale claim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 5c912694b1 fix: one server id names one host; portal and primary from the line server
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>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 6ff7a6a2b7 test: red: a server id from a second host; portal and primary from the line server
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>
2026-11-22 04:44:21 -08:00
pingqiu c4720afa3a docs(status): regenerate warning schema for routing diagnostics 2026-11-22 04:43:09 -08:00
Ping Qiu 06067e2271 Merge pull request #424 from seaweedfs/train/20261122-21
Train 21: hostlimit urgent-pending + launch checks, standalone planned handover test
2026-11-22 04:30:44 -08:00
pingqiu f388f2c357 docs(authority): reconcile exclusion guard and repair invariant status 2026-11-22 04:25:22 -08:00
pingqiu 165c6b0330 docs(authority): trace same-epoch candidate admission refusal 2026-11-22 04:10:56 -08:00
pingqiu 2ff0e765d9 fix(volume): retain recorded owner for an assignment epoch 2026-11-22 04:10:34 -08:00
pingqiuandClaude Opus 5.5 ef3d1d03f6 docs: Part T, the refusal to adopt is the holder safety rule
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:10:28 -08:00
pingqiu 56cd0275db test(volume): reject same-epoch changes of recorded owner 2026-11-22 04:10:04 -08:00
pingqiu c8522ed198 test: retain stale assignment before foreign delivery then replay 2026-11-22 04:01:34 -08:00
pingqiu f951c0102c fix: refuse stale self assignment behind observed foreign lineage 2026-11-22 04:00:11 -08:00
pingqiu 22037e1ce5 test: trace forced-move deliveries and reject stale self replay 2026-11-22 03:59:20 -08:00