Commit Graph
57 Commits
Author SHA1 Message Date
Ping Qiu 13d0627043 Merge pull request #864 from seaweedfs/fix/holder-cgroup-memory
blockvolume: derive the default Go soft memory limit from its cgroup
2026-11-30 22:59:12 -08:00
pingqiu 60e482f978 blockvolume: derive the default Go memory limit from its cgroup 2026-11-30 21:40:44 -08:00
pingqiuandClaude Opus 5.5 68045d9698 durable: remove the smartwal and parallel-walstore engines
- The provider refuses the removed names and, under every selector and
  before any selector comparison, a volume carrying their magic (SWAW;
  SWPW in either header slot), reading the file read-only and never
  modifying it. blockvolume --durable-impl and the launcher refuse the
  names with the same advice; the chart schema allows walstore only.
- core/storage/smartwal, core/storage/parallelwal and
  cmd/sw-block-testutil (whose one command corrupted smartwal records)
  are deleted, with the helm smartwal-corruption scenario and the
  parallel-walstore gate script.
- The replication harness runs on walstore; tests that ran on a removed
  engine only because a stub needed some store move to walstore, and the
  state_convergence label test moves to the in-memory BlockStore.
- sw-block cluster.check drops the removed engines' cases.
- Ledger: INV-OPEN-REMOVED-ENGINE-REFUSED-001 and
  INV-OPEN-REMOVED-ENGINE-NAME-REFUSED-001, an OpenRefused edge in M1, and
  the rows citing the removed tests updated. Docs: block-design 1.3 now
  describes the removal, the smartwal deep-dive and figure are gone, the
  scripts default to walstore, and the v1.1 notes carry the removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:38:54 -08:00
pingqiuandClaude Opus 5.5 549524f537 lab tag: a lab binary names itself and no image can hold one
A lab build's revision carries LAB BUILD(swblock_lab_bigvol), so -version and
the volume's /status show it. Every image Dockerfile runs
scripts/refuse-lab-binary.sh right after its go build: a binary that is a
lab build, or cannot answer -version, stops the image build, so neither
the publish workflow nor the image scripts can push one. lab-tag-check.sh
now fails closed: an allowlist of the files that may name the tag (git grep;
a scan that cannot run fails), plus the wiring (each Dockerfile refuses
after its last build; the publish workflow builds only from those, with no
go build of its own). Controls cover each contamination and the refusal
script's stand-in binaries. The lab headroom test asserts the warning, and
both invariant rows name the lab exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:22:45 -08:00
pingqiu 78c73da039 Merge #798 bf833228 into train/20261130-t3 2026-11-29 19:59:57 -08:00
pingqiu 8897b14971 feat: stop restarted holders after recorded revocation 2026-11-29 15:51:36 -08:00
pingqiu ba524999fb fix: require master workspace lease for chunk volume startup 2026-11-29 10:35:23 -08:00
pingqiuandClaude Opus 5.5 400cf3edf7 fix(blockvolume): the template passes --volume-id=%i; guests are an observation, not complete detection
Review follow-up. The template unit takes the volume id from its
instance name, so a settings file cannot name another volume (a fourth
per-instance directive, kept by the drift test). /status/guests and its
schema say what it is: the counted frontends (NVMe/TCP, iSCSI) only; an
absent frontend is not served or not counted; a vanished host stays
counted until TCP closes; 0 is not proof that nothing uses the volume.
The endpoint test's callbacks use atomics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:25:31 -08:00
pingqiuandClaude Opus 5.5 a321c6bee4 feat(blockvolume): report connected guests; per-volume template unit
What volume start and volume stop need, before the commands.

/status/guests?volume=<v> reports the guests connected now through each
frontend served: NVMe/TCP hosts (live admin controllers) and iSCSI
initiators (Normal sessions past login; Discovery sessions do not count),
read at request time, and their sum.

deploy/systemd/sw-blockvolume@.service runs one volume per instance
from /etc/sw-block/volumes/<volume>.env with its own state directory;
apart from three per-instance directives it is sw-blockvolume.service,
and a test keeps the two the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:25:31 -08:00
pingqiu 1822110220 Merge main into feat/standalone-failover-cli
# Conflicts:
#	cmd/sw-block/main.go
#	core/authority/directive.go
2026-11-25 21:52:39 -08:00
Ping Qiu 37de5cda8c Merge pull request #616 from seaweedfs/f4/master-head-one-reader
blockmaster: one HEAD reader, the layout catalog
2026-11-25 18:17:25 -08:00
pingqiu 247d409a12 Merge main (with #625) into feat/standalone-failover-cli 2026-11-25 18:16:49 -08:00
pingqiuandClaude Opus 5.5 52f8793328 docs: who may fail over through the alpha executor, its admin certificate limit, and that the request flags are not evidence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:09:03 -08:00
pingqiuandClaude Opus 5.5 20a93fc09c feat(sw-block): ops failover for standalone; the alpha stack deploys the manual failover
sw-block ops failover is the operator's failover of a standalone
deployment: one call to blockmaster's admin-only FailbackService over
mutual TLS with the expected current line, after the operator confirms the
old node is off or cut from its clients. blockmaster decides the move.

The alpha stack now deploys what its notes describe: blockmaster serves
the failback RPC, and the failback executor (admin client Secret,
execution on) runs in kube-system; install applies the CRD and executor,
uninstall removes both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:38:32 -08:00
pingqiuandClaude Opus 5.5 77e150d22e blockmaster: one HEAD reader, the layout catalog
The master read HEAD two ways with two settings: the layout catalog
(filer gRPC, --chunk-filer) for create and restore, and plain filer HTTP
?metadata=true (--workspace-head-base-url) for the workspace move admission
and the revoke ACK. The workspace reader now reads through the catalog it
already dials: BCatalog.ReadHeadObserved returns HEAD, decoded by the same
DecodeLayoutHeadEntry, with the entry's modification time from that same
lookup (seconds, as the HTTP metadata gave it). The proof mapping is
unchanged: identity from the master's lifecycle record, deleting, unclaimed,
detached, generation, epoch, holder and position; an absent HEAD refuses
with ErrHeadAbsent.

The HTTP reader and --workspace-head-base-url are deleted, with the unit's
and the env file's setting and the docs. The master tests run the same
refusal table against a catalog on the in-memory filer (the HTTP-only
redirect and envelope cases have no counterpart). The fixtures that passed
the flag give the master the filer flags instead; the head-size and F1
ladder masters had none and could not dial the catalog at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:29:50 -08:00
pingqiuandClaude Opus 5.5 4555092854 fix(master): fence only the failover of an unreachable primary; test the race with the promotion loop
A reachable RF3 sync_quorum primary's move is a planned move again and
stays refused for want of a seal; only the operator's failover of an
unreachable primary is decided on the fencing round. Adds the test where
the operator's failover and the master's promotion loop decide the same
volume at once: both fence at the same next epoch, one line is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:22:09 -08:00
pingqiuandClaude Opus 5.5 2a146a90cd docs: the manual failover's fencing round in INV-PROMOTE-UNKNOWN-CURRENT-001 and the alpha README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:17:14 -08:00
pingqiuandClaude Opus 5.5 8058cad9e5 fix(master): RF3 sync_quorum manual failover runs the fencing round
A planned move of an RF3 sync_quorum volume needs a seal (its target is
not in every acknowledgement set), so the operator's failover was refused
and a volume whose primary host is lost could not be moved at all. The
fencing round is that seal: the failover now fences every other replica at
the line's next epoch and publishes only on the round's decision (enough
fenced survivors; the target holds the highest fenced end and is ready),
with basis Fenced. A refused round leaves the fence pending so a returning
primary is continued at e+1. RF2 and sync_all stay planned moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:05:26 -08:00
pingqiuandClaude Opus 5.5 f7f3b56298 k8s: each in-cluster client gets its own certificate with the least role
The CSI node and the status operator mount viewer certificates; the CSI
controller (it deletes volumes) and the failback executor mount admin
ones. The alpha certificate helper issues one certificate, role-file line
and Secret per client, and the chart takes one Secret per client
(tls.clientSecrets). A chart-render test fails when a client mounts a
Secret other than its own, when an admin Secret appears outside the CSI
controller and the failback executor, or when the role file gives a
client more than its role. A node's refused reattach event is one log
line and is not retried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:41:00 -08:00
pingqiuandClaude Opus 5.5 e82abea6b8 k8s: Kubernetes installs run blockmaster with mutual TLS; the plaintext off-host bind flag is refused
blockmaster refuses --insecure-external-bind (a non-loopback --listen needs
mutual TLS; the runtime HTTP listener stays on loopback), and
--launcher-master-tls-secret-prefix makes each generated volume mount its
server's node certificate Secret and dial with it. The chart, the launcher
renderer, the alpha/g15b/g15d manifests and gate scripts mount the Secrets
and pass the TLS flags; network.externalStatus and the frontend runtime
HTTP option fail the render. scripts/k8s-alpha-certs.sh issues development
certificates and the role file. The systemd startup gate runs its
off-loopback master with mutual TLS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:20:11 -08:00
pingqiuandClaude Opus 5.5 6c620a4165 docs: the Kubernetes alpha manual failover names the failback path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:45:02 -08:00
pingqiuandClaude Opus 5.5 3bb1cfb1e9 test, docs: a missing primary pod is unknown: no automatic reassign; Kubernetes alpha failover is manual
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:37:36 -08:00
pingqiu 8a00ae8bdd docs: align workspace skew range with fence-exit check 2026-11-22 23:43:10 -08:00
pingqiuandClaude Opus 5.5 83f8507d3b durable, blockvolume: review fold for the host lock and the rolled-back root
- The lock directory is created (0700) when missing; only a directory or
  lock file that cannot be created or opened refuses, with the cure
  (install the tmpfiles.d entry, or chown the directory and its lock files
  to the unit's user).
- The lock file is opened read-only (an existing file first, created 0644
  only when missing), so a lock file another user created stays lockable;
  it is never unlinked, and the next owner locks the same file.
- A stale-root startup end carries its cure into the final exit line:
  exiting status=78 reason=superseded cure="...".
- Tests: a cut's remote_lsn is locally durable at its HEAD CAS, and the
  root's crash image at the CAS reattaches and serves; the rolled-back copy
  makes no claim or PUT, admits no I/O, keeps its data and durable LSN; an
  exact copy at HEAD attaches; a read-only lock file is taken.
- Invariants: INV-WS-ONE-PROCESS-PER-HOST-001 and its M4 edge; the
  rollback row names its test file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:40:12 -08:00
pingqiuandClaude Opus 5.5 bd8afb0aea blockvolume: one live process per volume per host; refuse a rolled-back root
V1-SPEC r2.45.
(1) The provider takes an exclusive, non-blocking lock on
/run/sw-block/locks/<volume id>.lock before the volume's store opens and
releases it after the store closes (HostVolumeLock, set by blockvolume). A
missing directory refuses the provider with the cure; the tmpfiles.d
entry ships in deploy/systemd and both units may write it under
ProtectSystem=strict. --volume-lock-dir-test-only (hidden, refused under
systemd, warned at start) is for plain subprocess tests and harnesses.
(2) An existing root whose HEAD names this holder attaches only if its
local durable LSN reaches HEAD's remote_lsn; otherwise the existing
stale-root refusal, no retry (78 superseded), with the cure.
(3) docs/releases/one-process-per-volume.md: the lifecycle do-not list.
No HEAD change, no format bump, no new persisted file, no new exit reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:40:12 -08:00
pingqiu 3dc1bac4c9 fix(deploy): bound blockvolume supervisor retries 2026-11-22 08:38:34 -08:00
pingqiu 5d730c1ecc fix: latch exhausted workspace startup and bound process retry exit 2026-11-21 23:52:54 -08:00
pingqiu 7daf5d9c5b Merge remote-tracking branch 'pr/347' into train10 2026-11-21 08:48:50 -08:00
pingqiuandClaude Opus 5.5 6070108c5c blockmaster: refuse a non-loopback control bind unless --insecure-external-bind
The gRPC control API (--listen) and the runtime HTTP API
(--frontend-publication-runtime-listen, when enabled) are unauthenticated, so
binding them to the node network is now an explicit choice: a non-loopback
address is refused at startup unless --insecure-external-bind is given. The
Helm chart and the shipped k8s manifests, which bind 0.0.0.0 with host
networking, pass the opt-in explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 07:50:53 -08:00
pingqiuandClaude Opus 5.5 ab3610608c blockvolume: scheduled snapshots (daily:7 by default), one COW cut each at a per-volume offset
A per-volume worker takes a named snapshot of class scheduled once per
period, through the same seal path as an explicit snapshot (resolve the
request, one urgent cut, record that cut's HEAD). A restoring volume
(chunks its HEAD names still absent) is skipped and counted; a failure
keeps the control endpoint's code and is retried with a backoff doubling
from 1m to 1h; status carries the schedule state and snapshot_overdue.
Retention keeps the newest N scheduled snapshots (N from the newest one's
swb.schedule.keep label) separately from other snapshots.
--chunk-snapshot-schedule=daily:N|weekly:N|off, default daily:7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 05:08:31 -08:00
pingqiuandClaude Opus 5.5 6687234a0d blockvolume: --chunk-dirty-threshold is deprecated and ignored (cuts stage by the copy-on-write budget); warn at start, removal after 2027-01-31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:09:00 -08:00
pingqiuandClaude Opus 5.5 663ab3b2c3 docs: README v2 with standalone deployment, Kubernetes status and workspace measurements
The README is rewritten to about 230 lines. Detail that used to live in the
README moves to linked documents:

- docs/standalone-deployment.md: running blockmaster and blockvolume
  without Kubernetes, with a read-only first-volume check and a separate
  write test for scratch hosts.
- docs/kubernetes-status.md: the Kubernetes alpha feature status and
  non-claims.
- docs/workspace-measurements.md: the agent workspace measurements.
- deploy/config and deploy/systemd: env files, a topology example and
  systemd units for blockmaster and blockvolume (plus a ublk variant).

docs/quickstart-kubernetes.md and docs/design/block-design.md are updated
to match current main (auto durable-impl default, fuzz targets, the
concurrent filer CAS test, the CI workflow, the TLA+ specs in docs/spec),
and docs/assets/seaweed-block-hero.svg is refreshed.

Docs and example configuration only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:01:51 -08:00
pingqiu 0dce26d2b0 phase165: add kubernetes nvme rdma publish attach 2026-07-18 03:03:54 -07:00
pingqiu 578561e2cc phase35: package dry-run operator status controller 2026-06-02 17:03:14 -07:00
Ping Qiu 5c4f995c55 v0.2 alpha: Day-1 activation and first-volume loop (#48)
Package the Kubernetes alpha into a script-based Day-1 activation loop: activate the stack, create the first PVC-backed volume, verify writer/reader data, collect product-owned observation evidence, render a local read-only report, and clean up.

Includes multi-node-safe activation defaults, first-volume example automation, read-only ops report output, README/quickstart/release note updates, and review-driven hardening for fail-fast configuration, promotion evidence, inventory fail-closed behavior, and test guards.

Validated by Day-1 activation run 20260517-205252-04e9 and read-only report run 20260517-212358-bfba. Local targeted tests passed.
2026-05-18 16:43:35 -07:00
Ping Qiu e387d4e4bb ops: add light-use operations and placement gates (#47)
Add the light-use operations path for Seaweed Block alpha users.

This includes per-volume status bundles, cluster inventory, product-owned blockvolume lifecycle, durable restart/reattach evidence, same-node alpha placement checks, TestOps control data, and the supporting runner-native gates and QA close reports.

The next active plan is Basic Mounted Failover And Reattach MVP, which carries RF=2/RF=3 recovery work forward without claiming it closed in this milestone.
2026-05-13 01:31:21 -07:00
Ping Qiu dfa31007a1 testops: add beta hardening gates and storage readiness evidence
Adds the beta-hardening test and operations foundation for Seaweed Block, including runner-native protocol/beta gates, CSI lifecycle and durable restart coverage, iSCSI/NVMe protocol release gates, returned-replica evidence, read-only operations status reports, OS initiator compatibility gates, and fast iSCSI L2 durable restart/reconnect coverage.
2026-05-11 10:38:00 -07:00
Ping Qiu 6dd9dc33e2 docs: close iSCSI/NVMe protocol readiness plan (#44)
Close the current protocol-readiness plan and move active work to V2 parity and hardening.

The release gate now covers iSCSI ALUA/failover, NVMe ANA/multipath/failover, CSI protocol selection, and the iSCSI compatibility soak. Test layering is documented so default Go tests stay unit/component scoped, local subprocess tests are opt-in, and Linux lab coverage remains in runner-native TestOps suites.
2026-05-09 11:34:39 -07:00
pingqiu 51b7a80054 iscsi: address alua review findings 2026-05-06 10:22:59 -07:00
pingqiu 66bbbb0c1f test(k8s): add csi node restart lifecycle scenario 2026-05-05 13:41:20 -07:00
pingqiu 92c6cc126c iscsi: address frontend review feedback 2026-05-05 10:53:21 -07:00
pingqiu 01a86204da test(k8s): add iscsi fio smoke scenario 2026-05-04 22:30:54 -07:00
pingqiu e9828532be csi: preserve Kubernetes volume metadata 2026-05-04 13:09:54 -07:00
pingqiu 0566dcbd09 ci(k8s): publish alpha images to GHCR 2026-05-04 10:21:31 -07:00
Ping Qiu 13584950da docs(k8s): make app demo registry-friendly
Add a stable Kubernetes app-demo entry point, registry image overrides, a quickstart guide, and copyable basic app PVC examples.

Validated on M02 k3s with writer pod -> same PVC -> reader pod checksum verification.
2026-05-04 10:19:51 -07:00
Ping Qiu 5e8880772b test(k8s): add larger alpha PVC smoke (#28)
* test(k8s): add larger alpha PVC smoke

* test(k8s): honor namespace for large alpha smoke

* test(k8s): exercise 32Mi alpha payload
2026-05-04 01:57:21 -07:00
pingqiu 36eee3302c demo: add Kubernetes app PVC walkthrough 2026-05-03 20:27:58 -07:00
pingqiu 0d00847335 scripts: add stable alpha entrypoints 2026-05-03 15:37:27 -07:00
pingqiu 1a9e3e3939 docs: smooth alpha quick start 2026-05-03 15:32:38 -07:00
pingqiu c5b02f1924 docs: add contributor architecture and directory overviews 2026-05-03 15:13:29 -07:00