mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
docs: align iscsi p6 plan with v2 coverage
This commit is contained in:
1 parent
9f495d65cd
commit
949bf834fa
3 files changed
+126
-14
No files matched your search
@@ -259,16 +259,34 @@ References:
|
||||
- owner: dev.
|
||||
- output: `internal/docs/qa-assignments/iscsi-p6-alua-mpio-lab-validation.md`.
|
||||
- must define the lab command, non-claims, and pass/fail criteria.
|
||||
- V2 coverage alignment:
|
||||
- status: design inventory added.
|
||||
- do not copy V2 role/state ownership,
|
||||
- do match V2 externally visible ALUA/MPIO protocol coverage unless V3
|
||||
explicitly rejects a behavior.
|
||||
- ALUA state model:
|
||||
- active,
|
||||
- active optimized,
|
||||
- active non-optimized,
|
||||
- standby,
|
||||
- unavailable,
|
||||
- transitioning.
|
||||
- standby metadata commands allowed,
|
||||
- standby write/read policy pinned,
|
||||
- standby command policy:
|
||||
- metadata/path probing allowed,
|
||||
- READ allowed for initiator path probing,
|
||||
- WRITE and SYNCHRONIZE_CACHE fail closed.
|
||||
- standard INQUIRY TPGS discipline:
|
||||
- TPGS stays off until REPORT TARGET PORT GROUPS and ALUA VPD identity
|
||||
are implemented,
|
||||
- when enabled, advertise implicit ALUA only unless explicit transitions
|
||||
are implemented.
|
||||
- REPORT TARGET PORT GROUPS,
|
||||
- VPD 0x83 target-port identity,
|
||||
- VPD 0x83 target-port identity:
|
||||
- NAA stable per volume,
|
||||
- target port group and relative target port distinguish paths,
|
||||
- short allocation length and no-ALUA branches tested.
|
||||
- VPD 0x00 remains advertised-pages-equal-implemented-pages,
|
||||
- state change while I/O is in flight,
|
||||
- concurrent REPORT TARGET PORT GROUPS and standby write reject tests,
|
||||
- multipath initiator test,
|
||||
- primary failover while mounted,
|
||||
- old primary cannot serve stale successful I/O.
|
||||
|
||||
@@ -21,6 +21,39 @@ moves.
|
||||
- P5 proves CSI node restart while a PVC is mounted, but not blockvolume
|
||||
failover or multipath.
|
||||
|
||||
## V2 Alignment Inventory
|
||||
|
||||
This section is a coverage inventory only. Do not copy V2 state ownership or
|
||||
promotion logic into V3. V3 must keep protocol reporting separate from
|
||||
authority, placement, and replica readiness.
|
||||
|
||||
- V2 ALUA states that V3 must account for:
|
||||
- `active_optimized` (`0x00`),
|
||||
- `active_non_optimized` (`0x01`),
|
||||
- `standby` (`0x02`),
|
||||
- `unavailable` (`0x0e`),
|
||||
- `transitioning` (`0x0f`).
|
||||
- V2 role-to-state mapping used as a behavioral reference:
|
||||
- standalone / primary -> active optimized,
|
||||
- replica -> standby,
|
||||
- stale -> unavailable,
|
||||
- rebuilding / draining -> transitioning.
|
||||
- V3 equivalent mapping must be derived from V3 frontend facts:
|
||||
- current primary frontend -> active optimized,
|
||||
- valid non-primary path -> standby or active non-optimized, depending on
|
||||
the final MPIO policy,
|
||||
- stale/closed/unverified frontend -> unavailable,
|
||||
- authority or recovery movement not yet closed -> transitioning.
|
||||
- V2 protocol surface that P6 must match at the test level:
|
||||
- standard INQUIRY advertises TPGS only when REPORT TARGET PORT GROUPS and
|
||||
ALUA VPD identity are implemented,
|
||||
- VPD 0x00 remains unchanged when ALUA is enabled,
|
||||
- VPD 0x83 has a non-ALUA branch and an ALUA branch,
|
||||
- REPORT TARGET PORT GROUPS handles all states, short allocation lengths,
|
||||
no-ALUA rejection, and concurrent state reads,
|
||||
- standby and transitioning paths reject writes but still serve discovery
|
||||
and path-probing reads.
|
||||
|
||||
## Design Rules
|
||||
|
||||
- Protocol state must consume frontend/authority facts. It must not decide
|
||||
@@ -38,44 +71,73 @@ moves.
|
||||
|
||||
- Define the exported state names:
|
||||
- `active_optimized`: current primary frontend may serve read/write.
|
||||
- `active_non_optimized`: path is usable but should not be preferred.
|
||||
- `standby`: observed target path exists but must not serve normal I/O.
|
||||
- `unavailable`: target path should fail fast.
|
||||
- `transitioning`: authority or readiness is changing; normal I/O must not
|
||||
be silently accepted.
|
||||
- Define command policy by state:
|
||||
- INQUIRY, VPD, REPORT LUNS, TEST UNIT READY: allowed on active and standby.
|
||||
- READ/WRITE/SYNCHRONIZE_CACHE: allowed only on active unless explicitly
|
||||
documented otherwise.
|
||||
- standby write must fail with a stable sense code.
|
||||
- INQUIRY, VPD, REPORT LUNS, TEST UNIT READY, READ CAPACITY, MODE SENSE,
|
||||
REQUEST SENSE, and REPORT TARGET PORT GROUPS: allowed on visible paths.
|
||||
- READ is allowed on standby/transitioning for OS path probing and must not
|
||||
leak stale data beyond what the underlying frontend provider allows.
|
||||
- WRITE and SYNCHRONIZE_CACHE are allowed only on active paths.
|
||||
- standby, unavailable, and transitioning WRITE must fail with stable NOT
|
||||
READY sense, not GOOD.
|
||||
- Red tests:
|
||||
- standby WRITE cannot return GOOD.
|
||||
- standby READ/READ(16) is allowed for probing.
|
||||
- unavailable and transitioning WRITE cannot return GOOD.
|
||||
- state change from active -> standby -> active -> transitioning is observed
|
||||
immediately by command handling and REPORT TARGET PORT GROUPS.
|
||||
- TPGS bits are not enabled until REPORT TARGET PORT GROUPS and VPD identity
|
||||
are implemented.
|
||||
|
||||
### P6-B: Protocol Surface
|
||||
|
||||
- Implement TPGS advertisement in standard INQUIRY.
|
||||
- Implement TPGS advertisement in standard INQUIRY:
|
||||
- use implicit ALUA TPGS (`01b`) unless the design later explicitly adds
|
||||
explicit ALUA transitions,
|
||||
- preserve unrelated byte-5 bits and do not advertise unsupported features.
|
||||
- Implement REPORT TARGET PORT GROUPS.
|
||||
- Extend VPD 0x83 with ALUA-safe target-port / target-port-group identity.
|
||||
- Extend VPD 0x83 with ALUA-safe identity:
|
||||
- NAA-6 device designator remains stable per volume,
|
||||
- target port group designator identifies the path group,
|
||||
- relative target port designator distinguishes paths,
|
||||
- no-ALUA device still returns only the NAA branch.
|
||||
- Keep VPD 0x00 advertised pages equal to implemented pages.
|
||||
- Red tests:
|
||||
- advertised ALUA pages and commands must be served.
|
||||
- target port identity is deterministic across restart for the same path.
|
||||
- different paths for the same volume are distinguishable.
|
||||
- VPD 0x83 truncates safely for short allocation length.
|
||||
- VPD 0x83 NAA high nibble remains NAA-6 even with hostile volume ID bytes.
|
||||
- REPORT TARGET PORT GROUPS rejects no-ALUA devices.
|
||||
- REPORT TARGET PORT GROUPS handles short allocation lengths.
|
||||
- REPORT TARGET PORT GROUPS covers all five states.
|
||||
- concurrent REPORT TARGET PORT GROUPS calls during state changes are safe.
|
||||
|
||||
### P6-C: Frontend State Wiring
|
||||
|
||||
- Add an explicit ALUA state provider interface near the iSCSI frontend.
|
||||
- The provider reads current frontend facts; it does not call placement or
|
||||
authority decision code.
|
||||
- Provider fields:
|
||||
- ALUA state,
|
||||
- target port group ID,
|
||||
- relative target port ID,
|
||||
- stable device NAA or volume identity input.
|
||||
- Blockvolume feeds:
|
||||
- active when it owns the current primary frontend,
|
||||
- standby/unavailable when it is not the primary or is closing,
|
||||
- standby/active-non-optimized when it is a valid non-primary path,
|
||||
- unavailable when the local frontend is closed, stale, or unverified,
|
||||
- transitioning when authority changes are observed but local readiness is
|
||||
not closed.
|
||||
- Red tests:
|
||||
- old primary after failover cannot serve WRITE as GOOD.
|
||||
- returned replica heartbeat does not make the path active.
|
||||
- ALUA state provider cannot mint authority or mutate assignment.
|
||||
- no frontend fact means no active/standby ALUA claim.
|
||||
|
||||
### P6-D: Real Initiator MPIO Lab
|
||||
|
||||
@@ -86,6 +148,11 @@ moves.
|
||||
- active path accepts workload,
|
||||
- standby path is visible but not selected for normal writes,
|
||||
- path state changes are visible after authority movement.
|
||||
- Evidence:
|
||||
- `sg_inq` standard INQUIRY shows TPGS enabled,
|
||||
- `sg_inq -p 0x83` shows stable NAA plus path-distinguishing descriptors,
|
||||
- `sg_rtpg` or equivalent shows target port group state,
|
||||
- `multipath -ll` shows one logical device with two paths.
|
||||
- Non-goal for P6-D:
|
||||
- no automatic transparent failover claim until P6-E passes.
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Scope: real Linux initiator validation for ALUA/MPIO and mounted failover.
|
||||
- Linux initiator host with:
|
||||
- `open-iscsi`,
|
||||
- `multipath-tools`,
|
||||
- `sg3_utils` or equivalent tools for `sg_inq` and `sg_rtpg`,
|
||||
- `mkfs.ext4`,
|
||||
- `mount`,
|
||||
- `fio` or `dd`,
|
||||
@@ -25,9 +26,25 @@ Expected when unblocked:
|
||||
|
||||
- initiator discovers two target paths for one volume.
|
||||
- `multipath -ll` shows one logical device.
|
||||
- VPD 0x83 identity is stable and path-distinguishing.
|
||||
- REPORT TARGET PORT GROUPS returns active and standby path states.
|
||||
- standard INQUIRY shows TPGS enabled.
|
||||
- VPD 0x00 still advertises only implemented pages.
|
||||
- VPD 0x83 identity is stable and path-distinguishing:
|
||||
- same volume -> same NAA,
|
||||
- different paths -> distinct target port / target port group identity.
|
||||
- REPORT TARGET PORT GROUPS returns active, active-non-optimized if used,
|
||||
standby, unavailable, and transitioning states when forced by the test.
|
||||
- standby path does not accept normal WRITE as GOOD.
|
||||
- standby path still accepts metadata/path-probing commands and READ.
|
||||
|
||||
Evidence to collect:
|
||||
|
||||
- `iscsiadm -m discovery` output.
|
||||
- `iscsiadm -m session -P 3` output.
|
||||
- `sg_inq <device>` standard INQUIRY output.
|
||||
- `sg_inq -p 0x00 <device>` supported VPD pages.
|
||||
- `sg_inq -p 0x83 <device>` device identification.
|
||||
- `sg_rtpg <device>` or equivalent REPORT TARGET PORT GROUPS output.
|
||||
- `multipath -ll` output.
|
||||
|
||||
## Test 2: Mounted Workload Failover
|
||||
|
||||
@@ -42,6 +59,15 @@ Expected when unblocked:
|
||||
- old primary path cannot acknowledge stale successful I/O.
|
||||
- cleanup leaves no sw-block iSCSI sessions and no multipath residue.
|
||||
|
||||
Evidence to collect:
|
||||
|
||||
- workload log before and after active-path failure.
|
||||
- target logs showing old primary write rejection after state change.
|
||||
- `multipath -ll` before failure, during transition, and after recovery.
|
||||
- `sg_rtpg` before failure, during transition, and after recovery.
|
||||
- checksum or byte-equal read-back proof.
|
||||
- cleanup commands and final empty session/device state.
|
||||
|
||||
## Report Format
|
||||
|
||||
QA should report:
|
||||
@@ -51,7 +77,8 @@ QA should report:
|
||||
- exact commands,
|
||||
- `iscsiadm -m session`,
|
||||
- `multipath -ll`,
|
||||
- `sg_inq` or equivalent VPD evidence,
|
||||
- `sg_inq` standard/VPD evidence,
|
||||
- `sg_rtpg` or equivalent REPORT TARGET PORT GROUPS evidence,
|
||||
- workload result,
|
||||
- failover event timing,
|
||||
- cleanup state,
|
||||
|
||||
Reference in new issue
Block a user