Commit Graph
35 Commits
Author SHA1 Message Date
pingqiu 9e809120f4 fix: admit original geometry before every durable create 2026-11-18 23:08:47 -08:00
pingqiu c4a37fd4a0 test: cover create admission callers and legacy retry 2026-11-18 23:07:15 -08:00
pingqiu 7a1f9826fc chore: preserve original UTF-8 text and group shared geometry imports 2026-11-18 21:13:30 -08:00
pingqiu f67517f2e4 fix: refuse volume creation above the uint32 LBA capacity limit 2026-11-18 21:09:12 -08:00
pingqiu 75725d6b32 test: require volume capacity refusal at create boundaries 2026-11-18 21:04:21 -08:00
pingqiuandClaude Opus 5.5 31b911dac7 test(workspace): safety controls for the lease horizon (#205)
GREEN-gating controls for the memory-only renewal:
- grants clamp to the durable horizon under a permanently stalled
  store, renewals without host validity or at the horizon are refused,
  and a real guard fences by horizon - skew/2;
- a restart honours the persisted horizon in the forced barrier;
- an extension whose rename landed but whose directory sync failed
  latches uncertainty, refuses the next renewal, and reloads with the
  landed horizon barring a forced move until horizon + skew;
- an extender held inside its write orders a same-volume revocation or
  forced move after it;
- same-volume renewals during held revocation and forced-move writes;
- the lease view equals derive(published) after every writer kind;
- N volumes renew concurrently with apply, revocation, ACK, a clean
  move, extenders and Close (run with -race);
- Close joins a held extender, and an extender admitted before closing
  writes nothing;
- lifecycle snapshots follow every records change, stay immutable, are
  read without the store mutex, and keep a protective unknown outcome;
- through the services layer, query and revoke replies report the
  grant, and a renewal during a held same-volume reservation returns
  the revoking lease.

The r1-r3 slow-store wrappers count the delayed writes and require at
least one, so a green cannot bypass the injected stall. Tests that own
a Publisher directly join its extenders before their store closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:58:54 -08:00
pingqiuandClaude Opus 5.5 a4fd1303ef fix(workspace): answer lease renewals from memory under a durable horizon (#205)
A renewal of a live workspace lease persisted the new expiry with a
temp-file fsync under the publisher's global lock, and the renewal RPC
also read two lifecycle stores whose mutexes writers hold across file
I/O. A slow or busy master disk therefore made the host's 2 s renewal
RPC time out, the guard fence and the volume shut down.

Renewal now takes only a small leaf lock (leaseMu) over a per-volume
lease view and does no I/O:
- grant = min(now+TTL, durable horizon), where the horizon is the
  published Lease.ExpiresAtNS; the deadline is raised to the grant.
- It refuses stale, pending-move, expired, uncertain or storeless
  state as before (never bypasses INV-AUTH-UNCERTAIN-001), and refuses
  with an error when the grant would leave no positive host validity.
- The first grant of a lease still writes synchronously under p.mu and
  persists horizon = now + 1.5*TTL.
- A per-volume single-flight extender is an ordinary p.mu writer: it
  writes horizon = trigger + 1.5*TTL through persistWorkspaceLocked, so
  its write and publication are one p.mu section; any write error
  latches uncertainty as before.

Writers keep persist-before-publish and refresh the view (p.mu ->
leaseMu, the only new lock edge) at every derive-input change.
Revocation and query replies report the granted expiry, never the
horizon. Host.Close joins extenders before the store closes.

The renewal RPC reads lock-free immutable snapshots of the Volumes and
deletion-reservation stores, republished at every records change
(including load, delete and the protective unknown outcome).

Behaviour change: a forced move now waits for the durable horizon plus
skew, at most TTL/2 later than before. Existing tests that read the
persisted lease as the grant, or waited only grant + skew, are updated
with that reason. The store-write boundary guard now skips _test.go
files: a test double that delays and delegates Put is not a production
write caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:58:54 -08:00
pingqiuandClaude Opus 5.5 1193cb751b test(workspace): reservation persist hook and RED for renewal behind a held lifecycle write (#205)
Add DeletionReservationStore.SetPersistHookForTest, an instance-local
test seam that installs the existing write-fault hook under the store
mutex (nil by default).

r5: while the deletion-reservation write of an unrelated volume is held
in that hook, a renewal through the services layer must return within
2 s. On main it waits on the reservation store's mutex.

r4 and r5 now release held writes first and settle every worker with
bounded waits before clearing hooks or closing fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:42:15 -08:00
pingqiuandClaude Opus 5.5 9f82dcd48a volume delete: no snapshot cascade; incarnation-bound commit
claude05's cut (04:08Z): volume-delete refuses with
volume_has_snapshots while the volume has any snapshot name record (a
published snapshot, one being deleted, or an attempt in flight); the
operator deletes snapshots first. The delete never touches snapshot
names, attempts or roots: the snapshot loop, the claim check and claim
release (a claim lives on a named snapshot; a deleted target's claim is
dead by rule), and CreateSnapshot's back-out are gone. CreateSnapshot
and Fork still refuse once they see the delete mark.

codex01's r3 P2s:
- the snapshot check, the revert and the commit are bound to one
  deleting incarnation (its generation); if HEAD moved, the check runs
  again on the incarnation found;
- the CLI's admission token is --request-id (required), so a rerun
  adopts and can give back an earlier invocation's hold;
- CreateVolume holds workspaceMu through the create;
- the reservation store syncs its parent directory before use (the
  binding store's helper).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:27:44 -08:00
pingqiuandClaude Opus 5.5 425161bbe3 volume delete: RED controls for the cut and the r3 P2s
claude05's 04:08Z cut (no snapshot cascade) and codex01's r3 P2s
(V:/share/rdma/codex01-block152-r3-review-20261116T0405Z/REVIEW.md).
Controls failing against stubs:

- the cut: a volume with a snapshot, an in-flight snapshot attempt, or
  a fork's snapshot is deleted (TestCatalog_DeleteVolumeRefusesWhile
  SnapshotsExist, TestCatalog_InFlightSnapshotRefusesTheDelete, ...Fork
  DuringTheDeleteMarkRefuses, ...TombstonesAndRefusesReuse);
- incarnation: a claim check under generation G commits a re-marked G'
  (TestCatalog_DeleteCommitIsBoundToItsIncarnation);
- lost CLI token: a rerun cannot release the earlier hold
  (TestOpsChunk_VolumeDelete, real master, restart);
- CreateVolume drops workspaceMu before the create
  (TestMarkVolumeDeleting_CreateHoldsTheReservationLock);
- the reservation directory's parent is not synced
  (TestDeletionReservations_ParentSyncBeforeUse).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:27:44 -08:00
pingqiuandClaude Opus 5.5 2e078746ee volume delete: durable master reservation, commit point, settled abort
- Master: a deletion reservation store (core/lifecycle), separate from
  the desired-volume records, so an unknown id is reserved too and the
  ordinary DeleteVolume/CreateVolume path cannot clear it. Held by
  per-delete tokens (admitted), permanent once committed. Writes reuse
  the binding store's crash-safe pattern (synced temp file, atomic
  rename, synced directory); an unknown outcome keeps a protective
  change in memory (fail closed). MarkVolumeDeleting records it under
  RecordWorkspaceDeletion's check; new AbortVolumeDeleting and
  CommitVolumeDeleting. Every gate (publication admission, reconciler,
  workload planner, binding/placement/move, CreateVolume) consults it.
  VolumeRecord.Deleting is gone.
- Catalog: Admission is Admit/Commit/Abort; ErrNotAdmitted marks a
  definite refusal, anything else is an unknown outcome
  (admissionUncertain). Every give-back aborts this delete's admission.
  A commit point (HEAD deleting -> purging, conditioned on the HEAD
  read) precedes the irreversible steps; a revert races on the same
  write, so a delete that sampled a claim cannot undo another delete's
  commit, and reports an error instead of a give-back.
- CreateSnapshot's back-out settles its name like the delete does: the
  name is freed only after the attempt's tombstone or winning
  publication is confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:54:32 -08:00
pingqiuandClaude Opus 5.5 77d238ce59 volume delete: RED controls for the r2 review
Review of dfc8f19 (codex01, V:/share/rdma/codex01-block152-r2-review-
20261116T0342Z/REVIEW.md). Controls failing against stubs restoring the
reviewed behaviour:

- P1: an unknown id's admission and a known record's ordinary
  DeleteVolume leave CreateVolume free, also after a restart
  (TestMarkVolumeDeleting_ReservesUnknownIdsAndSurvivesDeleteAndRestart).
- P2 persistence: the mark is intent-only (no write/sync); write,
  rename and directory-sync faults and a restart lose it
  (TestDeletionReservations_*).
- P2 rollback: a give-back (claim, held HEAD) leaves the master
  exclusion in place; a lost admission response reads as a refusal
  (TestCatalog_DeleteVolumeGivesBackOnALiveClaim, ...HeldAfterAdmission
  GivesBack, ...LostAdmissionResponse, TestOpsChunk_VolumeDelete with a
  real master: claim refusal must leave the id usable).
- P2 failed abort: B's failed tombstone write still frees the name, so
  A's late publication survives a completed delete
  (TestCatalog_FailedAbortCannotHideALatePublication).
- P2 concurrent deletes: D1's revert after D2 committed counts as a
  give-back (TestCatalog_ConcurrentDeleteCannotRollBackACommittedOne).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:54:32 -08:00
pingqiuandClaude Opus 5.5 dfc8f19ef1 volume delete: master admission, one HEAD linearization point
(a) Admission at the master: LifecycleService.MarkVolumeDeleting holds
    workspaceMu (every assignment, placement and binding write) and marks
    VolumeRecord.Deleting inside RecordWorkspaceDeletion's check (refused
    with live authority without a clean revocation ACK, a pending move or
    a queued placement). Afterwards publication admission, the placement
    reconciler, the workload planner, binding/placement/move RPCs and
    CreateVolume refuse the volume.
(b) One HEAD write from the HEAD read (active or detached, not held) to
    state deleting, chunks kept. Every read decides "held" afresh.
    ChunkRemote.CASHead refuses to move a deleting or deleted HEAD
    (ErrChunkHeadPrecondition + ErrChunkHeadDeleted), so no attach,
    claim or restore revives it; EnsureVolume refuses it; Fork and
    CreateSnapshot check the volume again after taking their claim/name
    and back out.
(c) Claims read after (b): a live claim reverts HEAD (detached or
    active, as before) and refuses with snapshot_claimed.
(d) Then every snapshot name, published or not (an unpublished attempt
    gets an aborted tombstone), goes through markDeleting and is freed;
    the fork claim is released and reported only when confirmed.
(e) HEAD becomes deleted (no chunks), VOLUME is marked deleted.

A failed delete reports what it did (admitted, headMarked, reverted,
snapshots, aborted attempts, claimReleased, completed, uncertain); the
CLI prints that with the error and exits nonzero. The CLI's admission
is MarkVolumeDeleting (QueryVolumeStatus is no longer used).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:31:09 -08:00
pingqiuandClaude Opus 5.5 5b82b324d6 volume delete: RED controls for one linearization point
Review of 626c7de (codex01). One control per schedule, each failing
against a stub that restores the reviewed behaviour:

- P1 1: a holder that attaches before the HEAD mark's first read is
  deleted (TestCatalog_DeleteVolumeRefusesAnAttachBeforeTheMark).
- P1 2: an attach that passed EnsureVolume revives a deleting/deleted
  HEAD through CASHead (TestCatalog_DeletedHeadCannotBeRevivedByAClaim).
- P1 3: after the master's delete mark, an existing placement still
  leads to an assignment, the reconciler places, the id can be created
  and bound again (TestMarkVolumeDeleting_StopsLaterAssignment...).
- P2: a fork claim after the check is refused only after irreversible
  writes (TestCatalog_DeleteVolumeGivesBackOnALiveClaim); a fork after
  the mark installs (TestCatalog_ForkAfterTheDeleteMarkRefuses); a held
  snapshot publication and a snapshot started after the mark escape the
  delete (TestCatalog_DeleteVolumeCatchesInFlightSnapshots); a failed
  claim removal is reported released, and the CLI drops partial effects
  (TestCatalog_DeleteVolumeTombstonesAndReleases, TestOpsChunk_VolumeDelete).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:31:08 -08:00
pingqiu a42401ef6a fix: close workspace binding admission and retirement schedules 2026-11-15 14:45:35 -08:00
pingqiu 52cd6debc5 feat: register per-volume workspace endpoints and chosen-node intent 2026-11-15 14:24:53 -08:00
pingqiu 0dce26d2b0 phase165: add kubernetes nvme rdma publish attach 2026-07-18 03:03:54 -07:00
pingqiu 6ba6634b16 phase121: add data plane address capability 2026-07-02 18:00:21 -07:00
Ping Qiu 8651073e0c alpha: package Helm lifecycle and read-only operations release
Merge Phase 26-32 Helm lifecycle, read-only operations, restart persistence, cleanup reliability, and v0.3.4 alpha documentation.
2026-05-26 20:54:13 -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 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 07912d6380 review: tighten pvc ownerref wiring 2026-05-04 19:58:14 -07:00
pingqiu 6b6990abf2 launcher: support pvc owner references 2026-05-04 17:47:33 -07:00
pingqiu f51c9bbe8c csi: preserve pvc uid metadata 2026-05-04 17:43:13 -07:00
pingqiu e9828532be csi: preserve Kubernetes volume metadata 2026-05-04 13:09:54 -07:00
pingqiu 52114f78eb G15d: materialize launcher replica identities 2026-05-03 11:10:17 -07:00
pingqiu 7cf6720731 G15d: add blockvolume workload planner 2026-05-03 10:58:39 -07:00
pingqiu 8d77ca5b56 G9F: split node data and control addresses 2026-05-02 21:33:06 -07:00
pingqiu 4add465b65 G9F: verify placement intent against node observation 2026-05-02 21:10:28 -07:00
pingqiu b9df8b6e04 G9D: pin lifecycle read-only and reconcile behavior 2026-05-02 21:00:06 -07:00
pingqiu 992e411261 G9D: reconcile lifecycle placement intents 2026-05-02 20:46:48 -07:00
pingqiu 7e8f8a1a7b G9D: add placement intent store 2026-05-02 20:40:26 -07:00
pingqiu ebae9e2369 G9D: add placement planner candidates 2026-05-02 20:35:21 -07:00
pingqiu 1e4106e4b1 G9D: add lifecycle registration fact stores 2026-05-02 20:30:54 -07:00