Skip to content

feat(storcli2): top-level RAID controller composition adapter#73

Open
g-carre wants to merge 3 commits into
feature/storcli2-blinkerfrom
feature/storcli2-raidcontroller-composition
Open

feat(storcli2): top-level RAID controller composition adapter#73
g-carre wants to merge 3 commits into
feature/storcli2-blinkerfrom
feature/storcli2-raidcontroller-composition

Conversation

@g-carre

@g-carre g-carre commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the top-level raidcontroller.StorCLI2 composition adapter (ARTESCA-17651), the final piece of the decomposed storcli2/perccli2 adapter. Stacked on #72.

  • Composes the storcli2 components into the full ports.RAIDController surface: controller / physical-drive / logical-volume getters, logical-volume manager, cache setter, JBOD setter, blinker.
  • The physical-drive getter doubles as the JBODSetter and the logical-volume manager doubles as the LVCacheSetter, so those components are shared rather than constructed twice.
  • storcli2 supports every operation, so there are no ErrFunctionNotSupportedByImplementation stubs (unlike SmartArray); DeletePDsFromLV's unsupported error comes from the logical-volume manager itself.
  • NewStorCLI2 wires everything on a single injected runner — the same composition serves both the storcli2 and perccli2 binaries.

Also updates the DESIGN.md note (separate commit, ARTESCA-17654) to mark the composition as implemented rather than future work.

Testing

go build, go vet, gofmt, and the full suite pass. A smoke test wires the full adapter on a mocked runner, asserts it satisfies ports.RAIDController, and drives one operation (StartBlink) end to end through the runner.

Note: Targets feature/storcli2-blinker (#72), not main, per the stack.

Issue: ARTESCA-17651

🤖 Generated with Claude Code

g-carre added 2 commits June 25, 2026 13:33
Add raidcontroller.StorCLI2, composing the storcli2 components into the
full ports.RAIDController surface:

- Embeds the controller / physical-drive / logical-volume getters, the
  logical-volume manager, the cache setter, the JBOD setter and the blinker.
- The physical-drive getter doubles as the JBOD setter and the logical-volume
  manager doubles as the cache setter, so those components are shared rather
  than constructed twice.
- storcli2 supports every operation, so there are no
  ErrFunctionNotSupportedByImplementation stubs (DeletePDsFromLV's unsupported
  error is returned by the logical-volume manager itself).
- NewStorCLI2 wires everything on a single injected runner; the same
  composition serves both the storcli2 and perccli2 binaries.

A smoke test wires the full adapter on a mocked runner, asserts it satisfies
ports.RAIDController, and drives one operation end to end.

Issue: ARTESCA-17651
The top-level raidcontroller.StorCLI2 composition is now in place, so the
DESIGN.md note no longer describes it as future work. Clarify that
DeletePDsFromLV's unsupported error comes from the logical-volume manager
itself rather than a composition-level stub.

Partially addresses the storcli2 adapter documentation; binary-selection and
fixture-layout docs remain.

Issue: ARTESCA-17654
…ment

The note that storcli2 "can't remove drives" reads as if a failed drive could
not be replaced. Clarify that what is unsupported is shrinking a volume's
member set (storcli's `start migrate option=remove`); replacing a failed drive
(rebuild / hot-spare / copyback) keeps the member count, is a separate command
family storcli2 still exposes, and is out of scope for raidmgmt regardless of
controller.

Issue: ARTESCA-17654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant