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

Potential Megaraid fix #521

Merged
merged 4 commits into from
Jan 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Megaraid: Handle missing 'Enable JBOD' in 'Capabilities'
Signed-off-by: Tony Asleson <tasleson@redhat.com>
  • Loading branch information
tasleson committed Jan 24, 2023
commit a9a3f14b1e5da34db5fe7d11d18b3f829c8552e5
23 changes: 17 additions & 6 deletions plugin/megaraid_plugin/megaraid.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,13 +532,24 @@ def systems(self, flags=Client.FLAG_RSVD):
ctrl_show_all_output["Version"]["Bios Version"],
ctrl_show_all_output["Version"]["Firmware Version"])

if ctrl_show_all_output["Capabilities"]["Enable JBOD"] == "Yes":
mode = System.MODE_HBA
if "Capabilities" in ctrl_show_all_output and \
"Enable JBOD" in ctrl_show_all_output["Capabilities"]:

if ctrl_show_all_output["Capabilities"]["Enable JBOD"] == "Yes":
mode = System.MODE_HBA
else:
mode = System.MODE_HARDWARE_RAID
# Notes for JBOD/HBA mode of MegaRAID:
# "storcli /c0/e9/s1 set jbod" require "storcli /c0 set jbod=on"
# be executed first.
elif "Status" in ctrl_show_all_output and \
"Current Personality" in ctrl_show_all_output["Status"]:
if ctrl_show_all_output["Status"]["Current Personality"] == "HBA-Mode ":
mode = System.MODE_HBA
else:
mode = System.MODE_HBA
else:
mode = System.MODE_HARDWARE_RAID
# Notes for JBOD/HBA mode of MegaRAID:
# "storcli /c0/e9/s1 set jbod" require "storcli /c0 set jbod=on"
# be excuted first.
mode = System.MODE_UNKNOWN

rc_lsm_syss.append(
System(sys_id,
Expand Down