A test runner that is itself a systemd service (the CI runner unit) passes
its INVOCATION_ID to every child, and blockvolume rightly refuses
--volume-lock-dir-test-only under systemd. Every subprocess start that
passes the flag now builds the child's environment without INVOCATION_ID
(one helper per test package). The product rule is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The rolled-back copy makes no HEAD CAS attempt (counted at the remote,
not inferred from PUTs).
- Control: an exact copy passes the preliminary HEAD read; HEAD then
advances at the same epoch and holder before the claim's own read; the
claim-image recheck refuses it as stale, with no CAS.
- The refused second provider leaves its storage root empty.
- The --help capture registers stderr restoration and pipe closes first,
closes the writer before joining the reader, and bounds the join.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
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>
A second provider for the same volume on one host (another storage root,
the same host lock directory) must be refused before its store opens; a
missing lock directory, the default one included, refuses the provider;
blockvolume's test-only lock directory is hidden from --help and refused
under systemd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The move to s2, HEAD reclaimed by s2, the forced move, its dry-run
previews (refused with an admissible time, then admitted) and lost-range,
captured from a passing gate run, are read by the default-build check
test; each check also refuses a neighbouring output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The old host returning after a forced move: the absence checks run only
while it is alive; it must exit 75 and log a refusal; a supervised
restart and a start on a fresh local root (a control: no stale root to
refuse) must do the same. The refusal text that the product never
prints is dropped.
- The same-host restart is the page's systemctl restart (SIGTERM, a start
within RestartSec); the crash restart is its own test. Both must serve
within 15 s, as s1/r1 at the same epoch.
- The barrier wait requires at least one barrier refusal, compares with
one second of log resolution, and requires the re-grant line.
- Too early: the exit reason assignment_timeout, and the same serving
predicate as the barrier wait.
- The planned hand-over runs the page's step 1 and reads a never-written
block as zero (a control).
- The lapsed-lease return must serve within its 30 s authority wait, as
s1/r1. Comments match the order of the revoke-without-ACK steps.
- Harness ports come from 10000-19999, below weed's range; sw-block output
can be captured to HANDOFF_CAPTURE_DIR for the fixtures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Table for wrongOwnerEndpoints: both positive passes; an unreadable log, a log with no
forced-epoch delivery, an empty log, or another host's endpoints in either recipient
rejects (#425).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stop test now observes the worker's return on its own channel with
bounded joins on both paths (a re-check that ignores the stop fails in 12 s);
agent-workspace-design.md's supervisor diagram adds Serving -> Exit78 on a
runtime HEAD fence (head_fenced), independent of the lease.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V1-SPEC r2.39: StorageBackend.AdmitsIO is the I/O gate itself (the backend
admits I/O AND the guarded projection names this lineage as the healthy
primary). /status FrontendPrimaryReady and NotReadyReason read it through
the provider (lease_not_held stays first; an unopened volume fails closed).
A workspace chunk primary's frontends start once AdmitsIO passes after the
backend first admitted I/O (firstAdmitted: a bounded 50 ms re-check until
first served, workspace primaries only; the backend has no projection-change
signal). Non-chunk volumes and supporting replicas start after open as
before (the #410 design condition, V1-SPEC r2.39), now pinned by a test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
INV-FE-PRIMARY-READY-OPERATIONAL-001 keeps the readiness and listen
property; the fence-to-exit bound is its own row, INV-FE-FENCE-EXIT-001,
stated as what is guaranteed: the fence's detection time (a HEAD fence:
50 ms) plus the existing 5 s cleanup bound from the decision. 307 rows,
221 ACTIVE.
Provider Close joins each layer's fence watcher through p.inflight
(counted under p.mu while not closed). C.W lists the two new waits.
The runtime-fence watcher test owns its worker: cleanup registered before
the start, the return joined with a bound on both paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chunk layer that fences after startup (HEAD has another publication
owner) while the lease is still valid now latches the backend not
operational with that evidence, and the process owner chooses the
no-restart exit 78 head_fenced through processExit.choose. I/O is refused
from the fence itself.
The first-grant log line is written only for a reply that grants: a first
reply that revokes fences the guard and logs no grant.
The frontend-gate tests own their workers: cleanup is registered before
each worker starts and every receive is bounded.
docs/design/invariants.md: INV-WS-SERVE-LEASE-HELD-001 (V1-SPEC r2.37);
INV-FE-PRIMARY-READY-OPERATIONAL-001 statement within 300 characters, with
the runtime fence enforcement and tests; M1 diagram and table carry the
lease-held order and the runtime fence exit; C.W names the runVolume
receive of the stop waiter's result. 306 rows, 220 ACTIVE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restarted old holder (G-O2 r8) started its NVMe target unconditionally
at startup and reported FrontendPrimaryReady=true from the authority view
alone, before and after its chunk-layer claim was refused ("fenced, not
serving"). The admit gate refused every command with Namespace Not Ready,
but that status is retried on the same path and then fails to the guest,
and the path advertised ANA optimized, so a listening, ready-looking but
fenced target is not safe.
- status: FrontendPrimaryReady is false while the volume's local durable
backend admits no I/O (attach pending, fenced, detached), with the
backend's evidence in the new NotReadyReason; Healthy stays the authority
view.
- blockvolume: the iSCSI, NVMe and ublk targets start only once the backend
first admits I/O (awaitBackendAdmitsIO, 10 ms); signals and the workspace
lease guard now start before that wait, and a stop requested during it
skips the frontends and goes straight to shutdown.
INV-FE-PRIMARY-READY-OPERATIONAL-001 (304 rows, 218 ACTIVE); M1 Recovering
-> Serving names the guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test review of #42979d5d9f7:
- wrongOwnerEndpoints fails a recipient whose log cannot be read or shows no forced-epoch
delivery, so each recipient must positively receive the owner's line.
- The unknown-owner unit check requires the volume unsupported or exactly the
no-observation placeholder (no server, the line's endpoints), so neither s1's nor s2's
report may supply it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the two-process procedure gate (origin/test/procedure-gate, its three test
files) onto main and adds the assertion to TestProcedureForcedMoveWithTheOldHostReturning:
every assignment line delivered at the forced epoch, to s2 and to the returning s1, carries
s2's own data and control endpoints (V1-SPEC r2.40, INV-AUTH-HOLDER-IDENTITY-001).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two procedure tests for a holder that returns after its lease ended but
before the re-grant barrier. Started 35 s after the stop (default flags),
the barrier passes within its 30 s authority wait: it must not serve while
its renewals are still refused for the barrier, then serves at the same
epoch. With --workspace-max-clock-skew 50s and a start 31 s after the
stop, its wait ends first: it does not serve and exits 75, and a
supervised restart that waits past the barrier serves at the same epoch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five tagged binary tests run the procedures of the volume lifecycle page
as written, on two blockvolume processes with server ids s1 and s2 that
share one blockmaster and one SeaweedFS: the planned hand-over to another
host, a same-host restart inside the lease, a return after a lapsed lease
started 65 s after the stop, a forced move with the old host returning,
and a revoke without an ACK followed by a forced move.
The harness takes N hosts (cluster spec nodes s1..sN); the checks that
read each step's output take the host and stay in the default-build
check file with the existing ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The planned hand-over waits 30 s for the old blockvolume's own exit, the
lease bound the lifecycle chapter states.
TestStandaloneCleanMoveWithoutTheACKIsRefused makes the chapter's
negative check deterministic: the volume is sealed, its blockvolume is
killed (a signal sends no ACK), the lease is revoked with the sealed
generation, and the clean move exits 1 with the documented refusal while
workspace show keeps no ACK. Its output is captured into the fixtures and
read by the shared checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>