Commit Graph
21909 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 3b7c35216b ci: the Facts line names one of three placement classes per fact
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:18:51 -08:00
pingqiu 9aa45da5d3 test: reproduce snapshot starvation across restarts 2026-11-29 16:18:00 -08:00
pingqiu 1a04289eba fix: keep captured equal marks when copy fails 2026-11-29 16:17:54 -08:00
pingqiuandClaude Opus 5.5 e25678f9aa ci: the PR template asks for the facts a change adds or changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:17:47 -08:00
pingqiu 4c4506c7c7 test: retain captured equality across copy aborts 2026-11-29 16:17:38 -08:00
pingqiuandClaude Opus 5.5 fb7fbad293 chunkstore: a snapshot name is recorded only by a commit at or past the request's position
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:12:17 -08:00
pingqiu 4899e42e6f test: count comparison callbacks atomically 2026-11-29 16:03:46 -08:00
pingqiu 3aff8010d7 test: compose timed-out requests adoption and refused-cut progress 2026-11-29 16:03:43 -08:00
pingqiu 1369da1694 fix: share equal-to-HEAD proof across staging and cut retries 2026-11-29 16:03:39 -08:00
pingqiu 54960b59ea test: expose restaging equal chunks after a refused full cut 2026-11-29 16:03:38 -08:00
pingqiu 7802cb59ad docs: upgrade blockvolume units together with the binary 2026-11-29 15:56:51 -08:00
pingqiu 04ba00dfd9 docs: reference the retained census refusal test 2026-11-29 15:54:51 -08:00
pingqiu 51954f8804 test: retain merged census deadline and CLI controls 2026-11-29 15:54:37 -08:00
pingqiu 0bbaf4836e fix: confirm master leadership after listing filers 2026-11-29 15:54:36 -08:00
pingqiu 322d246949 test: reproduce leadership loss during filer census 2026-11-29 15:54:20 -08:00
pingqiu 6087669843 docs: state filer census registration and version limits 2026-11-29 15:54:20 -08:00
pingqiu baee502f07 fix: let the agreed master leader decide the filer census 2026-11-29 15:54:19 -08:00
pingqiu 654b9561f0 test: pin agreed-leader filer census authority 2026-11-29 15:53:54 -08:00
pingqiu bf51c26a69 test: keep systemd fixture aligned with final revocation exit 2026-11-29 15:52:56 -08:00
pingqiu 8897b14971 feat: stop restarted holders after recorded revocation 2026-11-29 15:51:36 -08:00
Ping Qiu 0ae0c519b4 Merge pull request #793 from seaweedfs/ci/post-merge-review-hosted
ci: run post-merge-review paths on GitHub-hosted runners again
2026-11-29 15:50:02 -08:00
pingqiu 02de64b69e test: pin final refusal and single exit after recorded revocation 2026-11-29 15:47:58 -08:00
pingqiuandClaude Opus 5.5 f829e8751e durable: a plain seal's retry after a deadline commits the first attempt's uploads without putting them again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:47:54 -08:00
pingqiuandClaude Opus 5.5 0349b930ec chunkstore, storage: require the aborted-detach notice, hold the cleaning for uncommitted uploads, adoption controls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:47:52 -08:00
pingqiuandClaude Opus 5.5 2e6adbc7ca chunkstore: a cut's commit adopts its own upload from a session a timed-out request aborted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:47:18 -08:00
Ping Qiu d5bd456952 Merge pull request #786 from seaweedfs/train/20261129-t1
train: eight accepted v1.0.1 PRs (#780 #771 #775 #779 #778 #773 #776 #777)
2026-11-29 15:46:25 -08:00
pingqiu 5fa69f529c fix: replay recorded revocation ACK before lease admission 2026-11-29 15:39:53 -08:00
pingqiu 06d6c4441b test: reproduce recorded revocation ACK refusal after deadline 2026-11-29 15:36:56 -08:00
pingqiuandClaude Opus 5.5 8d519825fb docs(operator-guide): an uncertain workspace record refuses a volume's lease until blockmaster restarts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:36:29 -08:00
pingqiu d56d34b4cf Merge main 4b958e03 (#783) into train/20261129-t1
# Conflicts:
#	docs/design/invariants.md
2026-11-29 15:19:25 -08:00
Ping Qiu 4b958e03f2 Merge pull request #783 from seaweedfs/docs/invariants-dormant-status
docs(invariants): DORMANT status; re-cite seven rows
2026-11-29 14:52:00 -08:00
pingqiuandClaude Opus 5.5 6e33814b92 ci: run post-merge-review paths on GitHub-hosted runners again
On the self-hosted runners every run of this job failed in "Set up job"
within two seconds and left no log, while spec trace passes there. The
job only echoes for an unlabelled PR, so it goes back to ubuntu-latest
until the cause is known.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:40:45 -08:00
pingqiu e372193edc Merge main f5d43af2 (#787, #789) into train/20261129-t1
# Conflicts:
#	docs/design/invariants.md
2026-11-29 14:33:59 -08:00
Ping Qiu f5d43af2ae Merge pull request #789 from seaweedfs/fix/single-filer-bound-race
fix(chunkstore): the single-filer census passes only when every master answered
2026-11-29 14:31:29 -08:00
Ping Qiu 02ffc39a91 Merge pull request #787 from seaweedfs/ci/light-checks-self-hosted
ci: run the light PR checks on the self-hosted runners
2026-11-29 14:30:40 -08:00
pingqiu 9fda14ccad Merge main 8acddaaf (#791) into train/20261129-t1 2026-11-29 14:28:42 -08:00
Ping Qiu 8acddaaf2d Merge pull request #791 from seaweedfs/feat/force-move-json-identity
feat: include target identity in issued force-move JSON
2026-11-29 14:27:49 -08:00
pingqiuandClaude Opus 5.5 169f6e6e1c test(invcheck): check DORMANT rows like ACTIVE ones
A DORMANT row's code and test exist (the ledger legend), so the
invariant tests now require it to name a test and its cited .go paths
to exist, as for ACTIVE rows, and count it in the status log.
TestInvariantRowsNameExistingTests failed for the 11 DORMANT rows
before this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:09:14 -08:00
Martijn HoekstraandClaude Opus 5.5 89dbcb44c7 security: fips.mode follow-ups from the #13029 review (header comments, EMS on verified HTTPS, CA and read checks) (#13110)
* volume: read security.toml section headers that carry a trailing comment

The volume server's own security.toml parser compared each whole trimmed
line with the section headers it knows, so `[fips] # policy`, valid TOML
that Go's viper reads, fell through to an unknown section and its `mode`
was dropped: Go enforced the mode while weed-volume ran with FIPS mode off
and logged nothing. The same held for `[jwt.signing]` and every other
section. Header lines now have a trailing `#` comment removed before they
are matched.

Refs #13029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sw-client: require the Extended Master Secret on verified HTTPS in FIPS mode

In FIPS mode only the `insecure_skip_verify` client configuration, which
sw-client builds itself, set `require_ems`. With certificate checks on,
reqwest built the configuration and left `require_ems` at rustls's
default, which is off for a provider that is not FIPS-validated, so a
trusted TLS 1.2 volume server without EMS was accepted where the insecure
path refused it. Go requires EMS in FIPS mode. Both FIPS-mode paths now go
through one rustls configuration built here: certificates checked against
`https.client.ca` or the system roots (loaded with rustls-native-certs, as
reqwest loads them), or not checked with `insecure_skip_verify`, and EMS
required either way. Off mode keeps reqwest's configuration.

Refs #13029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* volume: refuse a FIPS mode from a security.toml parse that did not read the file

resolve_fips_setting reads security.toml once to check that it can, then
parses it. The parse falls back to defaults when its own read fails and
reports that only in `file_read`, which was not checked, so a file that
became unreadable between the two reads resolved to FIPS mode off. A
parse without `file_read` is now the same FipsModeError::File as a failed
first read.

Refs #13029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sw-client: refuse a malformed https.client.ca with insecure_skip_verify in FIPS mode

The FIPS-mode insecure_skip_verify configuration never parsed
`https.client.ca`, so a CA file whose certificate does not parse was
accepted there and refused on every other path, where reqwest or the
verified configuration load it. The CA is now parsed, and refused when
malformed, before it is set aside.

Refs #13029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-vector: lock sw-client's rustls-native-certs dependency

sw-client depends on rustls-native-certs since the FIPS-mode HTTPS
configuration; seaweed-vector depends on sw-client by path, so a --locked
build there refused to update its lockfile. The crate was already locked
in seaweed-vector; only the edge was missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:57:41 -08:00
Chris LuandClaude Opus 5.5 276be51d04 volume(rs): require the Extended Master Secret on outgoing HTTPS in FIPS mode (#13111)
The outgoing client took reqwest's rustls configuration, which leaves
require_ems at rustls's default: off for a provider that is not
FIPS-validated. A TLS 1.2 peer without EMS was accepted where Go's FIPS
mode refuses it. In FIPS mode the configuration is now built with the same
roots, CA and identity, and require_ems set.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:56:59 -08:00
pingqiuandClaude Opus 5.5 a90fab8c11 docs: what the single-filer start check does not detect
At start, the leader master listed this filer and no other. A filer
added within about 15 seconds before the start, or at any time after, is
not detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:34:22 -08:00
pingqiuandClaude Opus 5.5 4604b30891 test(chunkstore): the census test checks the unanswered master it names
TestCheckSingleFilerNeedsEveryMasterToAnswer now requires the refusal to
name the master that did not answer, by its gRPC address or as given when
it does not parse, among those named for the last round. The bound may
also cut the favourable master's last call, so that master can be named
too. Dropping a master from the named list fails every case it covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:24:05 -08:00
pingqiuandClaude Opus 5.5 9833f43f44 docs(invariants): shorten the retired row's statement
The archived INV-WS-HEAD-KEY-PROVENANCE-001 row keeps only why it was
retired and what replaces it; the old wording stays in git history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:19:31 -08:00
pingqiuandClaude Opus 5.5 4907c55f9b test(sw-block): the shell's start check refuses an unparsable master
The shell's single-filer start check is the census itself. A filer
reporting one favourable master and one address that does not parse is
refused as invalid, naming that master and saying to rerun when it
answers. On main the favourable master passes alone. The census's own red
for the same case is the "address does not parse" case of
TestCheckSingleFilerNeedsEveryMasterToAnswer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:14:42 -08:00
pingqiu 2316810fdb feat: include target identity in issued force-move JSON 2026-11-29 13:03:01 -08:00
pingqiu 7cb1500b5b test: pin issued force-move JSON identity 2026-11-29 13:01:58 -08:00
pingqiuandClaude Opus 5.5 68823d5b90 fix(chunkstore): the single-filer census passes only when every master answered
Replaces the bound-classification fix with a rule without a clock. A
round passes only when every master answered, none refused, and at least
one listed exactly the configured filer. A master that does not answer,
for any reason and at any time (it stalls, answers DeadlineExceeded
before its deadline, is down, or its address does not parse), leaves the
round unconfirmed, and the masters are asked again. The bound only ends
the asking. Then the start is refused, naming the masters that did not
answer, with "rerun when they answer". The two time tests are replaced
by one rule test with no timing assertion, in both master orders. Price,
stated on the standalone page: a chunk volume does not start while any
master of the filer's group is unreachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:01:53 -08:00
760f88e294 filer: bind scoped POSIX locks to the verified token id (#13047)
* filer/posixlock: key lock owners and leases by principal

A lock's owner becomes (Principal, Sid, Owner). The principal is server-side
state, empty for unscoped callers, so owners with equal client-chosen sid and
owner under different principals conflict and never match on unlock, release,
reassertion or coalescing. The session index and leases key on
(Principal, Sid).

Scoped sessions are leased per key from their first acquisition: the lease
ends at the earlier of TTL after the last acquisition or renewal on that key
and Lease.NotAfter. Expired scoped locks are dropped before any operation on
their key as well as by ReapExpired. Unscoped sessions keep their current
whole-session lease, started by the first keepalive.

The handler passes the unscoped session for now, so behaviour is unchanged.
NewManagerWithClock lets tests drive lease boundaries.

* filer: bind scoped POSIX locks to the verified token id

PosixLock trusted the client-supplied sid. GET_LK reports a conflicting
lock's sid and owner, so a scoped caller with a write grant on the same path
could reuse them to unlock or release another holder's lock, keep it alive,
or replace it through a KEEP_ALIVE reassertion. A tokenless request with the
same identity could do the same.

A request admitted for a scoped token now acts for that token's verified jti,
derived in posixLockAuthority from the interceptor's authority. It controls
only the locks it took, whatever sid or owner it names. Its lease on each key
ends at the earlier of the 15s TTL after its last acquisition or renewal and
the token's expiry plus the clock leeway. Each renewal passes admission for
its key, so a narrower token cannot extend keys outside its grant. Tokenless
and unscoped calls keep the unscoped namespace and behaviour, and can no
longer match a scoped lock. Scoped TRY_LOCK and reassertion ranges must be
well-formed read or write ranges, checked before any state changes.

GET_LK, the protobuf and forwarding are unchanged; the principal is never
returned or logged. A renewed token with a new jti is a new owner: the old
locks expire and are reacquired.

* filer/posixlock: release an expired session once, however many ranges it holds

* posix locks: report a lock lost on re-assertion to the mount

A mount whose lease lapsed, for example when its scoped token expired or
was replaced by one with a new id, kept re-asserting locks that another
session had since taken. The filer logged the loss but returned success,
and the mount discarded the reply, so nothing on the mount side showed it.

KEEP_ALIVE now returns the first conflicting lock in the existing
has_conflict and conflict fields, which older mounts ignore. The mount
warns once per key when it learns of a loss and forgets it once a
re-assertion succeeds or the key is no longer held. Writes are not fenced.

* filer/posixlock: drop every expired session's ranges in one pass

* filer/posixlock: renew a scoped session's same-grant leases together

Scoped leases expire per key and a keepalive renewed only the key it named.
A mount renews its keys one keepalive at a time, so with many keys and slow
keepalives a round could outlast the 15s lease and a healthy mount lost
locks; unscoped sessions never had this problem because any keepalive
renews the whole session.

Each scoped lease now records a fingerprint of the verified grants it was
acquired or re-asserted under: a SHA-256 over the sorted, deduplicated
(access level, path) entries. A keepalive, bare or re-assertion, extends
every live lease of the same session (principal and sid) held under the
same fingerprint, each to the request's lease (the earlier of the TTL and
the token's expiry plus leeway). Leases taken under other grants, such as
a narrower token reusing the jti, are still renewed only by name, and a
lease that already ended is not revived before the sweep drops it. No
extra filer lookups; unscoped sessions are unchanged.

* filer/posixlock: bound same-grant renewal and refuse ended-lease grants

A scoped keepalive scanned every key of its session to renew those held
under the same grant, so a mount renewing N keys one by one did N^2 lease
visits per round under the manager's mutex. The scan now runs at most once
per quarter lease TTL per grant; every key under the grant still ends no
earlier than three quarters of a TTL after the latest renewal, and the named
key is always renewed in full.

TryLock now refuses a scoped grant whose lease has already ended, such as a
request admitted just before its token expired that then waited on the
manager, instead of granting a lock the next operation would drop. The filer
returns Unauthenticated, which the mount reports as EIO.

* filer/posixlock: skip same-grant scans by deadline floor, not by time

The scan throttle remembered when a grant was last renewed, not how long
that renewal made its keys last. A replacement token with the same id and
grants but a later expiry could then renew one key while the others kept
ending at the old token's expiry.

Each session now keeps, per grant, the deadline the last scan gave every
live key under it, lowered whenever a key is leased for less. A renewal
skips the scan only while that floor already reaches the earlier of its
own deadline and three quarters of a TTL from now, so a mount renewing
keys one by one still costs linear work.

A keepalive from a session holding no leases records nothing, and a
session's floors go with its last lease, so lock-less keepalives with
changing session ids no longer accumulate state the sweeper never sees.

* filer/posixlock: never move a scoped lease's deadline earlier

Renew, a re-assertion, a same-grant scan and a re-lock all set the key's
deadline to the request's own bound. A request under the old token of a
principal that already renews under a replacement (same id and grants,
later expiry) can land after the replacement's renewal, for example one
of the 32 concurrent keepalives in flight when the mount switched
credentials. It then cut the key back to the old token's expiry, and the
lock was dropped before the next round although the replacement had
renewed it. Keep the later of the current and the requested deadline:
every deadline still comes from an admitted request of the same
principal, so a lease never outlives the latest of its tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* filer/posixlock: keep each session's index and leases in one map

bySession, lastSeen, leases and floors were four maps keyed by Session that
had to be created and pruned together. They become one sessions map whose
sessionState holds the session's keys (with each key's lease), its last
keepalive and its grant floors, so a session's state is dropped in one place.
The release loop shared by ReapExpired and ReleaseSession becomes releaseOn.

ReleaseSession now also forgets an unscoped session's last keepalive, so a
session it released is not reported again by the next sweep.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:58:42 -08:00
pingqiuandClaude Opus 5.5 6451f93aa3 fix(chunkstore): a master's answer cut by the bound refuses the round
singleFilerRound let an earlier favourable answer pass when a later
master's answer ended at the bound but arrived before the caller's
context was done. A gRPC server's deadline is the timeout the client
sent, so it runs out first and answers DeadlineExceeded. Now, when the
bound (not the per-attempt bound) ends a master's call and the call
fails by deadline, the round cannot pass: that master's view is unknown.
A stalled first master still costs one attempt, not the bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:47:38 -08:00
pingqiuandClaude Opus 5.5 0e1822c9a7 test(chunkstore): a master answer cut by the bound just before it must not pass
A gRPC server's deadline is the timeout the client sent, so a stalled
master answers DeadlineExceeded slightly before the caller's context is
done. The round then sees no bound passed and lets the earlier favourable
answer pass alone. That is the CI flake of
TestCheckSingleFilerFavourableThenStalledRefuses ("<nil> after 800.5ms").
The test master's early answer makes it deterministic; red on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:47:27 -08:00