feat(storcli2): logical volume drive add (expand) and remove#70
Conversation
e5ba890 to
063bd83
Compare
d468745 to
e66400a
Compare
|
063bd83 to
7de356c
Compare
e66400a to
2c5ab13
Compare
|
LGTM — AddPDsToLV and DeletePDsFromLV are clean: error wrapping is consistent, the compile-time interface check is a good addition, tests cover the happy path, command failure, multi-enclosure rejection, and the unsupported-removal sentinel. Fixtures and collection script are updated correctly. Review by Claude Code |
7de356c to
ddc8be4
Compare
2c5ab13 to
0c6c272
Compare
| "${C}/v1" start migrate type=raid0 option=add "drives=${FIRST_ENCLOSURE}:${INVALID_SLOT}" | ||
| "Expand VD (expected failure)" \ | ||
| "${OUTPUT_DIR}/logicalvolumemanager/testdata/storcli2/expand/fail.json" \ | ||
| "${C}/v1" expand "drives=${FIRST_ENCLOSURE}:${INVALID_SLOT}" |
There was a problem hiding this comment.
The collection step here was updated from migrate to expand, but the DESTRUCTIVE=false skip-list echo at line 718 still references the deleted migrate/fail.json path. It should be updated to expand/{success,fail}.json to stay in sync.
Also, expand/success.json is listed in the README fixture table as a script-produced file, but no collection step produces it (it would need a second free drive in the sacrifice-VD workflow). Consider either adding a collection step or noting it as hand-crafted.
— Claude Code
|
ddc8be4 to
13d1232
Compare
0c6c272 to
2131206
Compare
|
e2a38b2 to
cae6f00
Compare
Complete ports.LogicalVolumesManager on the storcli2/perccli2 manager:
- AddPDsToLV grows a volume through "expand drives=e:s,..." (online capacity
expansion). storcli2 dropped "start migrate", so expansion is the only
supported growth path; the firmware preserves the RAID level. Drives
spanning multiple enclosures are rejected.
- DeletePDsFromLV returns ErrFunctionNotSupportedByImplementation: the
storcli-to-storcli2 command map drops "start migrate" with no replacement
for removing drives from a volume (see DESIGN.md).
Replace the stale plain-text migrate/fail.json fixture (captured with the
v1 grammar that storcli2 rejects) with proper expand/{success,fail}.json
fixtures, and update the collection script and testdata README accordingly.
Issue: ARTESCA-17648
revive's unused-receiver rule flagged the named 's' receiver, which the not-supported stub never references. Issue: ARTESCA-17648
2131206 to
70f0661
Compare
Review by Claude Code |
Implement ports.Blinker on the storcli2/perccli2 adapter: - StartBlink / StopBlink issue "/cx/ex/sx start locate" / "stop locate" (same grammar as storcli), choosing the enclosure or no-enclosure selector form from the drive's parsed slot, and surface the in-JSON failure payload via storcli2.Decode. A single implementation serves both binaries; the runner is injected. Issue: ARTESCA-17650
ezekiel-alexrod
left a comment
There was a problem hiding this comment.
We are mixing in the test file table-driven tests (e.g., DeleteLV) and one function per test case, the classical approach. Minor
Otherwise, LGTM
feat(storcli2): physical drive blinker
| err := b.StopBlink(storcli2PDMetadata("")) | ||
| require.Error(t, err) | ||
| mockRunner.AssertNotCalled(t, "Run") | ||
| } |
There was a problem hiding this comment.
Missing test for the storcli2.Decode failure path in locate(). The runner-error case (TestStorCLI2BlinkCommandError) and the invalid-slot case are covered, but there is no test where the runner succeeds and the JSON payload contains "Status": "Failure" — i.e. the storcli2.Decode error branch at line 77 of storcli2.go. The logicalvolumemanager tests cover this pattern for expand (TestStorCLI2AddPDsToLVCommandError with expand/fail.json); the blinker should have an analogous fixture (e.g. testdata/storcli2/start_fail.json) and test.
— Claude Code
|
ebfb743
into
feature/storcli2-lv-manager-create-delete
Summary
Completes
ports.LogicalVolumesManageron the storcli2/perccli2 manager (ARTESCA-17648). Stacked on #69.storcli2 dropped storcli's
start migratecommand (perDESIGN.md, verified against the StorCLI2 User Guide and the official storcli-to-storcli2 command map), so the two drive-membership operations split:AddPDsToLV— online capacity expansion via/cx/vx expand drives=e:s,.... The firmware preserves the RAID level; drives spanning multiple enclosures are rejected.DeletePDsFromLV— returnsports.ErrFunctionNotSupportedByImplementation: there is no storcli2 replacement forstart migrate option=remove.Replaces the stale plain-text
migrate/fail.jsonfixture (aunexpected TOKEN_MIGRATEsyntax error provingstart migrateno longer parses) with properexpand/{success,fail}.jsonfixtures, and updates the collection script and testdata README.Testing
go build,go vet,gofmt, and the package test suite pass. New tests cover the expand happy path, command-failure, multi-enclosure rejection, and the unsupported-removal error.Issue: ARTESCA-17648
🤖 Generated with Claude Code