Commit Graph
3468 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 804bde1832 layout: the operator's remove-dependent checks the target first
The release step alone does not look at the target, so as the
operator's command it could release a live restore target and leave its
foreign references unprotected. It is now used only by the target's own
delete (its HEAD already deleting) and by OperatorReleaseDependent,
which reads the target first and releases only if it exists and is
deleted (HEAD deleting or deleted, or its name holding another volume
id) or no root in its live HEAD names a chunk of the source. A live
target still naming the source, one being created and one never created
(the restore could still create it) are refused, and the source is not
written. The package guard restricts the release's callers and requires
the operator's read of the target; the HEAD reader enumeration
classifies it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:22:52 -08:00
pingqiuandClaude Opus 5.5 3001bfe635 layout: volume delete and the release of a dependent
A volume delete runs in its order, each prefix safe and the whole
re-runnable: HEAD deleting (only with no holder, checked immediately
before, no open transaction and no snapshot with dependents), then this
volume released from every source's dependents, then its objects
deleted, then HEAD deleted. HEAD gains a state; from deleting on, every
holder transition, a claim and a removal are refused. A dependent is
released from a source by the target's volume id in one conditional
update, the delete's step and the operator's remove-dependent command.

The package guard allows DeleteVolume as the second remover and
requires its order (controls: the pool before the release, no holder
check); the stale-holder table now covers holder transitions only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:16:17 -08:00
pingqiuandClaude Opus 5.5 aa2f91b106 layout: volume, holder and dependent identities
A VOLUME record carries a random volume id, and identities never rest on
a name that can repeat: HEAD carries the volume id; every chunk
reference in a segment carries its owner's volume id, which a read
checks against the owner's VOLUME before fetching (a volume created
again under the name is ErrIdentity) and the remover uses to tell its
own chunks; every dependent records the target's volume id and the
snapshot's root hash; and a holder is its epoch, server and the claim
id its claim writes into HEAD, so every transition refuses the same
server with another claim id. Encodings stay canonical and decoding
refuses anything else; the segment format is version 2. Nothing writes
these shapes to a store yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:03:19 -08:00
pingqiuandClaude Opus 5.5 252f41a6c2 fix(auth): a strict call is refused without an audit log (and TLS requires --audit-log); the overflow warning is off the caller path; strict queue-full drops are counted; the census descends into selector receivers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:00:18 -08:00
pingqiuandClaude Opus 5.5 e57773d678 test(auth): red: strict call without an audit log; overflow warning on the caller path; uncounted strict drop; nested bypass reference
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:59:02 -08:00
pingqiuandClaude Opus 5.5 2aebd987ef test: reload after the fail-stop must return exactly the written record
The reload used Load, which hides skipped corrupt records, and accepted
no record. The child stops after the rename without a power loss, so the
record is on disk: reloadExactly requires LoadWithSkips to return it
(deep-equal) with no skip, and its own controls refuse a corrupt, a
missing and a different record. The latch note and comments no longer
name a directory sync failure as a latch cause (that case fail-stops).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:51:22 -08:00
pingqiuandClaude Opus 5.5 c7900bb57c layout: remove pool names no root reaches, inside the lease
RemoveUnreachable is the cleaning's removal step for one pool shard: for
the holder with its own clean(session) open, it deletes each candidate
chunk that no root in HEAD (current or any snapshot) names in this
volume's pool, and checks its own lease immediately before every delete.
HEAD is read once after BeginClean: no commit can add a root while the
cleaning is open, and a claim that voids it waits for this lease to end,
which the next check sees. An unreadable root or segment stops the pass
before any delete; a lapsed lease stops it before the next one; an open
snapshot refuses it.

The package guard now allows Delete/Remove names only in
RemoveUnreachable and requires a lease check before every delete in the
same block (controls: no check, check after the delete, one check
before the loop). The HEAD reader enumeration classifies its read, and
the ledger gains the removal row and the read path's row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:45:51 -08:00
pingqiuandClaude Opus 5.5 ddf7596f96 test(auth): the development-bypass census counts every reference (aliases, initializers, renamed and dot imports) with negative controls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:44:22 -08:00
Ping Qiu 4a86e06748 Merge pull request #564 from seaweedfs/test/oss-snap-head-guard
test: every transition refuses a stale holder
2026-11-24 15:42:38 -08:00
pingqiuandClaude Opus 5.5 b824366163 feat(auth): mutating operator and admin calls write their audit attempt first or are refused (strict rules); /status/audit counts dropped lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:38:24 -08:00
pingqiuandClaude Opus 5.5 6c0e1ad9e0 fix: fail-stop when the directory fsync after a rename fails
The rename is done, so a failed directory open or fsync leaves the
record's durability unknown. Reporting "failed" let a restart reload a
write its caller had acted on as failed. blockmaster now exits
(ExitDurabilityUnknown = 74, typed line) for every record type; the
restart reloads whatever survived. A close error after a good fsync is
reported written. Windows keeps its previous behaviour. The fault seam
names the step (open, fsync, close). INV-AUTH-PERSIST-BEFORE-PUBLISH-001
rewritten to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:34:59 -08:00
pingqiuandClaude Opus 5.5 3007058e46 test(auth): guard: the development-mode bypass has one production caller; docs: two role-file lines with one node id are two keys of one server
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:33:14 -08:00
pingqiuandClaude Opus 5.5 7c7d1223de test: a directory fsync failure after the rename must fail-stop (red)
The child process does one Put with an injected directory fsync failure;
it must exit ExitDurabilityUnknown with the typed line and never return
to its caller. The parent reloads the store: the record or none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:31:49 -08:00
Ping Qiu be8ebf1748 Merge pull request #563 from seaweedfs/feat/oss-snap-clean-session
layout: open and close a cleaning session
2026-11-24 15:30:28 -08:00
pingqiuandClaude Opus 5.5 c5c818f376 fix(auth): streams re-apply the method's rule for the current role; audit never blocks a call (bounded queue, accepted node calls skip it); a validated reload is published before it is logged
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:28:08 -08:00
pingqiuandClaude Opus 5.5 03ce649868 test(auth): red: a downgraded role keeps its stream; a blocked audit writer stalls node responses and revocations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:26:43 -08:00
Ping Qiu 054a1b0cdc Merge pull request #562 from seaweedfs/feat/oss-snap-claim
layout: the Claim transition
2026-11-24 15:24:26 -08:00
pingqiu d67b35050a Merge remote-tracking branch 'origin/main' into fix/authority-dir-fsync 2026-11-24 15:20:35 -08:00
Ping Qiu a18bc55b86 Merge pull request #561 from seaweedfs/feat/oss-snap-commit
layout: the Commit transition
2026-11-24 15:18:27 -08:00
Ping Qiu a74416368d Merge pull request #566 from seaweedfs/test/known-zero-sysfs-resolver
test: resolve the KNOWN-ZERO kernel device from sysfs
2026-11-24 15:14:13 -08:00
pingqiuandClaude Opus 5.5 cde691b550 test: T9 leases survive 20 forced reconnects (test-only connection age; grace scales with a short age)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:13:07 -08:00
Ping Qiu cca045eedb Merge pull request #559 from seaweedfs/feat/oss-snap-abort
layout: the Abort transition
2026-11-24 15:08:21 -08:00
pingqiuandClaude Opus 5.5 c506956740 test: T6/T7 seal then lose the certificate (no write after the seal)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:01:14 -08:00
Ping Qiu de291e60e4 Merge pull request #556 from seaweedfs/test/known-zero-acceptance
test: KNOWN-ZERO acceptance test on a fresh volume
2026-11-24 15:00:34 -08:00
pingqiuandClaude Opus 5.5 29c917aac1 test: T6 expired and T7 revoked holder certificate: fence, admin forced move, lost range
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:00:19 -08:00
pingqiuandClaude Opus 5.5 bfaf9aec19 test: T13 keeps the plaintext refusal; the operator's forced move is T7's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:58:56 -08:00
pingqiuandClaude Opus 5.5 8578b80cc9 sw-block: 'not authorized' (exit 5) with the cure for a refused caller or a plaintext client of a TLS master; T13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:55:56 -08:00
Ping Qiu 71a58d5f97 Merge pull request #558 from seaweedfs/feat/oss-snap-begin
layout: HEAD record and the Begin transition
2026-11-24 14:53:55 -08:00
pingqiuandClaude Opus 5.5 d5b96e7826 fix(master): a heartbeat for another server id is refused before its report is validated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:47:56 -08:00
pingqiuandClaude Opus 5.5 3c38ad18ef test: phase 0 procedure tests T8, T11, T12 on the TLS binaries
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:45:02 -08:00
pingqiuandClaude Opus 5.5 b842582d5f test: the revoke-crash procedure renews as its holder over mutual TLS when the gate runs on TLS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:42:46 -08:00
pingqiuandClaude Opus 5.5 bf91dce8b4 test: the procedure harness runs on mutual TLS (SW_BLOCK_PROCEDURE_TLS=1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:30:32 -08:00
pingqiuandClaude Opus 5.5 8165ac9414 test(auth): T10 renewal-path cost at 32 volumes; the per-call check never waits for a reload
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:28:40 -08:00
pingqiu af3493ed0f Merge remote-tracking branch 'origin/main' into feat/phase0-auth
# Conflicts:
#	cmd/blockvolume/chunk_maintenance.go
#	core/host/master/services.go
#	core/host/volume/host.go
#	docs/design/invariants.md
2026-11-24 14:21:44 -08:00
Ping Qiu 7abbbef165 Merge pull request #553 from seaweedfs/test/node-loss-gate-no-auto-promotion
testops: node-loss gate checks no automatic promotion, then the same primary serves
2026-11-24 14:20:40 -08:00
pingqiuandClaude Opus 5.5 ed2c56d3f0 test: refuse a partial sysfs inventory in the KNOWN-ZERO resolver
An unreadable directory or file was read as empty, so a partial inventory
could resolve as exactly one device; fs.Glob also dropped directory
errors during discovery. Every read error now refuses (the wait retries),
discovery lists nvme-subsystem and reads each subsysnqn, and the
literal-path fixture holds that path as an NQN so only the prefix guard
refuses it. Adds three partial-inventory controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:11:58 -08:00
pingqiu 6dd9dd99c3 Merge branch 'feat/oss-snap-clean-session' into test/oss-snap-head-guard 2026-11-24 14:01:34 -08:00
pingqiu 009f0dd94d Merge branch 'feat/oss-snap-claim' into feat/oss-snap-clean-session 2026-11-24 14:00:50 -08:00
pingqiu 8a07188cc8 Merge branch 'feat/oss-snap-commit' into feat/oss-snap-claim 2026-11-24 14:00:13 -08:00
pingqiu 8b0b2901b4 Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 13:59:49 -08:00
pingqiu d357fe902e Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort 2026-11-24 13:59:07 -08:00
pingqiuandClaude Opus 5.5 1506cc5a7a test: classify the layout transitions' HEAD read
The HEAD reader enumeration finds the layout package's one read path,
runTransition. Over an absent HEAD it refuses with ErrHeadAbsent and
writes nothing; a probe pins it with a store whose HEAD is absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:58:26 -08:00
pingqiuandClaude Opus 5.5 fe095efb2e test: resolve the KNOWN-ZERO kernel device from sysfs
nvme list-subsys -o json does not list namespaces on every nvme-cli, so
the device never resolved on a real host although the kernel connected.
kzResolve now reads /sys/class like the CSI node (subsysnqn, controllers,
transport, serial, namespaces under the subsystem or the controller) with
the same refusals, and a timeout reports the last refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:55:35 -08:00
pingqiuandClaude Opus 5.5 05ebed50c2 test: keep the status endpoint on loopback when the harness listens off loopback
blockvolume refuses a non-loopback status bind; sw-block ops reach it
with --status-addr from the same host, so it uses headSzLoopbackAddr
like the NVMe listener.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:49:22 -08:00
pingqiu 71011fd362 Merge branch 'feat/oss-snap-clean-session' into test/oss-snap-head-guard
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:57 -08:00
pingqiu 65a78ec8b8 Merge branch 'feat/oss-snap-claim' into feat/oss-snap-clean-session
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:52 -08:00
pingqiu ca534fe118 Merge branch 'feat/oss-snap-commit' into feat/oss-snap-claim
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:49 -08:00
pingqiu da6bdce568 Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:46 -08:00
pingqiu 8aef3e04cb Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:43 -08:00
pingqiu 48dd0c5422 Merge remote-tracking branch 'origin/main' into feat/oss-snap-begin
# Conflicts:
#	docs/design/invariants.md
2026-11-24 13:38:41 -08:00