Faidon Liambotis has submitted this change and it was merged.
Change subject: check-raid: fix megaraid_sas detection
......................................................................
check-raid: fix megaraid_sas detection
precise's 3.11 comes with CONFIG_MEGARAID_SAS=y, rather than "m", so a
megaraid_sas_ioctl exists in /proc/devices (and associated /dev node)
always exist.
The whole check-raid.py logic is completely broken -- megacli knows if
there are no controllers found but the code doesn't allow us to return
and fallback to the next RAID controller (why we would pick just one
anyway?!)
Instead of rewriting it, merely add a stopgap: switch the detection to
check for the presence of a PCI device using sysfs instead.
Change-Id: I5c97473304d1f88174b37ac0b400959849826931
---
M modules/base/files/monitoring/check-raid.py
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Faidon Liambotis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/base/files/monitoring/check-raid.py
b/modules/base/files/monitoring/check-raid.py
index cb23a56..b3f6eea 100644
--- a/modules/base/files/monitoring/check-raid.py
+++ b/modules/base/files/monitoring/check-raid.py
@@ -9,6 +9,7 @@
import re
import subprocess
import sys
+import glob
def main():
@@ -69,14 +70,14 @@
elif name == 'megadev':
utility = 'megarc'
break
- elif name == 'megaraid_sas_ioctl':
- utility = 'MegaCli'
- break
f.close()
if utility is not None:
return utility
+ if len(glob.glob("/sys/bus/pci/drivers/megaraid_sas/00*")) > 0:
+ return 'MegaCli'
+
try:
f = open("/proc/scsi/mptsas/0", "r")
return "mptsas"
--
To view, visit https://gerrit.wikimedia.org/r/98292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5c97473304d1f88174b37ac0b400959849826931
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits