Files
seaweedfs/learn/projects/sw-block/phases/phase-5-progress.md
T
Ping QiuandClaude Opus 4.6 531ee764ee feat: Phase 5 CP5-3 -- CHAP auth, online resize, Prometheus metrics, 12 tests
CHAP authentication (RFC 7143 S12.1):
- auth.go: CHAPAuthenticator with MD5 challenge-response, ValidateCHAPConfig
- login.go: multi-PDU SecurityNeg flow (challenge → verify → transit)
- main.go: -chap-user/-chap-secret CLI flags with validation

Online volume expand:
- blockvol.go: Expand() with flusher pause, snapMu TOCTOU guard, alignment check
- Rejects shrink (ErrShrinkNotSupported) and resize with active snapshots

Prometheus metrics:
- metrics.go: metricsAdapter wrapping BlockDevice, 15 metrics (counters,
  histograms, gauge funcs for WAL/dirty-map/epoch/role/snapshots)
- Dedicated prometheus.NewRegistry() per server instance

Admin HTTP endpoints:
- POST /snapshot (create/delete/restore/list)
- POST /resize (online expand)
- GET /metrics (Prometheus text format)
- VolumeSize added to /status response

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 01:43:42 -08:00

1.4 KiB

Phase 5 Progress

Status

  • CP5-1 ALUA + multipath complete. CP5-2 CoW snapshots complete. CP5-3 complete.

Completed

  • CP5-1: ALUA implicit support, REPORT TARGET PORT GROUPS, VPD 0x83 descriptors, write fencing on standby.
  • CP5-1: Multipath config + setup script, 4 multipath integration tests.
  • CP5-1: Reviewer fixes (RoleNone write regression, T_SUP flag, TPG ID validation, ASCII log).
  • CP5-1: 10 ALUA unit tests + 16 adversarial tests (all PASS).
  • CP5-2: CoW snapshots implemented with flusher-based CoW, delta files, and recovery.
  • CP5-2: Review fixes applied (PauseAndFlush safety, snapMu race fix, beginOp/endOp, lock order doc, error propagation).
  • CP5-2: 10 unit tests + 22 adversarial tests (all PASS).
  • CP5-3: CHAP auth, online resize, Prometheus metrics, admin endpoints.
  • CP5-3: Review fixes applied (empty secret validation, AuthMethod echo, docs).
  • CP5-3: 12 dev tests + 28 QA adversarial tests (all PASS).

In Progress

  • CP5-4: Failure injection + Layer-5 validation (not started).

Blockers

  • None.

Next Steps

  • Decide CP5-2 scope (CSI driver vs CHAP/metrics/admin CLI).

Notes

  • SCSI test count: 53 (12 ALUA). Integration multipath tests require multipath-tools + sg3_utils.
  • Known flaky: rebuild_full_extent_midcopy_writes under full-suite CPU contention (pre-existing).
  • Known flaky: rebuild_catchup_concurrent_writes (WAL_RECYCLED timing, pre-existing).