Skip to content

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

Merged
g-carre merged 3 commits into
mainfrom
feature/storcli2-raidcontroller-composition
Jul 1, 2026
Merged

feat(storcli2): top-level RAID controller composition adapter#73
g-carre merged 3 commits into
mainfrom
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 g-carre reopened this Jun 30, 2026
@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

LGTM

Review by Claude Code

g-carre added 3 commits July 1, 2026 11:28
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 force-pushed the feature/storcli2-blinker branch from fc6b402 to a40039e Compare July 1, 2026 09:28
@g-carre g-carre force-pushed the feature/storcli2-raidcontroller-composition branch from 96db516 to 8c539d3 Compare July 1, 2026 09:28
@claude

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

LGTM — the composition correctly satisfies ports.RAIDController, constructor wiring matches all component signatures, shared dependencies (logicalVolumesGetter, physicalDrivesGetter) are reused rather than duplicated, and the smoke test covers interface satisfaction plus an end-to-end operation. DESIGN.md updates are accurate.

Review by Claude Code

Base automatically changed from feature/storcli2-blinker to feature/storcli2-lv-manager-pd-membership July 1, 2026 15:40
Base automatically changed from feature/storcli2-lv-manager-pd-membership to feature/storcli2-lv-manager-create-delete July 1, 2026 16:08
Base automatically changed from feature/storcli2-lv-manager-create-delete to main July 1, 2026 16:10
@g-carre g-carre merged commit 9874ada into main Jul 1, 2026
7 checks passed
@g-carre g-carre deleted the feature/storcli2-raidcontroller-composition branch July 1, 2026 16:11
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.

2 participants