Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for smartpqi #130

Merged

Conversation

raharper
Copy link
Collaborator

Add support for smartpqi/arcconf RAID adapters on Linux

The smartpqi driver for Adaptec/Microsemi RAID controllers uses a cli
tool called arcconf. Add support modeled after the existing
MegaRAID/storcli structures and implement the RAID Controller interface
introduced to abstract the specific RAID adapter for the linux system.

  • Did not implement the Caching mechansim, repeated invocations do not
    have any significant impact on system, 5 minute timeout seems quite long
    to wait for RAID device changes which happen immediately after issuing
    arcconf commands.

  • Refactored how linux package looks up disks to see if they belong to
    a RAID adapter to prevent import loops.

  • Added tests for arcconf for the interface commands parsing output
    collected from systems with smartpqi driver and card

  • Added smartpqi to the demo program

Signed-off-by: Ryan Harper [email protected]

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 180 lines in your changes are missing coverage. Please review.

Comparison is base (82804d0) 66.86% compared to head (eabe011) 65.78%.

Files Patch % Lines
smartpqi/arcconf.go 69.37% 86 Missing and 12 partials ⚠️
linux/util.go 15.15% 28 Missing ⚠️
megaraid/storcli.go 0.00% 21 Missing ⚠️
smartpqi/smartpqi.go 29.62% 18 Missing and 1 partial ⚠️
linux/system.go 26.31% 13 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
- Coverage   66.86%   65.78%   -1.09%     
==========================================
  Files          16       17       +1     
  Lines        2161     2531     +370     
==========================================
+ Hits         1445     1665     +220     
- Misses        520      667     +147     
- Partials      196      199       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@raharper raharper requested a review from smoser February 12, 2024 22:11
smartpqi/arcconf.go Outdated Show resolved Hide resolved
@hallyn
Copy link
Collaborator

hallyn commented Feb 13, 2024

Thanks - it looks good to me. Did you want to rebase or merge as is (with or without the 3 error messages updated)?

@raharper
Copy link
Collaborator Author

Thanks - it looks good to me. Did you want to rebase or merge as is (with or without the 3 error messages updated)?

I'll address your comment and rebase/squash into 3 commits (and fix the lint error I somehow missed)

@raharper raharper force-pushed the feat/add-raid-controller-interface-v2 branch from a9af788 to eb3501f Compare February 14, 2024 17:31
Older golanglint-ci attempted to lint imported modules due to newer
golang version (1.20+), moving to 1.56.1 resolves the issue but
then made other modules be come much more difficult to deal with.

I noticed there are quite a few //nolint: lines throughout the project
and instead of continuing to pepper those around, I chose to disable
not-useful nagging/hard-to-configure linters.

Signed-off-by: Ryan Harper <[email protected]>
Introduce a RAIDController interface to abstract linux/system from
having to know which raid controller it is interacting with.
This also supports handling a raid interface with multiple controllers.

- Update build Makefile target to depend on all go files

Signed-off-by: Ryan Harper <[email protected]>
The smartpqi driver for Adaptec/Microsemi RAID controllers uses a cli
tool called `arcconf`.  Add support modeled after the existing
MegaRAID/storcli structures and implement the RAID Controller interface
introduced to abstract the specific RAID adapter for the linux system.

- Did not implement the Caching mechansim, repeated invocations do not
have any significant impact on system, 5 minute timeout seems quite long
to wait for RAID device changes which happen immediately after issuing
arcconf commands.

- Refactored how linux package looks up disks to see if they belong to
a RAID adapter to prevent import loops.

- Added tests for arcconf for the interface commands parsing output
collected from systems with smartpqi driver and card

- Added smartpqi to the demo program

Signed-off-by: Ryan Harper <[email protected]>
@raharper raharper force-pushed the feat/add-raid-controller-interface-v2 branch from eb3501f to eabe011 Compare February 14, 2024 17:50
Copy link
Collaborator

@hallyn hallyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smoser please ping if you wanted to take a look.

@raharper raharper merged commit 7c6624f into project-machine:main Feb 16, 2024
2 of 4 checks passed
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