docs: organize internal roadmap and current plan

This commit is contained in:
pingqiu committed 2026-05-04 22:24:19 -07:00
1 parent 9ce1fbf183
commit 45bc4b1a80
11 files changed
+626 -32

No files matched your search

+2 -3
View File
@@ -10,7 +10,6 @@ This directory contains public and technical documentation.
| `developer-architecture.md` | Deeper module-by-module architecture for contributors. |
| `runtime-state-machines.md` | Mermaid state-machine and loop overview. |
| `roadmap.md` | Alpha roadmap and non-claims. |
| `production-readiness-plan.md` | Post-alpha plan from current MVP to beta/production readiness. |
| `kubernetes-app-demo.md` | Presentation-friendly Kubernetes app + PVC demo. |
## Calibration Evidence
@@ -21,5 +20,5 @@ Keep them here until those references move to the shared design archive.
## Documentation Rule
If a document is meant for external users, avoid internal phase or gate labels.
Historical design notes should live in `sw-block/design/`, not in this public
docs entry path.
Internal planning, readiness tracking, audits, and historical design notes
belong under `internal/docs/`, not in this public docs entry path.
+2 -2
View File
@@ -130,6 +130,6 @@ A reasonable beta bar:
- TestOps can run the smoke suite and produce stable artifacts.
- Non-claims are documented and visible to users.
For the detailed post-alpha execution plan, see
[`production-readiness-plan.md`](production-readiness-plan.md).
Detailed post-alpha execution planning is kept in `internal/docs/` so the
public roadmap stays focused on user-visible behavior and non-claims.
+24
View File
@@ -7,3 +7,27 @@ agents but too detailed or process-heavy for public user documentation.
Public-facing docs belong in `docs/`.
## Operating Rule
- `product-roadmap.md` is the short global product plan.
- `current-plan.md` is the active execution plan. Development should track this
file.
- When a current plan closes, rename it to `*-plan-finished.md` and create a new
`current-plan.md`.
- Long audits and historical plans live under `ref/`. They are references, not
the day-to-day driver.
- When a plan closes, move its finished plan and related references into a
dedicated subdirectory, for example `finished/iscsi-p2/`.
## Current Index
| File | Purpose |
|---|---|
| `product-roadmap.md` | Short global roadmap, product phases, and priority tracks. |
| `current-plan.md` | Active development plan. Follow this first. |
| `product-management-plan.md` | Older product goals, priorities, evidence links, and decision rules. |
| `ref/production-readiness-plan.md` | Longer readiness reference and iSCSI P1-P6 detail. |
| `ref/iscsi-os-initiator-compat-plan.md` | Detailed iSCSI P1 OS-initiator compatibility plan and evidence. |
| `ref/iscsi-v2-coverage-gap-audit.md` | V2-to-V3 iSCSI coverage gap audit and prioritized test backlog. |
| `ref/v2-frontend-protocol-gap-audit.md` | Broader V2 frontend protocol feature gap audit. |
+283
View File
@@ -0,0 +1,283 @@
# Current Plan: iSCSI Frontend Completeness
Status: active.
Rule: V2 frontend coverage is the minimum height for V3 unless we explicitly
drop a feature with a product reason. V3 should keep its own architecture, but
the user-visible iSCSI capability should reach and then exceed V2.
References:
- `ref/iscsi-v2-coverage-gap-audit.md`
- `ref/iscsi-os-initiator-compat-plan.md`
- `ref/v2-frontend-protocol-gap-audit.md`
## Product Goal
- Make iSCSI a credible Kubernetes block frontend, not only a smoke-test path.
- Support real OS initiators, filesystem workloads, stress, auth, lifecycle,
and eventually multipath/failover.
- Keep protocol code separate from authority and replica readiness decisions.
- Use V2 tests as the coverage inventory, not as code to blindly copy.
## Completed Baseline
- iSCSI-P1 OS initiator correctness:
- status: done in PR #24.
- includes Data-Out collector, pending command handling during Data-Out,
Data-Out timeout, and Linux OS initiator evidence.
- Large READ Data-In splitting:
- status: done in PR #25.
- includes residual direction handling.
- iSCSI-P2 first stability pack:
- status: done in PR #26.
- includes RX/TX stability tests, large write memory tests, OS smoke script,
loop mode, stress mode, TestOps registry entry, and sustained sync smoke.
- iSCSI-P2 supplemental session guards:
- status: local on `iscsi/frontend-completeness`, pending milestone PR.
- includes rapid login/logout goroutine budget, concurrent target close
idempotency, target same-address restart, and NOP-Out queued during
Data-Out.
- iSCSI smoke harness cleanup:
- status: done in PR #27.
- Larger alpha PVC smoke:
- status: done in PR #28.
- Operational iSCSI target knobs:
- status: done in PR #36.
- includes portal address / externally advertised target configuration.
- PVC metadata and owner-reference plumbing:
- status: done in PR #39.
- relevant to CSI/K8s cleanup, not core iSCSI protocol.
- Owner-reference alpha default:
- status: open in PR #40.
- relevant to K8s cleanup and alpha install flow.
## Current Active Milestone: iSCSI-P2 Stability
- Goal:
- prevent session breakage, leaks, and unbounded memory behavior under real
OS-style traffic.
- turn the recent large I/O debugging class into repeatable local and QA
tests.
- Tasks:
- add RX/TX stability test pack:
- status: done in PR #26.
- supplemental guards: local on `iscsi/frontend-completeness`, pending
milestone PR.
- rapid login/logout without goroutine leak,
- many concurrent sessions,
- target close while I/O is active,
- double close without panic,
- NOP-Out during Data-Out,
- error response StatSN behavior.
- add large write memory-pressure tests:
- status: done in PR #26.
- repeated 4 MiB writes,
- slow backend,
- heap/goroutine growth guard.
- extend real OS harness:
- status: done in PR #26.
- `SW_BLOCK_ISCSI_ITERATIONS=N`,
- `SW_BLOCK_ISCSI_STRESS=dd|fio`,
- artifact path printed,
- no active sessions after every loop.
- run K8s validation after local tests:
- status: partially done.
- larger PVC smoke: done in PR #28.
- 60s fio: QA verified, needs TestOps/script pin if not already committed.
- larger PVC,
- 60s fio,
- daemon logs and iSCSI state captured,
- no K8s residue.
- compare against V2 remaining coverage:
- status: active.
- review whether PR #26 fully covers V2 `qa_rxtx_test.go` and
`large_write_mem_test.go` intent.
- add missing tests only if the mapping is incomplete.
- Close bar:
- `go test ./core/frontend/iscsi -count=1` green,
- OS initiator repeat harness green on M02,
- K8s larger PVC or fio smoke green,
- no session leaks,
- no unbounded buffer or memory behavior.
- QA tasks:
- run `scripts/run-iscsi-os-smoke.sh` with `SW_BLOCK_ISCSI_ITERATIONS=5`.
- run iSCSI fio mode through existing script or TestOps entry.
- return artifact paths and cleanup state.
- if current script cannot run fio repeatably, QA should ask for a script
fix instead of doing manual-only commands.
## Milestone: iSCSI-P3 Product-Backed Stability
- Goal:
- prove the protocol path works with real `blockvolume`, WAL, CSI, and K8s
behavior, not only protocol fakes.
- Tasks:
- status: next development milestone after P2 close.
- sustained write/read through mounted filesystem,
- `SYNCHRONIZE_CACHE` pressure,
- multiple sessions sharing a volume if supported,
- reconnect after logout/login,
- repeated attach/detach loop,
- app writer pod replaced by reader pod on the same PVC,
- blockvolume restart and reattach once durable state is ready.
- Close bar:
- checksum passes through pod path,
- no session errors,
- cleanup leaves no iSCSI or K8s residue,
- product logs are enough to diagnose failures.
- QA/tooling:
- prefer TestOps scenario for repeated attach/detach.
- if missing, prepare a script first and let QA run it on M02.
## Milestone: iSCSI-P4 CHAP / Access Control
- Goal:
- reach V2-level iSCSI auth behavior before any security-facing claim.
- Tasks:
- status: planned.
- CHAP config validation,
- login success with correct secret,
- wrong username/password fail closed,
- missing CHAP fields fail closed,
- replayed challenge rejected if supported by the protocol path,
- Kubernetes Secret integration for CSI later.
- Close bar:
- unauthenticated access fails when CHAP is required,
- authenticated access succeeds,
- failed auth leaves no partial session/device state.
- QA/tooling:
- needs CHAP-capable initiator script once implementation starts.
- V2 CHAP tests are the reference coverage inventory.
## Milestone: iSCSI-P5 CSI Node Lifecycle
- Goal:
- make kubelet retry/restart behavior safe enough for real clusters.
- Tasks:
- status: planned.
- NodeStage idempotency,
- NodeUnstage idempotency,
- login failure cleanup,
- mkfs failure cleanup,
- stale session detection,
- plugin restart fallback,
- repeated stage/unstage,
- wrong volume at staging path fails closed.
- Close bar:
- kubelet retries do not wedge the node plugin,
- failed attach leaves no leaked device or session,
- repeated create/delete works without manual host cleanup.
- QA/tooling:
- needs K8s scenario scripts or TestOps entries.
- manual kubelet poking is allowed only for first reproduction.
## Milestone: iSCSI-P6 ALUA / MPIO / Mounted Failover
- Goal:
- make mounted-volume failover a real frontend behavior instead of only a
reconnect story.
- Tasks:
- status: planned.
- ALUA state model:
- active,
- standby,
- unavailable,
- transitioning.
- standby metadata commands allowed,
- standby write/read policy pinned,
- REPORT TARGET PORT GROUPS,
- VPD 0x83 target-port identity,
- state change while I/O is in flight,
- multipath initiator test,
- primary failover while mounted,
- old primary cannot serve stale successful I/O.
- Close bar:
- real initiator sees correct ALUA/MPIO behavior,
- mounted workload survives or fails/reconnects according to documented
policy,
- byte-equal data proof after failover,
- no stale-primary success.
- QA/tooling:
- needs real initiator multipath setup script.
- needs mounted workload failover script.
- do not rely on in-process protocol tests only.
## Milestone: iSCSI-P7 Performance And Backend Matrix
- Goal:
- make performance experiments comparable without turning early numbers into
product claims.
- Tasks:
- status: planned.
- walstore baseline fio,
- smartwal fio behind explicit flag,
- RoCE / 10.0.0.x lab path if available,
- 1GbE vs 25GbE comparison,
- pgbench scenario,
- record CPU, memory, latency, bandwidth, and cleanup state.
- Close bar:
- same test runner scenario can compare backends,
- no silent backend switch,
- results are labelled experimental until SLOs exist.
- QA/tooling:
- needs TestOps scenario that records network, backend, block size, fio job,
and cleanup state.
- avoid manual benchmark notes without a repeatable scenario.
## Cross-Cutting Technical Rules
- Protocol code must not decide authority.
- Protocol code must not decide replica readiness.
- CSI must consume frontend facts, not infer storage truth.
- Placement intent is not authority.
- Authority movement is not data continuity.
- Best-effort ACK is not full durability.
- If V2 behavior is copied, copy the test expectation first and adapt the code
to V3 boundaries.
## QA / TestOps Rules
- Prefer scripts or TestOps scenarios over manual command sequences.
- Manual testing is allowed for first reproduction, but convert the result into
a repeatable script or scenario.
- QA report must include:
- branch and commit,
- command,
- lab host,
- result,
- artifact path,
- cleanup state,
- exact log line for any failure.
## PR Cadence
- Use milestone PRs, not one PR per tiny fix.
- Target one or two PRs per day at most.
- For the current active milestone, keep iSCSI-P2 local tests and required
protocol fixes in one coherent PR if possible.
- Split OS/K8s harness work only if it becomes too large to review cleanly.
## Finish Action
- When a milestone closes, move the finished plan and related references into a
dedicated directory, for example `internal/docs/finished/iscsi-p2/`.
- Keep `current-plan.md` focused on the next active milestone.
@@ -142,7 +142,7 @@ Default answer to #7 is yes for all product fixes after the MVP merge.
| V2 frontend gap audit | `docs/v2-frontend-protocol-gap-audit.md`. |
| Runtime state machines | `docs/runtime-state-machines.md`. |
| Roadmap | `docs/roadmap.md`. |
| Production readiness detail | `docs/production-readiness-plan.md`. |
| Production readiness detail | `internal/docs/ref/production-readiness-plan.md`. |
| Calibration evidence | `docs/calibration/`. |
## Current Immediate Recommendation
@@ -0,0 +1,105 @@
# Product Roadmap
This is the short internal roadmap. Keep it current and readable.
## Product Goal
- Build a small Kubernetes block storage service that is easier to try and
reason about than a large distributed-storage stack.
- Target early users running lab or small Kubernetes clusters.
- Keep alpha claims narrow: dynamic PVC, iSCSI path, app write/read, clean
teardown.
- Do not claim production HA, seamless mounted failover, performance, CHAP,
multipath, or NVMe-oF readiness until separately tested.
## Product Phases
### Alpha Preview
- Status: current.
- Single-node k3s quick start works.
- Dynamic PVC create/delete works.
- App pod writes and reads through a PVC.
- Cleanup leaves no active iSCSI sessions and no visible Kubernetes residue.
- Default frontend: iSCSI.
- Default backend: `walstore`.
### Alpha Stabilization
- Make cleanup product-owned instead of script-owned.
- Make PVC owner-reference cleanup the default path.
- Stabilize iSCSI with real OS initiators and larger filesystem writes.
- Make repeated create/write/read/delete stable.
- Keep artifact bundles useful for QA and issue reports.
- Keep docs modest and accurate.
### Beta Candidate
- Multi-node Kubernetes attach.
- Durable volume state across `blockvolume` restart.
- Basic failover with an attached workload.
- Returned replica lifecycle: observed -> candidate -> syncing/rebuilding ->
ready.
- Explicit ACK profile: best-effort, quorum, or full-ack.
- TestOps can run named smoke scenarios and return result bundles.
### Production Candidate
- Soak and fault testing.
- Upgrade and uninstall story.
- Security and resource hardening.
- Operator-visible status and diagnostics.
- Reproducible release images.
- Documented operational limits.
## Priority Tracks
### Track A: Kubernetes Install And Cleanup
- Current: owner-reference cleanup is being defaulted for alpha scripts.
- Next: avoid harness-only cleanup paths.
- Later: add a small controller/operator for generated `blockvolume`
workloads.
### Track B: iSCSI Frontend Stability
- Current: iSCSI-P1 OS initiator correctness is implemented and evidenced.
- Next: iSCSI-P2 session stability and memory-pressure coverage.
- Later: product-backed iSCSI stability, CHAP, CSI lifecycle, ALUA/MPIO.
### Track C: Durable State
- Current: alpha generated workloads still use throwaway storage in several
paths.
- Next: define durable root layout for generated `blockvolume` workloads.
- Later: prove restart and reattach preserve data.
### Track D: Availability And Recovery
- Current: recovery/failover components are tested below the K8s surface.
- Next: multi-node attach and reconnect path.
- Later: failover while mounted, old-primary stale I/O fencing, returned
replica reintegration.
### Track E: Protocol / Backend Expansion
- Current: iSCSI + `walstore` only for alpha.
- Next: protocol-neutral CSI dispatch tests.
- Later: NVMe-oF, `smartwal`, and multipath after the default path is stable.
## PR Cadence
- Prefer one coherent milestone PR, not one PR per tiny fix.
- Target one or two PRs per day at most.
- Keep minor doc/test cleanups batched unless they block current work.
- QA can push evidence-only PRs when assigned, but product code should stay
milestone-based.
## Current Execution Pointer
- Active work should be tracked in `internal/docs/current-plan.md`.
- When the current plan closes, rename it to a finished plan such as
`internal/docs/iscsi-p2-plan-finished.md`.
- Keep deeper technical design in separate files only when it is needed for
review or future maintenance.
- Keep long audits and historical references under `internal/docs/ref/`.
@@ -25,7 +25,7 @@ V3 paths compared:
- `core/csi/*_test.go`
- `cmd/blockcsi/*_test.go`
- `cmd/blockvolume/*_test.go`
- `internal/docs/iscsi-os-initiator-compat-plan.md`
- `internal/docs/ref/iscsi-os-initiator-compat-plan.md`
## What V3 Already Covers Well
@@ -1,23 +1,28 @@
# Production Readiness Plan
This document is the post-alpha plan for moving `seaweed-block` from the
current Kubernetes alpha MVP toward a small production-usable block service.
This document is the internal post-alpha plan for moving `seaweed-block` from
the current Kubernetes alpha MVP toward a small production-usable block service.
It consolidates the useful parts of the internal planning notes without
carrying their phase/gate labels into public documentation.
It keeps the global product view, current protocol tracks, and readiness bars in
one place. Public docs should expose the stable user-facing subset, not this
full internal execution ledger.
## Current Baseline
## Product Phases
The alpha MVP can already demonstrate:
### Phase 0: Alpha Preview
- dynamic PVC create/delete through CSI,
- launcher-generated `blockvolume` workloads,
- iSCSI attach/mount through Linux tooling,
- pod filesystem write/read checksum,
- cleanup with no dangling iSCSI sessions,
- recovery/failover components tested below the Kubernetes surface.
Status: current.
The strongest current evidence is the fresh-user Kubernetes smoke run:
User-facing bar:
- README quick start passes on a fresh single-node k3s lab.
- Dynamic PVC create/delete works through CSI.
- A normal app pod writes and reads data through the mounted PVC.
- Cleanup leaves no active iSCSI sessions and no visible Kubernetes resources.
- Limitations are visible: single-node evidence, iSCSI only, `walstore` only,
no production HA claim.
Current strongest evidence:
```text
tree: seaweed-block@59277f9
@@ -27,7 +32,47 @@ result: [alpha] PASS: dynamic PVC create/delete completed checksum write/read an
artifacts: V:\share\sw-block-final-close\20260504T000127Z\
```
This is enough for an alpha preview. It is not enough for production.
### Phase 1: Alpha Stabilization
Goal: make the alpha useful for early Kubernetes users without the test harness
acting as the operator.
Bar:
- generated `blockvolume` workloads are created and cleaned by product logic,
not by smoke-test script sweeps,
- PVC owner-reference cleanup is the default alpha path,
- repeated create/write/read/delete is stable,
- larger-volume iSCSI filesystem operations work with real OS initiators,
- artifact collection is standard enough for QA and external bug reports.
### Phase 2: Beta Candidate
Goal: make the service credible for small lab clusters and early contributor
testing beyond a single-node demo.
Bar:
- multi-node Kubernetes attach works,
- data survives `blockvolume` pod restart,
- basic failover is tested under an attached workload,
- returned replica lifecycle is explicit,
- ACK profile behavior is named and test-pinned,
- TestOps can run the smoke suite by scenario name.
### Phase 3: Production Candidate
Goal: make operational limits, failure behavior, and upgrade/cleanup semantics
clear enough for real deployments.
Bar:
- soak and fault testing,
- security/resource hardening,
- upgrade/uninstall story,
- documented operational limits,
- reproducible release artifacts/images,
- observability sufficient for diagnosis without source-level debugging.
## Product Rule
@@ -39,7 +84,7 @@ user intent -> placement -> authority -> runtime execution -> progress facts
-> recovery / failover / cleanup -> operator-visible status
```
The control plane should keep these facts distinct:
The control plane must keep these facts distinct:
- placement intent is not authority,
- authority movement is not data continuity,
@@ -50,6 +95,149 @@ The control plane should keep these facts distinct:
These boundaries protect the project from over-claiming availability before the
data path and operator story are actually proven.
## Current iSCSI Steps
The iSCSI track should stay aligned with V2 coverage at the behavior/test level,
not by copying V2 control-plane code.
### iSCSI-P1: OS Initiator Correctness
Status: implemented and evidenced.
Scope:
- Linux `iscsiadm` login,
- 256 MiB target,
- `mkfs.ext4`,
- mount,
- write/read checksum,
- logout,
- no dangling session,
- large WRITE R2T/Data-Out handling,
- large READ Data-In splitting.
Key implemented slices:
- pending SCSI command during Data-Out is queued, not fatal,
- V3-local DataOutCollector validates DataSN, BufferOffset, F-bit, overflow,
- bounded pending queue,
- Data-Out timeout,
- real Linux OS initiator smoke,
- DataInWriter large-read split.
Next validation before considering P1 fully stable:
- repeat OS smoke several times,
- run 256 MiB K8s PVC path,
- run 60s `fio` randrw,
- run Windows iSCSI Initiator format if we want a Windows demo claim.
### iSCSI-P2: Session Stability And Memory Pressure
Goal: close the high-value V2 RX/TX coverage gap.
Test coverage to add or port by behavior:
- many concurrent sessions,
- close while active I/O is in flight,
- repeated open/close,
- non-Data-Out PDUs during Data-Out,
- NOP-Out during Data-Out,
- StatSN monotonicity and error-response StatSN,
- response backpressure,
- target close while active sessions exist,
- new session after target close,
- 10 x 4 MiB writes without unbounded heap growth,
- slow backend does not accumulate unbounded buffers.
Close bar:
- local protocol tests green,
- real OS harness supports loop count,
- no session goroutine leak,
- no unbounded memory growth under large writes.
### iSCSI-P3: Product-Backed Stability
Goal: verify iSCSI through real `blockvolume`, WAL, CSI, and Kubernetes paths.
Scenarios:
- sustained filesystem write/read on `walstore`,
- `SYNCHRONIZE_CACHE` pressure,
- K8s 256 MiB PVC write/read,
- 60s `fio` randrw,
- app writer pod replaced by reader pod on same PVC,
- repeated attach/detach loop,
- reconnect after initiator logout/login.
Close bar:
- no iSCSI session errors,
- no dangling sessions after cleanup,
- no Kubernetes residue,
- data checksum passes through pod path.
### iSCSI-P4: Security And Access Control
Goal: match the useful V2 CHAP behavior without pulling V2 control-plane
semantics into V3.
Scope:
- CHAP config validation,
- auth success/failure tests,
- wrong-secret and missing-secret negative tests,
- Kubernetes Secret integration later,
- clear docs that CHAP is disabled by default in alpha.
Close bar:
- unauthenticated access fails when CHAP is required,
- authenticated access passes,
- auth failure does not leak sessions or partially open devices.
### iSCSI-P5: CSI Node Lifecycle Hardening
Goal: make iSCSI reliable under normal Kubernetes node-plugin behavior.
Scope:
- NodeStage idempotency,
- NodeUnstage cleanup,
- plugin restart cleanup,
- stale device/session detection,
- failed attach cleanup,
- repeated attach/detach,
- clear host requirements for `iscsi_tcp`, privileged mode, and mount tools.
Close bar:
- kubelet retries do not wedge the node plugin,
- failed attach leaves no device/session leak,
- repeated PVC create/delete works without manual host cleanup.
### iSCSI-P6: Multipath / Failover Frontend
Goal: support mounted-volume failover semantics instead of only reconnect-based
single-path behavior.
Scope:
- ALUA/MPIO for iSCSI,
- standby/active target state,
- REPORT TARGET PORT GROUPS behavior,
- path failure and recovery,
- failover while mounted,
- old primary cannot serve stale successful I/O.
Close bar:
- authority/failover facts are stable enough to drive frontend path state,
- failover while mounted has byte-equal proof,
- no stale-primary success,
- no claim before ALUA/MPIO behavior is tested with real initiators.
## Production Tracks
### 1. Install And Cleanup Surface
@@ -65,7 +253,7 @@ Required work:
node-local path,
- add a small controller/operator to create and delete generated `blockvolume`
workloads,
- make `DeleteVolume` cleanup fully controller-owned instead of harness-owned,
- make `DeleteVolume` cleanup fully controller-owned,
- keep the README quick start as a smoke test for every release candidate.
Pass bar:
@@ -187,14 +375,9 @@ Goal: users diagnose state without reading internal debug logs.
Required work:
- add a status endpoint or CLI for:
- frontend readiness,
- authority role,
- replication role,
- durable ack frontier,
- recovery phase,
- placement reason,
- unsupported/degraded reason,
- add a status endpoint or CLI for frontend readiness, authority role,
replication role, durable ack frontier, recovery phase, placement reason, and
degraded reason,
- add concise structured logs for assignment, attach, recovery, and cleanup,
- keep TestOps artifact bundles stable.
@@ -19,7 +19,7 @@
"sha256sum",
"fio-optional"
],
"qa_instruction": "internal/docs/iscsi-os-initiator-compat-plan.md",
"qa_instruction": "internal/docs/ref/iscsi-os-initiator-compat-plan.md",
"known_green_commit": "d25e7b4",
"artifacts": [
"run.log",