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 g-carre requested a review from a team as a code owner June 25, 2026 11:34
@g-carre g-carre force-pushed the feature/storcli2-blinker branch from 9c532af to 28550ac Compare June 30, 2026 12:34
@g-carre g-carre force-pushed the feature/storcli2-raidcontroller-composition branch from 326c95c to 0ade4e4 Compare June 30, 2026 12:37
@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

LGTM — composition adapter correctly wires all seven storcli2 components behind ports.RAIDController, constructor signatures match, compile-time interface check is present, and the smoke test exercises the full wiring. No issues found.

Review by Claude Code

@g-carre g-carre force-pushed the feature/storcli2-blinker branch from 28550ac to 3be14c1 Compare June 30, 2026 13:27
@g-carre g-carre force-pushed the feature/storcli2-raidcontroller-composition branch from 0ade4e4 to 0ae498e Compare June 30, 2026 13:27
@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

LGTM — composition correctly embeds all seven ports.RAIDController interfaces, shares the physicalDrivesGetter and logicalVolumesGetter instances with components that depend on them, and has a compile-time interface assertion plus a smoke test. No issues found.

Review by Claude Code

@g-carre g-carre force-pushed the feature/storcli2-blinker branch from 3be14c1 to 0c6c272 Compare June 30, 2026 14:39
@g-carre g-carre closed this Jun 30, 2026
@g-carre g-carre force-pushed the feature/storcli2-raidcontroller-composition branch from 0ae498e to 0c6c272 Compare June 30, 2026 14:39
g-carre added 3 commits June 30, 2026 17:09
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
@g-carre g-carre reopened this Jun 30, 2026
@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

LGTM

Review by Claude Code

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