From 89a7eb0982f0d1098b92eb9c25d185c4374d9d62 Mon Sep 17 00:00:00 2001 From: "Vincent S. Cojot" Date: Wed, 11 Jan 2017 12:04:55 -0500 Subject: [PATCH 1/4] Minor bugfix to get NestedLDTable properly laid out.. --- wrapper-scripts/megaclisas-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper-scripts/megaclisas-status b/wrapper-scripts/megaclisas-status index 3495502..b958874 100755 --- a/wrapper-scripts/megaclisas-status +++ b/wrapper-scripts/megaclisas-status @@ -33,7 +33,7 @@ totaldrivenumber = 0 MaxNumHBA = 16 MaxNumLD = 128 LDTable = [ [] * MaxNumHBA for i in range(MaxNumLD) ] -NestedLDTable = [[False for i in range(MaxNumHBA)] for j in range(MaxNumLD)] +NestedLDTable = [[False for i in range(MaxNumLD)] for j in range(MaxNumHBA)] # Outputs is a 'dict' of all MegaCLI outputs so we can re-use them during loops.. Outputs = {} From 5a4beff9d8fdfd04ca91b9fc2cdb9db2d13d1ad8 Mon Sep 17 00:00:00 2001 From: "Vincent S. Cojot" Date: Wed, 11 Jan 2017 12:13:18 -0500 Subject: [PATCH 2/4] Updated build rev. --- wrapper-scripts/megaclisas-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper-scripts/megaclisas-status b/wrapper-scripts/megaclisas-status index b958874..57d60f3 100755 --- a/wrapper-scripts/megaclisas-status +++ b/wrapper-scripts/megaclisas-status @@ -1,5 +1,5 @@ #!/usr/bin/python -# $Id: megaclisas-status,v 1.68 2016/10/21 14:38:56 root Exp root $ +# $Id: megaclisas-status,v 1.69 2017/01/11 17:12:46 root Exp root $ # # Written by Adam Cecile # Modified by Vincent S. Cojot From 5e9b42143fc2d67fe892c979ef1d62514fad0631 Mon Sep 17 00:00:00 2001 From: "Vincent S. Cojot" Date: Tue, 28 Mar 2017 12:02:50 -0400 Subject: [PATCH 3/4] Fix for some Infortrend enclosures.. --- wrapper-scripts/megaclisas-status | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrapper-scripts/megaclisas-status b/wrapper-scripts/megaclisas-status index 57d60f3..f98e674 100755 --- a/wrapper-scripts/megaclisas-status +++ b/wrapper-scripts/megaclisas-status @@ -1,5 +1,5 @@ #!/usr/bin/python -# $Id: megaclisas-status,v 1.69 2017/01/11 17:12:46 root Exp root $ +# $Id: megaclisas-status,v 1.70 2017/03/28 16:02:04 root Exp root $ # # Written by Adam Cecile # Modified by Vincent S. Cojot @@ -414,7 +414,7 @@ def returnDiskInfo(output,controllerid): elif re.match(r'Enclosure Device ID: .*$',line.strip()): # We match here early in the analysis so reset the vars if this is a new disk we're reading.. oldenclid = enclid - enclid = line.split(':')[1].strip() + enclid = line.split(':')[1].strip().replace("N/A","") if oldenclid != False: fstate = 'Offline' model = 'Unknown' @@ -500,7 +500,7 @@ def returnUnconfDiskInfo(output,controllerid): if re.match(r'Enclosure Device ID: .*$',line.strip()): # We match here early in the analysis so reset the vars if this is a new disk we're reading.. oldenclid = enclid - enclid = line.split(':')[1].strip() + enclid = line.split(':')[1].strip().replace("N/A","") if oldenclid != False: arrayid = False fstate = 'Offline' From d0800e4b942174a37199d098dc9016eba4b4045a Mon Sep 17 00:00:00 2001 From: "Vincent S. Cojot" Date: Tue, 4 Apr 2017 14:46:30 -0400 Subject: [PATCH 4/4] Minor bugfix for Hot Spares display... --- wrapper-scripts/megaclisas-status | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrapper-scripts/megaclisas-status b/wrapper-scripts/megaclisas-status index f98e674..3d04388 100755 --- a/wrapper-scripts/megaclisas-status +++ b/wrapper-scripts/megaclisas-status @@ -1,5 +1,5 @@ #!/usr/bin/python -# $Id: megaclisas-status,v 1.70 2017/03/28 16:02:04 root Exp root $ +# $Id: megaclisas-status,v 1.71 2017/04/04 18:45:52 root Exp root $ # # Written by Adam Cecile # Modified by Vincent S. Cojot @@ -175,6 +175,8 @@ def returnUnConfDriveNumber(output): for line in output: if re.match(r'^Firmware state: Unconfigured.*$',line.strip()): confdrives += 1 + if re.match(r'^Firmware state: Hotspare.*$',line.strip()): + confdrives += 1 return int(confdrives) def returnControllerModel(output):