mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
seaweed-block: docs: v1.1.2 release notes (#13498)
* seaweed-block: docs: v1.1.2 release notes Fixed v1.1.1 known issues, behaviour changes (failover completes, finalize refusal and operator rule, exit 74, one exit-code rule with the old and new exits), the dedicated state filesystem measurements, the remaining known issues and the upgrade notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes name cut_busy's exit 4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: the filer start check applies with --workspace-rpc Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: identity fix planned with v1.2; the measured set's own range Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes state network trust; the fixed H2CData overflow leaves the open-issue lists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: network trust rev 2 (audit log; iSCSI CHAP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: network trust rev 3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: network trust rev 4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: network trust rev 5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 exit rows for finalize/retire-host and restore/backup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: snapshot-delete resume rule under the filer chunk condition Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: one title for the snapshot-delete known issue Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 exit rows: failover deadline, backup refusals, restore abort Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 exit rows: failover cancel, restore placement conflict Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: unparsable CA bundle blocks are skipped Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: exit-code exceptions, snapshot-delete fix scope, detach window Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: snapshot-delete resume conditions; CA root rotation check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: create/resolve 75 only for a retryable unknown Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: snapshot-delete fix needs v1.1.2 writers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: snapshot-delete repeat pinned by generation; holder guard; detach window; CA rotation steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: CA root rotation covers client certificates and restarts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 known issue: overwritten restored volume keeps its source snapshot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: docs: v1.1.2 notes: role-file fingerprints in CA rotation; dependent release then resume Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c1c7679a29
commit
615163658f
4 files changed
+308
-94
No files matched your search
@@ -415,7 +415,6 @@ Not done yet:
|
||||
- **The control plane (blockmaster)** authenticates with mutual TLS when it is configured (required off loopback): client certificates verified against `--tls-client-ca`, pinned roles from `--role-file` (viewer, operator, admin, node), and an append-only `--audit-log` ([operator guide](../operator-guide.md#authenticate-the-control-api)).
|
||||
- **No authentication** on the status and chunk control endpoints (loopback-only by default), the replication channel or the filer client. Anyone who can reach the filer can read or change any volume's entries ([core known issues](block-design.md#24-known-issues-and-work-in-progress)).
|
||||
- No encryption of chunks in SeaweedFS or of traffic to it.
|
||||
- The NVMe/TCP H2CData bound check can wrap and panic the process on one malformed PDU; it is reachable from loopback ([core known issues](block-design.md#24-known-issues-and-work-in-progress)).
|
||||
- ublk at high density: unprivileged per-volume servers need a privileged control broker, which is not done.
|
||||
|
||||
## 9. Invariants
|
||||
|
||||
@@ -374,7 +374,6 @@ The reason is an unhealthy, not-eligible fact; blockmaster does not promote or s
|
||||
|
||||
These are tracked for fixes. Most were raised by an independent review of this repository. Gaps specific to one product line are in that line's document: [agent workspace known gaps](agent-workspace-design.md#14-known-gaps) and [Kubernetes known gaps](kubernetes-block-design.md#12-known-gaps).
|
||||
|
||||
- **NVMe/TCP H2CData offset overflow.** The `DATAO + length` bound check is done in 32-bit arithmetic and can wrap, so one malformed PDU can panic the process (`core/frontend/nvme/session.go` `recvH2CData`). Reachable from loopback by default. **Planned fix:** 64-bit arithmetic, offset and R2T consistency checks, and bounds on wire-supplied allocations.
|
||||
- **Process notes in source comments.** #162 removed reviewer names and decision timestamps from code comments. A few comments still cite internal review labels (for example "ruling F1") where a neutral design rationale would be clearer.
|
||||
- **fsync latency.** #173 removed the idle group-commit wait: a lone `Sync` no longer waits out the collection delay, and guest `fsync` fell from about 5.5 ms to a median of 3.23 ms against 2.74 ms local (ublk; see [workspace measurements](../workspace-measurements.md)). Remaining lead: the checkpoint superblock `fsync` runs under the exclusive store lock, stalling reads and writes each flush cycle.
|
||||
- **Forged records in user data.** WAL records are not bound to a store incarnation or lap, so bytes inside user data that happen to decode as a valid record could be replayed by the defensive scan. **Planned:** an incarnation nonce and lap in the next format, plus a clean-shutdown marker in the meantime.
|
||||
|
||||
@@ -763,7 +763,8 @@ writing the v1.0 format until you finalize. Until then you can go back.
|
||||
- What keeps the finalize safe in that case is which process can still serve: with no v1.0.x process running or
|
||||
able to start, every process that can serve a volume reads the v1.1 format, whatever report blockmaster received
|
||||
last.
|
||||
- v1.1.3 carries the process identity on every lease renewal and at the finalize, which removes this rule.
|
||||
- A later release (planned with v1.2) carries the process identity on every lease renewal and at the finalize,
|
||||
which removes this rule.
|
||||
|
||||
Then:
|
||||
|
||||
@@ -786,7 +787,7 @@ writing the v1.0 format until you finalize. Until then you can go back.
|
||||
intent and exits 74 so its supervisor restarts from disk. Run it under a restarting supervisor.
|
||||
ERROR delivery is best effort if logging is blocked; termination remains bounded. Inspect `format-level`
|
||||
after recovery before retrying. A failure before replacement leaves level 0 and can be retried.
|
||||
- **Exit codes:** **0** finalized or already finalized; **2** typed precondition/argument refusal; **75** proven unsent remote failure; **3** unknown answer (read the current level before retrying); **5** authentication rejection; **78** local credential/configuration failure; **4** unproven integrity readout; **1** other definite failure or caller cancellation/deadline before send. An unknown answer does not prove the level unchanged.
|
||||
- **Exit codes:** **0** finalized or already finalized; **2** typed precondition or server argument refusal; **75** proven unsent remote failure; **3** unknown answer (read the current level before retrying); **5** authentication rejection; **78** local credential/configuration failure; **4** unproven integrity readout; **1** local usage error (a missing, unknown or extra argument), other definite failure, or caller cancellation/deadline before send. An unknown answer does not prove the level unchanged.
|
||||
After a persistence fault the recovered level may be 0 or 1.
|
||||
- **JSON only.** The typed codes (`FORMAT_HOSTS_TOO_OLD`, and `HOST_HOLDS_WORK` below) appear only with `--json`.
|
||||
Plain output says `refused`.
|
||||
@@ -943,7 +944,7 @@ Volume status (`/status?volume=<id>`, heartbeats, cluster status):
|
||||
| `io_error` | A local I/O error latched the store. | Check the disk. Restart the volume once the disk is healthy. |
|
||||
| `store_format_newer`, `head_newer_version` (exit 78) | A later version wrote the store or HEAD. | Run the later version. The unit does not restart after a final exit. |
|
||||
|
||||
`sw-block` commands. The JSON answer carries a typed `code` or `reason`. ordinary definite `ops chunk` refusals exit 1; server argument refusals exit 2, authentication rejections 5, and local credential/configuration failures 78. A possibly admitted unknown answer exits 3, except incomplete verify uses 1 so it cannot be mistaken for completed findings; retryable unknown answers from `ops volume create` and `ops volume resolve` retain exit 75 under their documented same-operation rules. These two commands also retain exit 78 for server argument (`InvalidArgument`) and authentication/authorization (`PermissionDenied` or `Unauthenticated`, including certificate rejection) refusals, instead of the general exits 2 and 5. Local argument parsing still exits 2. See the [full compatibility table](releases/v1.1.2.md#cli-answer-classification).
|
||||
`sw-block` commands. The JSON answer carries a typed `code` or `reason`. ordinary definite `ops chunk` refusals exit 1; server argument refusals exit 2, authentication rejections 5, and local credential/configuration failures 78. A possibly admitted unknown answer exits 3, except incomplete verify uses 1 so it cannot be mistaken for completed findings; retryable unknown answers from `ops volume create` and `ops volume resolve` retain exit 75 under their documented same-operation rules. These two commands also retain exit 78 for server argument (`InvalidArgument`) and authentication/authorization (`PermissionDenied` or `Unauthenticated`, including certificate rejection) refusals, instead of the general exits 2 and 5. Local argument parsing still exits 2. See the [full compatibility table](releases/v1.1.2.md#full-exit-code-inventory).
|
||||
|
||||
| Code or reason | Seen from | Meaning | What to do |
|
||||
|---|---|---|---|
|
||||
@@ -961,9 +962,9 @@ Volume status (`/status?volume=<id>`, heartbeats, cluster status):
|
||||
| `remote_full` | cuts, snapshots | The chunk store has no space. | Add capacity, then retry. |
|
||||
| `queue_full` | cuts, snapshots | Reclamation work must drain before another producer publishes. | Retry later. |
|
||||
| `format_level_below_head_version` | cuts, in the holder log | The holder still runs at the format level it attached at, from before the finalize. | A v1.1.1 holder adopts the finalized level at its next lease renewal; restart a v1.1.0 holder (section 7). |
|
||||
| `no_progress` (retryable) | snapshot, snapshot-delete | The operation has not settled: a snapshot stalled (for example right after a finalize, section 7), or a snapshot delete's work did not finish in this call. Retrying a snapshot with the same request id settles it, which can take several minutes. | For snapshot, keep retrying with the same id. For snapshot-delete, do not resume it by hand: a resume can stop the volume's snapshot deletes and cleaning (see the snapshot delete known issue in the [v1.1.1 notes](releases/v1.1.1.md)). |
|
||||
| `no_progress` (retryable) | snapshot, snapshot-delete | The operation has not settled: a snapshot stalled (for example right after a finalize, section 7), or a snapshot delete's work did not finish in this call. Retrying a snapshot with the same request id settles it, which can take several minutes. | For snapshot, keep retrying with the same id. For snapshot-delete, every run prints its own line `chunkstore: metadata change guard:`, and the first run also prints `snapshot-delete NAME@G request id ...`. Repeat it with the same request id and `--gen G` only if all of these hold: the volume's holder reports `metadata_guard` `filer_chunk_condition` in its `/status/chunk`, and so did every holder process of this volume since the first run; no run of this delete came from a v1.1.1 `sw-block`; every run so far printed `filer_chunk_condition` (SeaweedFS 4.41 or later). Otherwise, or as soon as a run prints `page_reread_only` or no such line, do not repeat it by hand: a resume can stop the volume's snapshot deletes and cleaning (see the snapshot delete known issue in the [v1.1.2 notes](releases/v1.1.2.md)). Without `--gen` a repeat whose original receipt has retired resolves NAME again and can delete a newer snapshot of the same name. |
|
||||
| `snapshot_has_dependents` (exit 1) | snapshot-delete | A restored volume depends on the snapshot. Not retryable: retrying does not help until that volume is deleted. | Delete the dependent volume first (section 6), then run the same command with the same request id; or keep the snapshot. |
|
||||
| `layout_busy` (retryable, exit 1) | snapshot-delete | `layout: another transaction is open`: an earlier snapshot delete on the same volume waits for its cleaning pass, which can take up to `--chunk-maintenance-interval` (1 h). | Keep retrying with the same id; it settles after that pass. If it does not settle after a cleaning pass, see the snapshot delete known issue in the [v1.1.1 notes](releases/v1.1.1.md). |
|
||||
| `layout_busy` (retryable, exit 1) | snapshot-delete | `layout: another transaction is open`: an earlier snapshot delete on the same volume waits for its cleaning pass, which can take up to `--chunk-maintenance-interval` (1 h). | An earlier delete of this volume is waiting for its cleaning pass. Wait for that pass, then follow the `no_progress` row above: repeat with the same id only under its conditions. If `layout_busy` persists after a cleaning pass, the volume may have the stuck record described in the snapshot delete known issue in the [v1.1.2 notes](releases/v1.1.2.md); repeating does not clear it. |
|
||||
| `outcome_unknown` | various | The request may or may not have taken effect. | See below. |
|
||||
| `snapshot_exists`, `snapshot_limit` | snapshot | The name is taken, or there are too many snapshots. | Use another name, or delete old snapshots. |
|
||||
| `snapshot_not_found` | restore | No snapshot has that name. (To see it, you need a target in the spec; there is no need to provoke it.) | Check `ops chunk snapshots`. |
|
||||
@@ -979,9 +980,8 @@ Volume status (`/status?volume=<id>`, heartbeats, cluster status):
|
||||
|
||||
- **Commands with `--request-id`** (`ops chunk snapshot`, `snapshot-delete`, `restore`, `volume-delete`,
|
||||
`ops workspace move` with or without `--clean`, and `ops workspace force-move`): repeat the command with the same
|
||||
request id and unchanged original parameters until it answers (for snapshot expiry, see below). The answer settles what happened. This can take several minutes. Do not repeat an
|
||||
interrupted `snapshot-delete` by hand: a resume can stop the volume's snapshot deletes and cleaning (see the snapshot
|
||||
delete known issue in the [v1.1.1 notes](releases/v1.1.1.md)).
|
||||
request id and unchanged original parameters until it answers (for snapshot expiry, see below). The answer settles what happened. This can take several minutes. Exception: repeat an interrupted `snapshot-delete` only under the conditions in the `no_progress` row, and always
|
||||
with `--gen G` from the first run's `snapshot-delete NAME@G` line. Otherwise do not repeat it by hand.
|
||||
- **Snapshots with `--expires`:** re-running that relative duration computes a new absolute
|
||||
`expiresAtNs`, so even the same request id can be refused as a changed fingerprint. For a replay, replace
|
||||
`--expires` with `--expires-at-ns N`, using the original absolute value and all the other original parameters.
|
||||
|
||||
@@ -2,45 +2,81 @@
|
||||
|
||||
v1.1.2 is not yet released.
|
||||
|
||||
## Known issue: plain detach can abort during a periodic checkpoint
|
||||
v1.1.2 is a fix release of the v1.1 line. It changes no stored format. Upgrade in the usual order, the CLI first, then
|
||||
blockmaster, then each holder (see [Upgrade notes](#upgrade-notes)).
|
||||
|
||||
- **Trigger:** a periodic checkpoint's already-issued HEAD update lands while `sw-block ops chunk detach --plain` is stopping background work.
|
||||
- **Effect:** a confirmed `detach_aborted` means no sealed HEAD was published and serving resumed on the same holder. The CLI can instead report `outcome_unknown` (exit 3); that answer alone proves neither an abort nor resumed guest I/O. If the holder's detach outcome is still unresolved, I/O stays stopped while it settles.
|
||||
- **What to do:** confirm the original handle before treating this as a retryable abort. The holder keeps the handle only for about `--timeout` plus 5 s after the detach ends, and the CLI gives up about that long after its last progress, so query right after the CLI exits, or from a second shell while it still waits. The CLI prints the id (`sw-block ops chunk detach: id <id>` on stderr) only when the detach is still running after `--timeout`; an abort that ends sooner is answered on the detach request itself, with no id. If no id was printed, skip this GET and follow the unresolved-outcome procedure below, keeping guest I/O stopped. On the holder's host, query the same status address and volume used by the detach, with the id printed by the CLI:
|
||||
## Fixed v1.1.1 known issues
|
||||
|
||||
```sh
|
||||
STATUS_ADDR='<status address or URL used by the detach>'
|
||||
case "$STATUS_ADDR" in
|
||||
*://*) ;;
|
||||
*) STATUS_ADDR="http://$STATUS_ADDR" ;;
|
||||
esac
|
||||
VOLUME_ID='<volume-id>'
|
||||
CUT_ID='<id printed by the detach CLI>'
|
||||
curl --silent --show-error --max-time 5 --get \
|
||||
--data-urlencode "volumeID=$VOLUME_ID" \
|
||||
--data-urlencode "cutID=$CUT_ID" \
|
||||
--write-out '\nHTTP %{http_code}\n' \
|
||||
"${STATUS_ADDR%/}/chunk/cut"
|
||||
```
|
||||
- **`sw-block mini` as a non-root user.** `mini` now starts as any user with no `sudo` step. It keeps the volume lock
|
||||
under `--dir`. It prints every command with the absolute paths of `sw-block` and `weed`. After a failed start, it
|
||||
prints the `--reuse` command that starts again on the same `--dir`. It no longer takes a scheduled snapshot; take
|
||||
one with the `sw-block ops chunk snapshot` command it prints.
|
||||
- **Restarting blockmaster with many declared volumes**, on a dedicated or lightly written state filesystem. At
|
||||
startup blockmaster now rewrites only the node and placement records whose declaration changed, and keeps the
|
||||
others as stored. A restart with hundreds of unchanged declared volumes no longer runs past the running volumes'
|
||||
leases. A node's stored observation time is kept when its declaration is unchanged, so a restart does not make a
|
||||
silent node look fresh. On a state filesystem with heavy writes, a start can still wait: see
|
||||
[the busy-filesystem known issue](#known-issue-blockmaster-restart-can-stall-on-a-busy-filesystem).
|
||||
- **Startup retirement reads can delay blockmaster.** Retiring the metadata of deleted volumes now runs in the
|
||||
background after blockmaster starts serving, on its own connection, and is paced. A slow filer no longer delays
|
||||
the start, and a retirement outage no longer slows other calls such as a restore.
|
||||
- **Replicated volumes (preview): a queued rebalance can undo an operator failover.** blockmaster's automatic
|
||||
rebalance and failover name the volume line they were decided against. blockmaster refuses one when that line
|
||||
moved since (another replica or epoch, or other addresses). A rebalance decided just before
|
||||
`sw-block ops failover` is no longer applied after it.
|
||||
- **Resuming an interrupted snapshot delete can stop the volume's snapshot deletes and cleaning.** With a filer that
|
||||
enforces the chunk condition (SeaweedFS 4.41 or later) when every writer of the volume runs v1.1.2 (see the known
|
||||
issue below), a snapshot delete no longer publishes an intent whose page lost its data.
|
||||
- Metadata changes (blockvolume's and `sw-block`'s) send the filer's chunk write condition, so a stale change
|
||||
cannot land on an object deleted and created again since it was read.
|
||||
- Publication also re-reads each intent page.
|
||||
- blockvolume and the writing `sw-block` commands check at start whether the filer enforces the condition.
|
||||
- On a filer that does not enforce it, only the re-read protects the delete. That narrows the issue but does not
|
||||
close it: see [the remaining known issue](#known-issue-resuming-an-interrupted-snapshot-delete-can-stop-the-volumes-snapshot-deletes-and-cleaning).
|
||||
- A volume that already shows the v1.1.1 issue still needs the repair planned for a later release.
|
||||
|
||||
HTTP 200 with `apiVersion: 1`, the same `cutID` and a valid detach result means the detach completed. Keep the writer stopped, verify the detached HEAD against the holder, epoch and claim recorded before detach, and record its generation and position as in [step 3](../volume-lifecycle.md#planned-hand-over) before continuing. HTTP 202 with `apiVersion: 1`, the same `cutID` and `code: "in_progress"` means it is still running: keep guest I/O stopped and repeat only this read-only GET, not the detach POST.
|
||||
## Behaviour changes
|
||||
|
||||
HTTP 409 with `apiVersion: 1`, the same `cutID`, `code: "detach_aborted"` and `retryable: true` confirms this abort. The retained handle still occupies the detach slot until about `--timeout` plus 5 s after the abort. After either status or log confirmation, [repeat steps 1 and 2](../volume-lifecycle.md#planned-hand-over) immediately before a retry: require a granted lease for the same holder/epoch and save its current HEAD claim. Wait for that retention to expire before retrying the plain detach; if the retry answers `cut_busy` with reason `detach_in_progress`, wait and retry after expiry. This GET does not start another operation. Handles are transient: HTTP 404 `unknown_cut_id` (including after expiry or a holder restart), a failed query, or an unsettled answer does not confirm an abort. In that case keep guest I/O stopped, preserve the CLI output and holder logs, and follow [Recover an unknown plain detach](../volume-lifecycle.md#recover-an-unknown-plain-detach) before resuming I/O or moving the volume. A repeat may complete the intended final detach only with the guest writer stopped and kept stopped by the operator and authority unchanged; `plain_detach_busy` is not proof of a stopped writer. See the [repeat preconditions](../volume-lifecycle.md#recover-an-unknown-plain-detach). This repeat does not establish what the first attempt did; inspect `ops chunk show` for the resulting seal. A definite retryable CLI answer for this case is planned for v1.1.3.
|
||||
### A failover blockmaster decided now completes
|
||||
|
||||
## Fixed
|
||||
Before, a failover could stall with no publication in two cases:
|
||||
- a volume whose primary served before blockmaster's first check and then died;
|
||||
- a primary on a node that reads an older format level than the cluster.
|
||||
|
||||
- **Replicated volumes (preview): a queued rebalance no longer undoes an operator failover.** blockmaster's automatic
|
||||
rebalance and failover name the volume's line they were decided against, and blockmaster refuses one when that line
|
||||
moved since (another replica or epoch, or other addresses). A rebalance decided just before `sw-block ops failover`
|
||||
is no longer applied after it. This was a v1.1.1 known issue.
|
||||
Both now reach a publication. blockmaster's log also follows each failover decision with what happened to it
|
||||
(queued, already pending, or not submitted and why) and logs every publication.
|
||||
|
||||
## Known issue: blockmaster restart can stall on a busy filesystem
|
||||
### Format finalize refuses while a serving process has not reported
|
||||
|
||||
- **Trigger:** blockmaster's state filesystem also holds heavy writes, such as the holders' local data.
|
||||
- **Effect:** blockmaster's start syncs its state directories, which can wait for the filesystem journal. When the import has changed records, it also runs a `syncfs` for each store with changed records on ext4, XFS, btrfs or tmpfs (Linux 5.8 or later), which waits for every pending write on that filesystem, including the holders' data. Starts took from about 20 seconds to over 150 seconds in our tests (one start was not ready after 2 minutes); this is not an upper bound. A volume whose lease expires stops serving until blockmaster is back; it is then granted again on the same holder, with its data. A forced move during that time can lose writes after the last published HEAD (see [forced move](../volume-lifecycle.md#after-a-crash)).
|
||||
- **What to do:** In v1.1.2, with the state directory on its own filesystem, blockmaster's start no longer syncs any directory on the shared filesystem. Under one buffered-write load, three starts per case measured shared warm/cold medians of 31.3/122.9 seconds and dedicated medians of 1.6/2.5 seconds, with a dedicated warm maximum of 13.2 seconds. Warm directory fsyncs fell from 30 to 15; shared root-filesystem directory fsyncs fell from 30 to 0. These are measurements under that load, not a start-time promise. Run `sync` after creating and mounting the state filesystem. For a new install, install the units, then mount it and configure its persistent mount and the unit's mount dependency before the first start. Migrating existing state stops service; volumes fence once the downtime outlasts their leases. Stop and disable blockmaster (with v1.1.0 volume units, stop and disable the host's volumes first), copy all state preserving ownership and permissions, verify and sync the copy, then move the unmounted original directory aside (if it is a mount point itself, unmount it, keep that filesystem as the backup, and move the directory it uncovers aside too) and create an empty mount point. Configure the persistent mount and the unit's `RequiresMountsFor` plus `AssertPathIsMountPoint` drop-in, mount the copy, verify its stores and run `sync`. Enable and start blockmaster and confirm that it opens the copied stores and reloads existing records; only then remove the moved original. Never leave stale stores beneath the mount or start against an empty replacement. Follow the [state migration steps](../operations-manual.md#1-install-the-binaries-and-units). Keep holders' data off the state filesystem; a different directory on it is not enough. Restart blockmaster at low write load on the state filesystem, including when the cluster spec has not changed. If device lookup fails, a logged fallback retains the full ancestor walk.
|
||||
`sw-block cluster finalize-format` now refuses with `FORMAT_HOSTS_TOO_OLD` (exit 2) while a volume process that may
|
||||
still serve has not reported reading format level 1. The answer names the host and volume. Upgrade that host's
|
||||
volume process to v1.1.2 and let it report (one heartbeat), or move the volume away, then retry. A volume whose
|
||||
holder released it cleanly, or whose lease has ended, does not block. A placement on a host with an old process still
|
||||
blocks until that process is upgraded or the placement moves.
|
||||
|
||||
## Recovery after an unusable chunk conflict answer
|
||||
The finalize judges each volume by the last report blockmaster received. A delayed report can stand in for a newer
|
||||
process, so this operator rule still applies:
|
||||
|
||||
- **Format finalize: operator rule.** From the end of the upgrade until `sw-block cluster finalize-format` completes:
|
||||
- no v1.0.x volume process may run or start on any host. Check it on each host from the running processes
|
||||
(`/proc/<pid>/exe --version`) and the units' binaries, each printing exactly the revision of the v1.1.x binary
|
||||
you installed with `modified=false`, not from blockmaster;
|
||||
- wait 30 seconds after the last volume process start before finalizing.
|
||||
|
||||
The finalize now refuses while a serving volume process reports an older read level. A delayed heartbeat report
|
||||
can still stand in for a newer process, and the rule covers that case. A later release (planned with v1.2)
|
||||
removes the rule. See the
|
||||
operations manual.
|
||||
|
||||
### Persistence faults exit 74
|
||||
|
||||
If blockmaster cannot be sure a write of its lifecycle records reached disk (a put, the startup import, the open
|
||||
barrier), it now exits 74 instead of 1, so that its supervisor restarts it from disk. A finalize that fails after it
|
||||
replaced the format file does the same; one that fails before that reports the error and leaves level 0. Run
|
||||
blockmaster under a restarting supervisor, as the shipped unit does. After blockmaster exits 74 during a finalize,
|
||||
check `sw-block cluster format-level` once it is back, before retrying: it can be 0 or 1.
|
||||
|
||||
### Recovery after an unusable chunk conflict answer
|
||||
|
||||
For snapshot admission and non-plain detach, an unusable HTTP 409 body
|
||||
reports `outcome_unknown` (exit 3); status alone cannot prove non-admission.
|
||||
@@ -54,39 +90,61 @@ published snapshot's expiry. Within the existing command window, retries
|
||||
retain the original request body and ID. Complete typed replies keep their
|
||||
own code and retry flag. The separate cut/plain-detach observer is unchanged.
|
||||
|
||||
## CLI answer classification
|
||||
### Exit codes: one rule for every command
|
||||
|
||||
A remote connectivity failure for a request the CLI can prove was never
|
||||
sent exits 75: retry the same command after connectivity recovers. If the request may have reached the
|
||||
server, it exits 3 (`outcome_unknown`): recover the original operation with
|
||||
its request id, or read the current state, before starting anything new.
|
||||
Typed server refusals and the command-specific exceptions below keep their
|
||||
own exits.
|
||||
Every command now classifies a failure by whether its request may have reached the server:
|
||||
|
||||
A certificate, trust or name rejection exits 5 only when fresh, complete
|
||||
evidence from this call proves rejection on every attempted endpoint; cached
|
||||
failures or a changed endpoint set cannot establish that proof.
|
||||
A mix of certificate rejection and an unreachable endpoint stays retryable
|
||||
when nothing was sent. An unsent plaintext-client connection failure exits
|
||||
75 with a hint to check the TLS settings. If sending cannot be ruled out,
|
||||
the outcome stays unknown (exit 3). This corrects v1.1.1's unproven terminal
|
||||
exit 5 for that case.
|
||||
|
||||
A CA bundle may keep expired or not-yet-valid certificates during rotation
|
||||
as long as one is currently valid. A bundle with none, or an expired client
|
||||
certificate, exits 78.
|
||||
|
||||
Default failure exits are listed below; documented command exceptions follow.
|
||||
|
||||
| Failure class | Exit | Same-operation action |
|
||||
| Exit | Meaning | What to do |
|
||||
| --- | --- | --- |
|
||||
| Ordinary definite refusal, or caller cancellation/deadline before sending | 1 | Follow the stated cure or inspect the caller's chosen window before resuming. |
|
||||
| Command syntax or typed server argument refusal | 2 | Correct the arguments before retrying. |
|
||||
| Possibly admitted `outcome_unknown` | 3 | Replay the original key or poll/read; do not start another operation. |
|
||||
| Unproven integrity readout, `readout_unproven` | 4 | Inspect integrity evidence before proceeding; `cut_busy` is a separate documented use of 4 below. |
|
||||
| Certificate, trust or name rejection, `not_authorized` | 5 | Fix authentication/configuration first. A failed status poll still leaves its earlier operation unresolved. |
|
||||
| Proven unsent `remote_unavailable` | 75 | Retry the same operation after connectivity recovers. |
|
||||
| Typed local credential or connection configuration failure | 78 | Fix local files/configuration before dialing. This is distinct from command syntax or a typed server argument refusal. |
|
||||
| 0 | Success | — |
|
||||
| 1 | Ordinary definite refusal, or the caller ended the attempt before sending | Read the answer |
|
||||
| 2 | Usage error, or the server refused an argument | Fix the command |
|
||||
| 3 | `outcome_unknown`: the request may have been admitted | Recover the original operation by its request id, or read the current state, before starting another, except snapshot-delete under `page_reread_only`; see the [known issue](#known-issue-resuming-an-interrupted-snapshot-delete-can-stop-the-volumes-snapshot-deletes-and-cleaning) |
|
||||
| 4 | Integrity readout not proven | Inspect before acting |
|
||||
| 5 | Authentication rejected (certificate, trust, name or role) | Fix the credentials |
|
||||
| 75 | The request was proven not sent, or the server's answer permits a retry | Retry the same operation |
|
||||
| 78 | Local credential or connection configuration is wrong | Fix the local setup |
|
||||
|
||||
Exceptions kept from v1.1.x:
|
||||
- `ops chunk verify` exits 1 for an incomplete answer; 3 there means a completed scan with findings.
|
||||
- `ops failover` exits 3 for an unsent failure or a caller deadline before sending (read the line before another
|
||||
move).
|
||||
- `ops volume create` and `ops volume resolve` keep 75 for a retryable unknown and 78 for definite refusals.
|
||||
- `cluster finalize-format` and `cluster retire-host` keep 2 for their typed preconditions, and exit 1, not 2,
|
||||
for a local usage error (a missing, unknown or extra argument).
|
||||
- A manual cut or plain detach answering `cut_busy` exits 4, a documented use separate from an integrity readout.
|
||||
- `volume restore --abort` exits 1 for any failure, also when the step it ran answered 3 or 75, and 2 when its
|
||||
check refuses the target.
|
||||
|
||||
Changes from v1.1.1 that scripts are most likely to see:
|
||||
|
||||
| Command / failure | v1.1.1 | v1.1.2 |
|
||||
| --- | --- | --- |
|
||||
| Workspace commands: connection never made (refused, DNS, handshake timeout) | 3 | 75 |
|
||||
| Workspace commands: plaintext client at a TLS endpoint (failed preface) | 5 | 75 when nothing was sent, with a hint to check the TLS settings; 3 when sending cannot be ruled out |
|
||||
| Workspace and cluster commands: certificate, trust or name rejection | 3, 1 or 75 | 5 |
|
||||
| Workspace and cluster commands: local credential or configuration error | 2 | 78 |
|
||||
| Cluster commands: request possibly admitted | 75 or 1 | 3 |
|
||||
| `ops chunk`: request possibly admitted, including snapshot polls | 75 | 3 |
|
||||
| `ops chunk`: server error code the CLI does not know | 1 | 3 |
|
||||
| `ops chunk`: server argument refusal (`bad_request`) | 1 | 2 |
|
||||
| `ops chunk detach --plain`: malformed seal result after admission | 1 | 3 |
|
||||
| Snapshot observation: answered "succeeded" without a valid result | 1 | 3 |
|
||||
| `ops chunk` snapshot and non-plain detach: unusable HTTP 409 answer body | 1 | 3 |
|
||||
| `ops chunk`: retryable `not_admitted` outside volume-delete | 1 | 75 |
|
||||
| `ops chunk`, `volume restore`, `ops chunk restore`: authentication rejection | 1 or 2 | 5 |
|
||||
| `volume restore`: typed server refusal | 2 | 1; a server argument refusal (`bad_request`), a placement conflict found by the placement check and a local settings refusal stay 2. `volume backup` refusals stay 2 |
|
||||
| `volume restore`, `volume backup`: ambiguous answer | 1 or 2 | 3, except `volume restore --abort` |
|
||||
| `volume restore`, `volume backup`: request proven not sent | 1 | 75, except `volume restore --abort` |
|
||||
| Any command: caller deadline or cancel before sending | 75 or 3 | 1; an `ops failover` deadline before sending stays 3 |
|
||||
| `ops volume create` / `resolve`: DataLoss | 75 / 78 | 4 |
|
||||
| `ops failover`: DataLoss | 3 | 4 |
|
||||
| `cluster finalize-format` / `retire-host` | 0, 1, 2, 75 | also 3 with `--json` result `unknown` when the request may have been admitted; 5 not authorized; 78 local credential error; 2 with result `failed` for a server argument refusal (a typed precondition is still 2 with `refused`) |
|
||||
|
||||
Every command family and the compatibility exceptions are in the [full inventory](#full-exit-code-inventory)
|
||||
below.
|
||||
|
||||
#### Full exit-code inventory
|
||||
|
||||
The table below compares the shipped v1.1.1 CLI (the compatibility baseline)
|
||||
with this correction. Admission phase is evidence, not the gRPC status name.
|
||||
@@ -130,7 +188,7 @@ second non-idempotent operation after an uncertain answer.
|
||||
| Chunk verify: incomplete lost answer | 75 for transport; 1 for other incomplete failure | 1 with JSON `outcome_unknown` | Read-only retry is safe; **3 is reserved for a completed scan with findings**. Proven unsent/retryable remote failure remains 75. |
|
||||
| Chunk verify: authentication/configuration/argument/integrity failure | 1 or 2 | 5 / 78 / 2 / 4 | These exits correspond to authentication, configuration, arguments and integrity respectively. A failed walk may discard prior findings and return no partial result. Final HEAD confirmation failure instead returns the ordinary incomplete result, possibly without a code, and exits 1. No incomplete path uses findings exit 3. |
|
||||
| Chunk blob HTTP failure through layout adapters | usually 1 (or 75 for recognized outage) | 500/503: 3 (verify incomplete: 1); 401/403: 5; 400: 2 | HTTP response facts use the same registry; 404/409 protocol-state handling is unchanged. |
|
||||
| `volume restore`: typed refusal, including placement step | 2 | 1 | Resolve the stated prerequisite; no new restore after an unknown result. |
|
||||
| `volume restore`: typed refusal, including placement step | 2 | 1; 2 for a server argument refusal (`bad_request`), a local settings refusal or a placement conflict found by the placement check | Resolve the stated prerequisite; no new restore after an unknown result. |
|
||||
| `volume restore`: PermissionDenied/Unauthenticated, including placement | 2 | 5 | Fix the caller role/certificate. |
|
||||
| `volume restore` and interrupted backup: ambiguous transport/workflow answer | 1 or 2 | 3 | Keep the original derived request identity and resume/abort instructions. |
|
||||
| `ops chunk restore`: authentication or TLS certificate rejection | 1 or 2 | 5 | Fix role/certificate. |
|
||||
@@ -188,33 +246,191 @@ still exits 2. No authority, lease or cleanup guard is relaxed by this change.
|
||||
For transport evidence, certificate handling and the shared registry's design,
|
||||
see [shared failure policy](../design/answer-classification.md).
|
||||
|
||||
## Format finalize
|
||||
### blockmaster on its own state filesystem
|
||||
|
||||
`sw-block cluster finalize-format` now refuses with `FORMAT_HOSTS_TOO_OLD` (exit 2) while a volume process that
|
||||
may still serve has not reported reading format level 1. The answer names the host and volume. Upgrade that host's
|
||||
volume process to v1.1.2 and let it report (one heartbeat), or move the volume away, then retry. A volume whose
|
||||
holder released it cleanly, or whose lease has ended, does not block. A placement on a host with an old process
|
||||
still blocks until that process is upgraded or the placement moves.
|
||||
With blockmaster's state directory on its own filesystem, its start no longer syncs any directory of the shared
|
||||
filesystem above it. Under one buffered-write load, three starts per case gave these medians:
|
||||
|
||||
If the finalize fails after it replaced the format file, so that the new level may or may not be durable,
|
||||
blockmaster exits 74 so that its supervisor restarts it from disk. Run blockmaster under a restarting supervisor.
|
||||
After the restart, check `format-level` before retrying: it can be 0 or 1. A failure before the replacement
|
||||
(writing, syncing or renaming the new file) does not exit: the finalize reports the error, the level stays 0, and
|
||||
the finalize can be retried.
|
||||
| State directory | Warm start | Cold start |
|
||||
| --- | --- | --- |
|
||||
| On the shared filesystem | 31.3 s | 122.9 s |
|
||||
| On its own filesystem | 1.6 s (maximum 13.2 s) | 2.5 s |
|
||||
|
||||
The finalize judges each volume by the last report blockmaster received. A delayed report can stand in for a newer
|
||||
process, which is why the operator rule below still applies in v1.1.2.
|
||||
These are measurements under that load, not a start-time promise. If blockmaster cannot read a directory's
|
||||
device, it logs that and falls back to syncing every ancestor up to `/`, as before. To move existing state, follow
|
||||
the
|
||||
[state migration steps](../operations-manual.md#1-install-the-binaries-and-units). Migration stops service:
|
||||
volumes fence once blockmaster's downtime outlasts their leases.
|
||||
|
||||
- **Format finalize: operator rule.** From the end of the upgrade until `sw-block cluster finalize-format` completes:
|
||||
- no v1.0.x volume process may run or start on any host. Check it on each host from the running processes
|
||||
(`/proc/<pid>/exe --version`) and the units' binaries, each printing exactly the revision of the v1.1.x binary
|
||||
you installed with `modified=false`, not from blockmaster;
|
||||
- wait 30 seconds after the last volume process start before finalizing.
|
||||
## Known issues
|
||||
|
||||
The finalize now refuses while a serving volume process reports an older read level. A delayed heartbeat report
|
||||
can still stand in for a newer process, and the rule covers that case. v1.1.3 removes the rule. See the
|
||||
operations manual.
|
||||
### Known issue: format finalize still relies on the operator rule
|
||||
|
||||
## Lifecycle persistence failures
|
||||
See [Format finalize](#format-finalize-refuses-while-a-serving-process-has-not-reported): a delayed heartbeat report
|
||||
can stand in for a newer process. A later release (planned with v1.2) carries the process identity on every renewal and removes the rule.
|
||||
|
||||
A blockmaster lifecycle put, import or open-barrier persistence failure exits with durability-unknown status 74 instead of generic status 1. Both immediate termination and the one-second fallback use that status. The best-effort ERROR diagnostic names `lifecycle_persist_failed`. Run blockmaster under supervision so a failed process restarts from durable state; record ordering, recovery barriers and import syncfs selection are unchanged.
|
||||
### Known issue: resuming an interrupted snapshot delete can stop the volume's snapshot deletes and cleaning
|
||||
|
||||
From v1.1.1; fixed only with a SeaweedFS filer that enforces the chunk condition.
|
||||
|
||||
- **Fixed with SeaweedFS 4.41 or later when every writer is v1.1.2 and guarded.** `sw-block` probes the filer
|
||||
before a snapshot delete and prints `chunkstore: metadata change guard: filer_chunk_condition`. It then writes a
|
||||
delete's metadata only while the objects it read are unchanged, so an earlier run's late update cannot leave the
|
||||
broken record. The condition binds only writers that send it, and the volume host's cleaner is one of them.
|
||||
Resuming with the same `--request-id` (and `--gen G`, from the first run's `snapshot-delete NAME@G` line) is safe
|
||||
when:
|
||||
- the volume's holder reports `metadata_guard` `filer_chunk_condition` in `/status/chunk`, as did every holder
|
||||
process of the volume since the first run;
|
||||
- no earlier run of that delete came from a v1.1.1 `sw-block`;
|
||||
- every run, the resume included, printed `filer_chunk_condition`.
|
||||
- **Narrowed with an older filer** (`page_reread_only`). The delete re-reads its page before publishing it, which
|
||||
refuses a page that is already gone. A page whose data the filer is still freeing can pass that check, so the
|
||||
record can still form. Do not resume an interrupted snapshot delete by hand there.
|
||||
- **Recovery:** still none. A volume that already shows the symptom (every snapshot delete answers `layout_busy`, and
|
||||
cleaning has stopped) needs the repair planned for v1.1.3. Its data and other snapshots stay readable.
|
||||
|
||||
### Known issue: deleting a fully overwritten restored volume can leave its source snapshot undeletable
|
||||
|
||||
The delete releases only the sources that the volume's data still references. If every chunk was overwritten, the
|
||||
source snapshot keeps the deleted volume as a dependent, and its delete keeps answering `snapshot_has_dependents`. No
|
||||
data is lost: the snapshot is kept. To release it, run
|
||||
`sw-block ops chunk release --master MASTER --source S --target T --chunk-filer FILER`, where T is the deleted volume.
|
||||
Then run the snapshot delete again with the same request id and `--gen G`, only under the conditions in the operations
|
||||
manual's `no_progress` row: the rerun resumes the interrupted delete.
|
||||
|
||||
### Known issue: blockmaster restart can stall on a busy filesystem
|
||||
|
||||
When blockmaster's state filesystem also holds heavy writes, such as the holders' local data, its start can wait
|
||||
for the filesystem journal. Under one buffered-write load with the state directory on the shared filesystem, warm
|
||||
starts had a median of 31.3 seconds (13.6 to 75.7 seconds over three starts), and cold starts a median of
|
||||
122.9 seconds (120.0 to 124.8 seconds). These are not upper bounds. A volume whose lease expires stops serving until
|
||||
blockmaster is back; it is then granted again on the same holder, with its data. A forced move during that time can
|
||||
lose writes after the last published HEAD (see [forced move](../volume-lifecycle.md#after-a-crash)). Keep the
|
||||
holders' data off blockmaster's state filesystem (see
|
||||
[above](#blockmaster-on-its-own-state-filesystem)). Restart blockmaster at low write load on that filesystem.
|
||||
|
||||
### Known issue: blockmaster needs its filer to start (checkpointed volumes)
|
||||
|
||||
This applies when blockmaster runs with `--workspace-rpc`, the setting checkpointed volumes need. A cluster that
|
||||
serves only replicated volumes can run without it, and blockmaster then opens no filer connection.
|
||||
|
||||
blockmaster checks that its filer answers before it starts. If the filer is unreachable, blockmaster stops with an
|
||||
error after about 60 s. Running volumes stop when their leases run out. Start or fix the filer first.
|
||||
|
||||
### Known issue: a walstore volume unit can reach its systemd start limit while blockmaster is unreachable
|
||||
|
||||
Unchanged from [v1.1.1](v1.1.1.md#known-issue-a-walstore-volume-unit-can-reach-its-systemd-start-limit-while-blockmaster-is-unreachable).
|
||||
Recover with `systemctl reset-failed <unit>`, then `systemctl start <unit>`. A fix is planned for a later v1.1.x
|
||||
release.
|
||||
|
||||
### Known issue: `sw-block ops chunk detach --plain` waits for a scheduled periodic cut
|
||||
|
||||
Unchanged from v1.1.1. No data is lost. A fix is planned for a later v1.1.x release.
|
||||
|
||||
### Known issue: plain detach can abort during a periodic checkpoint
|
||||
|
||||
- **Trigger:** a periodic checkpoint's already-issued HEAD update lands while `sw-block ops chunk detach --plain` is stopping background work.
|
||||
- **Effect:** a confirmed `detach_aborted` means no sealed HEAD was published and serving resumed on the same holder. The CLI can instead report `outcome_unknown` (exit 3); that answer alone proves neither an abort nor resumed guest I/O. If the holder's detach outcome is still unresolved, I/O stays stopped while it settles.
|
||||
- **What to do:** confirm the original handle before treating this as a retryable abort. The holder keeps the handle only for about `--timeout` plus 5 s after the detach ends, and the CLI gives up about that long after its last progress, so query right after the CLI exits, or from a second shell while it still waits. The CLI prints the id (`sw-block ops chunk detach: id <id>` on stderr) only when the detach is still running after `--timeout`; an abort that ends sooner is answered on the detach request itself, with no id. If no id was printed, skip this GET and follow the unresolved-outcome procedure below, keeping guest I/O stopped. On the holder's host, query the same status address and volume used by the detach, with the id printed by the CLI:
|
||||
|
||||
```sh
|
||||
STATUS_ADDR='<status address or URL used by the detach>'
|
||||
case "$STATUS_ADDR" in
|
||||
*://*) ;;
|
||||
*) STATUS_ADDR="http://$STATUS_ADDR" ;;
|
||||
esac
|
||||
VOLUME_ID='<volume-id>'
|
||||
CUT_ID='<id printed by the detach CLI>'
|
||||
curl --silent --show-error --max-time 5 --get \
|
||||
--data-urlencode "volumeID=$VOLUME_ID" \
|
||||
--data-urlencode "cutID=$CUT_ID" \
|
||||
--write-out '\nHTTP %{http_code}\n' \
|
||||
"${STATUS_ADDR%/}/chunk/cut"
|
||||
```
|
||||
|
||||
HTTP 200 with `apiVersion: 1`, the same `cutID` and a valid detach result means the detach completed. Keep the writer stopped, verify the detached HEAD against the holder, epoch and claim recorded before detach, and record its generation and position as in [step 3](../volume-lifecycle.md#planned-hand-over) before continuing. HTTP 202 with `apiVersion: 1`, the same `cutID` and `code: "in_progress"` means it is still running: keep guest I/O stopped and repeat only this read-only GET, not the detach POST.
|
||||
|
||||
HTTP 409 with `apiVersion: 1`, the same `cutID`, `code: "detach_aborted"` and `retryable: true` confirms this abort. The retained handle still occupies the detach slot until about `--timeout` plus 5 s after the abort. After either status or log confirmation, [repeat steps 1 and 2](../volume-lifecycle.md#planned-hand-over) immediately before a retry: require a granted lease for the same holder/epoch and save its current HEAD claim. Wait for that retention to expire before retrying the plain detach; if the retry answers `cut_busy` with reason `detach_in_progress`, wait and retry after expiry. This GET does not start another operation. Handles are transient: HTTP 404 `unknown_cut_id` (including after expiry or a holder restart), a failed query, or an unsettled answer does not confirm an abort. In that case keep guest I/O stopped, preserve the CLI output and holder logs, and follow [Recover an unknown plain detach](../volume-lifecycle.md#recover-an-unknown-plain-detach) before resuming I/O or moving the volume. A repeat may complete the intended final detach only with the guest writer stopped and kept stopped by the operator and authority unchanged; `plain_detach_busy` is not proof of a stopped writer. See the [repeat preconditions](../volume-lifecycle.md#recover-an-unknown-plain-detach). This repeat does not establish what the first attempt did; inspect `ops chunk show` for the resulting seal. A definite retryable CLI answer for this case is planned for v1.1.3.
|
||||
|
||||
### Known issue: SeaweedFS rack or data center outage
|
||||
|
||||
**SeaweedFS rack or data center outage (SeaweedFS releases up to 4.56).** When a SeaweedFS data center or rack is down
|
||||
and the chunk replication cannot be placed, SeaweedFS does not refuse the upload; each upload waits until it times out.
|
||||
|
||||
- **Guest I/O** continues.
|
||||
- **Checkpoints and snapshots** cannot complete:
|
||||
- a cut answers `cut_stalled` (retryable) after its progress window;
|
||||
- a snapshot reports `no_progress`; repeat it with the same `--request-id` after recovery;
|
||||
- nothing partial is published.
|
||||
- **A restore** answers `outcome_unknown` and leaves its target pending; resume it with the same request ID after
|
||||
recovery.
|
||||
- **A plain detach** stops guest I/O while its final cut runs, then answers `cut_stalled` with the text
|
||||
`detach outcome unknown; I/O stays stopped`. Its `--timeout` (120 s by default) is a no-progress window: each
|
||||
completed step renews it. With no upload progress the stop lasts about `--timeout`; with partial progress it can
|
||||
last longer.
|
||||
- That text describes the moment of the answer. Next, the volume host proves that nothing was published, resumes
|
||||
serving and logs `durable: detach of volume=V aborted, nothing published; serving resumed`.
|
||||
- This is a log-confirmed abort, as in [Recover an unknown plain detach](../volume-lifecycle.md#recover-an-unknown-plain-detach).
|
||||
- After the outage, wait for the old handle's retention to expire, repeat steps 1 and 2 and detach again.
|
||||
- If that log line does not appear, for example because the filer is also unreachable, keep the writer stopped and
|
||||
leave the volume host running. It keeps retrying the settlement, and resumes serving or reports the seal once the
|
||||
filer answers.
|
||||
|
||||
Do not start plain detaches or restores during the outage. SeaweedFS releases that carry degraded volume growth
|
||||
complete these operations with fewer copies.
|
||||
|
||||
## Network trust
|
||||
|
||||
**Network trust.** blockmaster's control API authenticates callers with mutual TLS and authorizes them by role
|
||||
(viewer, operator, admin, node) when `--tls-cert`, `--tls-key`, `--tls-client-ca`, `--role-file` and `--audit-log`
|
||||
are all set. The audit log records volume create and delete, failback, workspace binding registration, placement, move and
|
||||
revoke, format finalize and host retirement before they run, and refuses such a call when it cannot record it; other
|
||||
calls by people are recorded after they run, as far as the log allows. Without these flags blockmaster accepts only loopback connections. Nothing else is encrypted, and only
|
||||
the iSCSI target authenticates its clients:
|
||||
- the volume host's status and chunk control HTTP endpoints have no authentication and listen on loopback unless
|
||||
`--allow-external-status-bind` is set, which a volume host that authenticates to blockmaster (`--master-tls-cert`)
|
||||
refuses;
|
||||
- the replication channel between replicas (replicated volumes, preview) has no authentication;
|
||||
- the connection to the SeaweedFS filer and volume servers has no authentication of its own: anyone who can reach
|
||||
the filer can read or change any volume's metadata and chunks, which are stored unencrypted;
|
||||
- the NVMe/TCP target has no authentication and listens on loopback unless `--allow-external-nvme-bind` is set;
|
||||
- the iSCSI target listens off loopback only with `--allow-external-iscsi-bind`, which requires CHAP
|
||||
(`--iscsi-chap-username`, `--iscsi-chap-secret`) for normal sessions; discovery sessions are not authenticated, so
|
||||
any initiator that reaches the port can list the target name and portal; on loopback CHAP is optional; its traffic
|
||||
is not encrypted.
|
||||
|
||||
Run these on a trusted network only, and keep blockmaster's key files, role file and audit log readable only by its
|
||||
service user.
|
||||
|
||||
A CA bundle block that does not parse is skipped without a log line, as in v1.1.1. Each process reads its CA
|
||||
bundle only when it starts; only its own certificate and key are read again at each connection. To rotate a root:
|
||||
1. Check the new root on its own (`openssl x509 -in new-root.pem -noout`).
|
||||
2. Add it to every CA bundle and confirm that each installed bundle lists it (`openssl crl2pkcs7 -nocrl -certfile
|
||||
<bundle> | openssl pkcs7 -print_certs -noout`).
|
||||
3. Restart every process that uses a bundle: blockmaster, each volume host, and the CLI hosts' long-running commands.
|
||||
From now on each trusts both roots.
|
||||
4. Issue each process a certificate from the new root: blockmaster's server certificate and every client certificate
|
||||
(volume hosts and CLI). blockmaster authorizes each client by its certificate's fingerprint in `--role-file`, so
|
||||
before a client uses its new certificate, add the new certificate's fingerprint to the role file with the same role
|
||||
and id, send blockmaster `SIGHUP`, and check that its log says `role file ... reloaded`. Keep the old entries. Each
|
||||
certificate is read again at its next connection. Confirm both directions: every client connects with its new
|
||||
certificate and its role, and verifies blockmaster's new certificate.
|
||||
5. Remove the old root from every bundle, then restart every process again: until it restarts, a process still trusts
|
||||
the old root. Confirm that a connection with a certificate from the old root now fails. Then remove the old
|
||||
certificates' fingerprints from the role file and send blockmaster `SIGHUP`.
|
||||
|
||||
OpenSSL accepts some certificates that sw-block rejects (for example a negative serial number), so the connection
|
||||
checks in steps 4 and 5 are the proof.
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
- **Order:** the CLI first, then blockmaster, then each holder, as in
|
||||
[section 7](../operations-manual.md#7-upgrade-and-finalize-the-v11-format).
|
||||
- **Scripts that check exit codes:** see [Exit codes](#exit-codes-one-rule-for-every-command). The most likely
|
||||
differences are 75 (not 3) for a connection never made, 3 (not 75) for a request that may have been admitted, and
|
||||
5 for an authentication rejection. `ops failover`, `ops volume create` and `ops volume resolve` keep the exceptions
|
||||
listed there (failover 3 for an unsent request; create and resolve 75 for a retryable unknown answer, while a
|
||||
non-retryable typed unknown stays 3, and 78 for a refusal, authentication included).
|
||||
- **Finalize from v1.1.0:** follow the operator rule above until `sw-block cluster finalize-format` completes.
|
||||
- **Supervision:** run blockmaster under a restarting supervisor, so an exit 74 restarts it from disk.
|
||||
- **`mini` users:** the two `sudo install` lines of the v1.1.1 Quick Start are no longer needed.
|
||||
Reference in new issue
Block a user