Faidon Liambotis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/87554


Change subject: base: warn on megacli unknown controllers
......................................................................

base: warn on megacli unknown controllers

It turns out that the megacli version that we currently run doesn't
recognize the controller on some of the newer boxes. When that happens,
the output is empty and instead of OK'ing it, we should issue a WARNING.

getLinuxUtility() makes sure that the function only gets called if
megaraid_sas_ioctl is present on /proc/devices, so a warning will
basically mean the kernel & megacli disagreeing whether a controller is
found, something that sounds sensible.

Change-Id: I0dadceba733eab025637f413e0132658ca50f235
---
M modules/base/files/monitoring/check-raid.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/87554/1

diff --git a/modules/base/files/monitoring/check-raid.py 
b/modules/base/files/monitoring/check-raid.py
index 4c58a27..3935a8b 100644
--- a/modules/base/files/monitoring/check-raid.py
+++ b/modules/base/files/monitoring/check-raid.py
@@ -270,7 +270,11 @@
         print 'WARNING: MegaCli64 returned exit status %d' % (ret)
         return 1
 
-    if not match and lines > 0:
+    if lines == 0:
+        print 'WARNING: No known controller found'
+        return 1
+
+    if not match:
         print 'WARNING: Parse error processing MegaCli64 output'
         return 1
 

-- 
To view, visit https://gerrit.wikimedia.org/r/87554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dadceba733eab025637f413e0132658ca50f235
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to