mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
Merge branch 'main' into feat/v4a-commit-by-change
This commit is contained in:
commit
31bd759ec7
7 files changed
+171
-36
No files matched your search
+1
-1
@@ -39,7 +39,7 @@ jobs:
|
||||
# train/* of this repository, a few a day) also runs on the team's runners:
|
||||
# it is the merge gate, and the organization's shared GitHub-hosted queue held
|
||||
# it 30-55 minutes before it started. A PR from a fork never runs there.
|
||||
runs-on: ${{ (github.event_name == 'push' || (github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'train/'))) && 'tp04-seaweed-block' || 'ubuntu-latest' }}
|
||||
runs-on: ${{ (github.event_name == 'push' || (github.event.pull_request.head.repo.full_name == github.repository)) && 'tp04-seaweed-block' || 'ubuntu-latest' }}
|
||||
# process: 44 tests in 4 parallel shards of about 13 min each (55 min in sequence).
|
||||
timeout-minutes: ${{ matrix.suite == 'unit' && 40 || 90 }}
|
||||
env:
|
||||
|
||||
+8
-16
@@ -46,12 +46,12 @@ not format or write the attached device; it only creates local backing files
|
||||
and logs. It needs Linux, bash, `nvme-cli`, `sudo` and the binaries
|
||||
above. To format and write, use the [write test](docs/standalone-deployment.md#write-test-scratch-host-only) (scratch host only).
|
||||
|
||||
### On main, coming in v1.0.1: `sw-block mini`
|
||||
### `sw-block mini`
|
||||
|
||||
`main` is unreleased: use it for a trial on a scratch host, not for data you keep. One command starts a single-host
|
||||
A trial on a scratch host, not for data you keep. One command starts a single-host
|
||||
trial on loopback, with SeaweedFS's `weed mini` as the chunk store (run against SeaweedFS 4.53). Build all three
|
||||
binaries from `main` and run the one you built, so that `mini` finds its matching `blockmaster` and `blockvolume`
|
||||
next to it:
|
||||
binaries from the same checkout and run the one you built, so that `mini` finds its matching `blockmaster` and
|
||||
`blockvolume` next to it:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/seaweedfs/seaweed-block && cd seaweed-block
|
||||
@@ -144,21 +144,13 @@ measured.
|
||||
Seaweed Block is block storage for AI agent workspaces: one local-speed disk per sandbox or microVM, with its history
|
||||
(snapshots, restores, moves) in your own SeaweedFS. The same core serves Kubernetes block volumes (alpha).
|
||||
|
||||
- **Works today (v1.0.0):** single-replica volumes up to 256 GiB over NVMe/TCP or iSCSI; scheduled and manual
|
||||
- **Works today (v1.0.1):** single-replica volumes up to 256 GiB over NVMe/TCP or iSCSI; scheduled and manual
|
||||
snapshots; restore into a new volume; a planned hand-over to another machine (run across two machines on the
|
||||
release candidate); a forced move after a host is lost, from the volume's last cut (tested with two server
|
||||
identities on one machine); volume delete. Each is a documented sequence of `sw-block ops` commands and systemd
|
||||
units.
|
||||
- **Next, planned for v1.0.1** (still single replica):
|
||||
- `sw-block mini`: one command that starts a single-host trial;
|
||||
- whole-job volume commands, each one command: `sw-block volume start`, `stop` (it publishes the volume's changes
|
||||
first), `backup` and `restore`;
|
||||
- `sw-block shell` for inspection: status, lists, and `cluster.check`, a fixed list of checks whose troubleshooting
|
||||
page says what to do for each;
|
||||
- a log bundle without secrets, for bug reports;
|
||||
- a working `ops chunk verify`.
|
||||
|
||||
The recovery point above does not change in v1.0.1.
|
||||
units. v1.0.1 adds `sw-block mini`, a single-host trial; whole-job volume commands (`sw-block volume start`,
|
||||
`stop`, `backup`, `restore`); `sw-block shell` for inspection, with `cluster.check` and a troubleshooting page; a
|
||||
log bundle without secrets; and a working `ops chunk verify` (see the [v1.0.1 note](docs/releases/v1.0.1.md)).
|
||||
- **After that, planned:** volumes up to 1 TiB (v1.1); replicated volumes beyond the preview; export of a snapshot to another object store, and
|
||||
import from it; `volume fork` and `volume move` commands.
|
||||
|
||||
|
||||
@@ -352,12 +352,11 @@ that never served (step 4 of
|
||||
delete means this case; retrying the delete alone does not help. Until the release, the source's delete answers
|
||||
`snapshot_has_dependents` ("has 1").
|
||||
|
||||
Deleting a restore target: its first cut compares every restored chunk locally (about 1.4 GiB/s measured). The
|
||||
default `--timeout` of 120 s covers up to about 84 GiB; above that, pass `--timeout 5m` (the server's limit for one
|
||||
request). At the 256 GiB maximum the first cut takes about 3 min. An `outcome_unknown` answer there means the volume
|
||||
Deleting a restore target: its first cut compares every restored chunk locally, so it reads the target's whole filled
|
||||
size. The server bounds one request at 5 minutes: pass `--timeout 5m` for a large target. An `outcome_unknown` answer there means the volume
|
||||
has stopped I/O while its holder settles the outcome in the background; it resumes serving when that settles (the
|
||||
holder logs it), and nothing acknowledged is lost. Then retry the delete with `--timeout 5m`. A restore target's
|
||||
filled size must be at most about 4 min x your disk's read rate for its first cut to finish. On disks slower than NVMe the 256 GiB figure does not hold; see the v1.0.0 Known limits.
|
||||
holder logs it), and nothing acknowledged is lost. Then retry the delete with `--timeout 5m`. The first cut must read the filled size within one
|
||||
5-minute request, so the filled size divided by your disk's read rate must fit in it; see the v1.0.1 Known limits.
|
||||
|
||||
|
||||
[Standalone deployment: snapshots, restore and space](standalone-deployment.md#snapshots-restore-and-space-walstore-chunk):
|
||||
@@ -387,8 +386,7 @@ the snapshot name exists only after a request for it succeeds (check with `sw-bl
|
||||
(`TestKnownDefectSnapshotRetryAfterAGenuineConflictCommitsTheDataUnnamed`). A retry that names the snapshot at once is
|
||||
planned for a later release.
|
||||
|
||||
A snapshot's time grows with the data changed since the volume's last cut: 64 GiB changed took 122 s (about 2 s
|
||||
per GiB). `sw-block ops chunk snapshot` waits 60 s by default, so pass `--timeout` above the expected time; the
|
||||
A snapshot's time grows with the data changed since the volume's last cut. `sw-block ops chunk snapshot` waits 60 s by default, so pass `--timeout` above the expected time; the
|
||||
server bounds one request at 5 minutes whatever `--timeout` says. A request that runs
|
||||
out of time answers a retryable code: `remote_unavailable` or `deadline_exceeded` when it ran out before its commit,
|
||||
`outcome_unknown` when it ran out during the commit. Before the commit, the name is withdrawn and no later cut
|
||||
@@ -396,10 +394,11 @@ publishes it; the volume's data is unchanged and stays queued for the next cut.
|
||||
After `outcome_unknown`, the commit may have landed with the name.
|
||||
Rerun the snapshot with the same name and a larger `--timeout`: a name already in HEAD is answered with the
|
||||
snapshot it names, so a rerun never takes a second one. A rerun keeps what a timed-out request already
|
||||
uploaded: it finds those chunks and sends only the rest. More than about 150 GiB changed needs more than one 5-minute
|
||||
request: at the 256 GiB maximum a snapshot published on its second request, after about 9 minutes in all, so rerun
|
||||
until it answers. A scheduled snapshot retries by itself (after 1 minute, doubling to 1 hour). A longer or derived
|
||||
default is planned for a later release.
|
||||
uploaded: it finds those chunks and sends only the rest. A large change can need more than one 5-minute
|
||||
request. With a
|
||||
`--timeout` above 5 minutes (for example `--timeout 15m`), `sw-block ops chunk snapshot`, `cut` and `detach` repeat
|
||||
the 5-minute request with the same body until it answers or the timeout ends; with a shorter one, rerun until it
|
||||
answers. A scheduled snapshot retries by itself (after 1 minute, doubling to 1 hour).
|
||||
|
||||
With `--host-limit-dir` set (it is off by default), uploads are paced at `--host-limit-upload-bytes-sec` (64 MiB/s by
|
||||
default) shared by the host's 4 slots, about 16 MiB/s per volume. Only the bytes a cut sends are paced: a chunk
|
||||
|
||||
@@ -4,8 +4,9 @@ Seaweed Block release notes use narrow product claims. Each alpha version names
|
||||
what a user or reviewer can actually run, what QA evidence backs it, and what
|
||||
is still outside the supported boundary.
|
||||
|
||||
- [v1.0.1](v1.0.1.md)
|
||||
- [v1.0.0](v1.0.0.md)
|
||||
- [Planned cleaning convergence after v1.0.0](cleaning-convergence.md)
|
||||
- [Cleaning changes in v1.0.1](cleaning-convergence.md)
|
||||
- [Diagnostic log format](log-format.md)
|
||||
- [Typed refusal codes of the chunk CLI](cli-refusal-codes.md)
|
||||
- [Holder identity and pre-release upgrades](holder-identity.md)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# Planned cleaning changes after v1.0.0
|
||||
# Cleaning changes in v1.0.1
|
||||
|
||||
These changes are proposed for v1.0.1. They are not a claim about v1.0.0 or
|
||||
qualification of a published binary. The v1.0.0 release note's cleaning limits
|
||||
describe that release; this change replaces those limits when it is released.
|
||||
These changes are in v1.0.1. They replace the v1.0.0 release note's cleaning
|
||||
limits.
|
||||
|
||||
- Cleaning removes unreferenced roots, then segments, then chunks. It no longer
|
||||
waits for volume deletion to reclaim abandoned roots and segments.
|
||||
@@ -19,8 +18,7 @@ describe that release; this change replaces those limits when it is released.
|
||||
through the existing worker. Queued is not completed; an ended worker refuses.
|
||||
|
||||
See [cleaning and the schedule command](../standalone-deployment.md#resuming-cleaning-passes).
|
||||
Linux/race qualification and the production-layout CLI verifier evidence remain
|
||||
separate gates. A live graph/count check is not a `verify`-clean result.
|
||||
A live graph/count check is not a `verify`-clean result.
|
||||
|
||||
### Last holder maintenance pass
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
# v1.0.1
|
||||
|
||||
A maintenance release of v1.0.0. The supported configuration is still the **single-replica volume**
|
||||
(`--durable-impl walstore-chunk`), new volumes are still at most 256 GiB, and the recovery point does not change:
|
||||
the loss of a whole host loses what was acknowledged since the volume's last successful snapshot or cut. Replicated
|
||||
volumes remain a preview: see [replicated volumes in v1.0: a preview](replicated-volumes-preview.md).
|
||||
|
||||
v1.0.1 adds whole-job volume commands, a single-host trial (`sw-block mini`), an inspection shell with
|
||||
`cluster.check` and a troubleshooting page, a support bundle, and a working `ops chunk verify`; it fixes the cleaning
|
||||
limits and the rare holder crash listed in v1.0.0's Known limits.
|
||||
|
||||
## Upgrade
|
||||
- In place, with no format change in any store (see [persisted state](../persisted-state.md)) and no flag to set:
|
||||
blockmaster first, then each volume host one at a time, the `sw-block` CLI last. Follow
|
||||
[upgrade from v1.0.0 to v1.0.1](../upgrade-v1.0.1.md).
|
||||
- While some hosts still run v1.0.0: create no volume above 256 GiB (as in v1.0.0); a restore's target must be in the
|
||||
cluster spec before the restore, unless blockmaster's product loop is on (`--lifecycle-product-loop-interval`);
|
||||
`cluster.check` against a v1.0.0 holder reports its version as unavailable, never `ok`. A v1.0.0 blockmaster with
|
||||
a v1.0.1 volume host is not supported.
|
||||
- Downgrade is not supported.
|
||||
|
||||
## New
|
||||
- **Volume commands** (run as root): `sw-block volume start <volume>` writes the volume's settings to
|
||||
`/etc/sw-block/volumes/<volume>.env` and starts the unit `sw-blockvolume@<volume>.service`;
|
||||
`sw-block volume stop <volume>` cuts and stops it, and refuses while a guest is connected (`--force` to stop anyway,
|
||||
`--no-cut` to skip the cut); `sw-block volume backup <volume> --name S` takes a snapshot;
|
||||
`sw-block volume restore <volume> --snapshot S --as <new> ...` creates and starts a restored volume (`--abort` undoes
|
||||
a restore that did not finish). See [standalone deployment](../standalone-deployment.md) and
|
||||
[volume backup and restore](volume-backup-restore.md).
|
||||
- **`sw-block mini`**: a single-host trial on loopback with SeaweedFS's `weed mini` as the chunk store. Snapshots work
|
||||
at once; a restore into a new volume is refused inside the trial (blockmaster's product loop is off).
|
||||
- **`sw-block shell`**: inspection commands (`cluster.status`, `volume.list`, `volume.status`, `volume.explain`,
|
||||
`snapshot.list`, `store.show`, `store.usage`, `volume.verify`), each with `-o json`, and `cluster.check [volume]`:
|
||||
fourteen checks in the order a start-up fails, one line each (`ok`, `FAIL`, `not checked here`, `not applicable`).
|
||||
A `FAIL` prints its cure and names its section of the [troubleshooting page](../troubleshooting.md). The checks of a
|
||||
volume's holder run only on its host (`-server-id`); elsewhere they say `not checked here`.
|
||||
- **Support bundle**: `log.collect -out DIR` in `sw-block shell` gathers versions, the cluster and `cluster.check`
|
||||
results, the holder's status pages, a HEAD summary, the start-up arguments and the last `-since` (default 15 min) of
|
||||
logs into a new directory. Credentials in what it collects are redacted; it reads no environment, configuration tree
|
||||
or key file. Exit 0 means every source was collected, not that the cluster is healthy.
|
||||
- **`ops chunk verify` works on production volumes**: `--master MASTER --volume NAME` resolves the volume's directory
|
||||
through blockmaster (or give the `<name>-<id8>` directory). It checks every named snapshot in turn; `--orphans` lists
|
||||
unreferenced objects. See [verify on the production layout](verify-production-layout.md).
|
||||
- **Status and logs**: `/status/durable` shows the phase of the running cut, the volume's HEAD writes and unknown
|
||||
outcomes by cause, and the cleaning passes (see [status schema](../status-schema.md)); each HEAD write is logged with
|
||||
its cause; `--log-level info|debug` and UTC timestamps (see [log format](log-format.md)).
|
||||
- **Forced move answers in JSON**: `sw-block ops workspace force-move --json` (with or without `--dry-run`) reports
|
||||
whether the move is admitted, the barrier time, a typed refusal code, and for an issued move the new epoch, host and
|
||||
replica and the kept HEAD position. `--dry-run` exits 0 whenever the check ran, admitted or not: read `admitted`.
|
||||
- **Long requests repeat**: `ops chunk snapshot`, `cut` and `detach` with a `--timeout` above 5 minutes repeat the
|
||||
server's 5-minute request with the same body until it answers or the timeout ends. The defaults (60 s, 60 s, 120 s)
|
||||
send one request.
|
||||
|
||||
## Changed at start
|
||||
- **`--workspace-lease` is required** for every `--durable-impl walstore-chunk` volume: `blockvolume` refuses to start
|
||||
without it (without a lease, two holders could both acknowledge writes). Plain `walstore` volumes are unchanged.
|
||||
- **The filer must refuse a stale conditional HEAD update**: `blockmaster` and `blockvolume` check at start, in a
|
||||
disposable `.startup-head-probe-<id>` directory under the chunk path, that the filer refuses an update with the
|
||||
wrong generation and leaves the object unchanged; a filer that does not, or an unknown outcome, refuses the start.
|
||||
- **The single-filer check is stricter**: it passes only when every master answered, and the leader's list decides.
|
||||
`sw-block ops chunk` commands that write metadata refuse a filer client that cannot run the check (one that is not
|
||||
SeaweedFS).
|
||||
- **A revoked holder stays stopped**: a holder started again after its revocation was already recorded exits once
|
||||
with status 79, which the shipped units do not restart (as for 78). Update the units before the binary (see the
|
||||
upgrade page). A revocation acknowledgement retried after its deadline is answered from the record.
|
||||
|
||||
## Fixed
|
||||
- **Holder crash on first reads**: v1.0.0's rare `fatal error: concurrent map writes` during the first reads of a
|
||||
volume opened from the object store (after a move, a takeover, or as a restore target).
|
||||
- **Cleaning reaches the whole store**: a pass continues where the previous pass of the same process stopped, instead
|
||||
of starting at the first shard, so its space is reclaimed whatever the store's size (after a restart the first pass
|
||||
starts again from the beginning). Cleaning now also removes roots and segments that no snapshot names, so a cut no
|
||||
longer keeps metadata until the volume is deleted. This replaces two v1.0.0 Known limits.
|
||||
- **Commit of a large volume**: the check of the chunks a cut names runs before the HEAD update, within the cut's own
|
||||
time, and the HEAD update does constant work. The v1.0.0 limit tying the 256 GiB size to the filer's round-trip
|
||||
time is gone (the 256 GiB maximum stays).
|
||||
- **A refused restore leaves no target**: a restore refused for good (for example from a snapshot of a restored
|
||||
volume) no longer leaves the target name bound, and answers `restore_source_not_own` without the misleading
|
||||
`layout store not ready:` prefix. An unknown volume now answers `volume_not_found` (exit 1) instead of
|
||||
`bad_request` (exit 2). See [CLI refusal codes](cli-refusal-codes.md).
|
||||
- **Cuts keep their progress**: a cut that fails or runs out of time keeps the chunks it already compared and the
|
||||
uploads it already made; the next cut compares and sends only the rest. A chunk filled from the source snapshot is not
|
||||
sent again while unchanged. With `--host-limit-dir`, only the bytes a cut sends are paced, so a rerun converges.
|
||||
- **A snapshot holds every write acknowledged before its request**: its name is recorded only by a cut at or after
|
||||
the request's log position, never by a cut that was already past its barrier when the request arrived.
|
||||
- **Scheduled snapshots survive restarts**: a restarted holder takes the next due time from the volume's newest
|
||||
scheduled snapshot in HEAD, instead of placing the next daily attempt again (up to a day away); a missed time stays
|
||||
due.
|
||||
- **Uploads do not block HEAD reads**: a cut's uploads run concurrently, and reads of the volume's HEAD proceed while
|
||||
they do.
|
||||
- **A failed fsync stays failed**: the save of a volume's chunk presence follows the store's rule that a failed fsync
|
||||
is never retried as if it had succeeded.
|
||||
- **Plain detach** keeps time inside the caller's `--timeout` to settle: it answers aborted or unknown within the
|
||||
timeout instead of after it.
|
||||
- **Connections to SeaweedFS volume servers are reused**, instead of leaving a burst of closed sockets per cut.
|
||||
- **A status server closed right after its start** no longer panics.
|
||||
|
||||
## Replicated volumes (preview)
|
||||
- No support claim changes: replicated volumes remain a preview (see
|
||||
[replicated volumes in v1.0: a preview](replicated-volumes-preview.md)).
|
||||
- Preview fix: a primary's session exchanges with a replica now go through one queue per replica, in order, and are
|
||||
refused cleanly when that replica's worker stops.
|
||||
|
||||
## Limits
|
||||
- New volumes are at most 256 GiB, as in v1.0.0.
|
||||
- Restoring needs room: the target's full size plus its WAL (64 MiB) free on the restoring host; the create is refused
|
||||
with a message that names both numbers.
|
||||
- Up to 10 snapshots per volume; up to 4 restore targets per snapshot and 16 per volume; snapshot names up to 64
|
||||
bytes; up to 4 labels. A volume's geometry is fixed at creation.
|
||||
- A snapshot's time grows with the data changed since the last cut; see the operator guide for `--timeout`.
|
||||
|
||||
## Known limits
|
||||
- On a freshly restored volume each cut pauses guest writes while it looks up the block entries of every chunk not
|
||||
yet local; the pause falls as the volume's chunks become local.
|
||||
- A restored volume never becomes independent: its source snapshot stays pinned and counts toward the source's 10
|
||||
while the target exists, and the source cannot be deleted before it. Independence is planned for a later release.
|
||||
- While a large restore is being created, do not move or detach other volumes; a move that fails then is retried after
|
||||
the restore completes.
|
||||
- A restored volume takes no scheduled snapshots while any of its chunks is still only in the source snapshot.
|
||||
- A snapshot of a restored volume cannot itself be a restore source (`restore_source_not_own`).
|
||||
- Node Ready/Schedulable in the observation report and the Kubernetes operator status are always true in v1.0.1; use
|
||||
cluster.check for node state.
|
||||
- sw-block does not authenticate to SeaweedFS; run SeaweedFS on a trusted network.
|
||||
- An upload whose outcome is unknown may leave an unreferenced object that cleaning does not reclaim;
|
||||
`weed shell volume.fsck -collection <block collection> -v` lists such objects; do not use its delete option on
|
||||
block data.
|
||||
- blockmaster reads its cluster spec only at start.
|
||||
- One SeaweedFS filer per chunk store.
|
||||
- A restore target's first cut reads every filled byte, so its time grows with the target's filled size and the
|
||||
disk's read rate; on a slow disk or a large target its detach and delete may not finish within the server's
|
||||
5-minute bound for one request. See the operator guide.
|
||||
- A volume created at run time and not in the cluster spec is served only with `--lifecycle-product-loop-interval` set.
|
||||
- A volume-delete refused with `snapshot_has_dependents` has already reserved the volume; delete or release the
|
||||
restored volume first, then run the same delete again.
|
||||
- A snapshot that meets a concurrent HEAD change answers `head_conflict`: retry it (and once more if the retry answers
|
||||
`snapshot "NAME" of VOL is not in HEAD after its commit`).
|
||||
- A restored volume records which chunks it has fetched only at its next checkpoint: after a crash, chunks fetched
|
||||
since then are fetched again (no data is lost).
|
||||
- A guest's NVMe/TCP connection waits about 181 s (holder stopped, host up) or about 464 s (holder's host powered off)
|
||||
for a stopped target; see [host connect settings](../operator-guide.md#host-connect-settings).
|
||||
- Every deleted volume leaves one small record in blockmaster's deletion store; the name cannot be reused.
|
||||
- replicated (preview): a replica whose rebuild was refused is not reported unhealthy; fixed in a later release.
|
||||
- replicated volumes are a preview: a primary cut off from the block master is not stopped by a lease and may serve
|
||||
stale reads to a guest still connected to it; do not use replicated volumes for data you cannot lose.
|
||||
- (PENDING: limits found by the release gates.)
|
||||
@@ -1,6 +1,6 @@
|
||||
# Troubleshooting
|
||||
|
||||
**Coming in v1.0.1 (on `main`, not in v1.0.0).** `cluster.check` in `sw-block shell` runs the checks below in the order a start-up fails and prints
|
||||
`cluster.check` in `sw-block shell` runs the checks below in the order a start-up fails and prints
|
||||
one line per check: `ok`, `FAIL`, `not checked here` or `not applicable`. A `FAIL` line names its section on this page. Each section
|
||||
begins with the same one-sentence cure the command prints, then says what you see and how to fix it.
|
||||
|
||||
|
||||
Reference in new issue
Block a user