From 4bac31008bfb2f810eacfd78600dffcccb69bdba Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Feb 2016 16:52:00 +0300 Subject: [PATCH 1/4] Fix missing drives when the number of arrays of more than one --- wrapper-scripts/sas2ircu-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper-scripts/sas2ircu-status b/wrapper-scripts/sas2ircu-status index 295b901..5a5aec7 100755 --- a/wrapper-scripts/sas2ircu-status +++ b/wrapper-scripts/sas2ircu-status @@ -156,7 +156,7 @@ if not nagiosmode: for ctrl in ctrls: for disk in getDiskList(ctrl[0]): # Compare disk enc/slot to array's ones - for array in [arraymap.get(ctrl[0])]: + for array in getArrayList(ctrl[0]): for arraydisk in array[4]: if arraydisk == disk[4]: if not disk[1] == 'Optimal (OPT)': From 5a5e9fc04fd213259fac7dea7549168357a1c709 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Feb 2016 18:21:42 +0300 Subject: [PATCH 2/4] Fix missing drives when the number of arrays of more than one. Correction --- wrapper-scripts/sas2ircu-status | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper-scripts/sas2ircu-status b/wrapper-scripts/sas2ircu-status index 5a5aec7..b9a514f 100755 --- a/wrapper-scripts/sas2ircu-status +++ b/wrapper-scripts/sas2ircu-status @@ -138,8 +138,8 @@ if not nagiosmode: print '-- Arrays informations --' print '-- ID | Type | Size | Status' for ctrl in ctrls: + arraymap[ctrl[0]]=getArrayList(ctrl[0]) for array in getArrayList(ctrl[0]): - arraymap[ctrl[0]]=array if not array[3] in ['Okay (OKY)', 'Inactive, Okay (OKY)']: bad=True nagiosbadarray=nagiosbadarray+1 @@ -156,7 +156,7 @@ if not nagiosmode: for ctrl in ctrls: for disk in getDiskList(ctrl[0]): # Compare disk enc/slot to array's ones - for array in getArrayList(ctrl[0]): + for array in arraymap.get(ctrl[0]): for arraydisk in array[4]: if arraydisk == disk[4]: if not disk[1] == 'Optimal (OPT)': From d0530f52c2f22b0013310dbc1e5e87cf1289baf1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Feb 2016 18:31:42 +0300 Subject: [PATCH 3/4] Fix missing drives when the number of arrays of more than one. Correction2 --- wrapper-scripts/sas2ircu-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper-scripts/sas2ircu-status b/wrapper-scripts/sas2ircu-status index b9a514f..3e08d6a 100755 --- a/wrapper-scripts/sas2ircu-status +++ b/wrapper-scripts/sas2ircu-status @@ -139,7 +139,7 @@ if not nagiosmode: print '-- ID | Type | Size | Status' for ctrl in ctrls: arraymap[ctrl[0]]=getArrayList(ctrl[0]) - for array in getArrayList(ctrl[0]): + for array in arraymap[ctrl[0]]: if not array[3] in ['Okay (OKY)', 'Inactive, Okay (OKY)']: bad=True nagiosbadarray=nagiosbadarray+1 From 65b37c6dbec741e29454c5b3bd66b44aec0212f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Feb 2016 16:52:00 +0300 Subject: [PATCH 4/4] Fix missing drives sas2ircu when the number of arrays of more than one. --- wrapper-scripts/sas2ircu-status | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrapper-scripts/sas2ircu-status b/wrapper-scripts/sas2ircu-status index 295b901..3e08d6a 100755 --- a/wrapper-scripts/sas2ircu-status +++ b/wrapper-scripts/sas2ircu-status @@ -138,8 +138,8 @@ if not nagiosmode: print '-- Arrays informations --' print '-- ID | Type | Size | Status' for ctrl in ctrls: - for array in getArrayList(ctrl[0]): - arraymap[ctrl[0]]=array + arraymap[ctrl[0]]=getArrayList(ctrl[0]) + for array in arraymap[ctrl[0]]: if not array[3] in ['Okay (OKY)', 'Inactive, Okay (OKY)']: bad=True nagiosbadarray=nagiosbadarray+1 @@ -156,7 +156,7 @@ if not nagiosmode: for ctrl in ctrls: for disk in getDiskList(ctrl[0]): # Compare disk enc/slot to array's ones - for array in [arraymap.get(ctrl[0])]: + for array in arraymap.get(ctrl[0]): for arraydisk in array[4]: if arraydisk == disk[4]: if not disk[1] == 'Optimal (OPT)':