Bug #2995

Raid critical status on dashboard does not show failed partitions

Added by Andrea Marchionni almost 5 years ago. Updated almost 5 years ago.

Status:CLOSEDStart date:
Priority:LowDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:v6.5
Security class: Resolution:
Affected version:v6.5-final NEEDINFO:No

Description

On NethServer with two disks, the dashboard, if raid status is critical, does not show which partitions are in fault status, see attached file.
This is the cat /proc/mdstat output:

[root@nserver ~]# cat /proc/mdstat 
Personalities : [raid1] 
md1 : active raid1 sdb1[1](F) sda1[0]
      524224 blocks super 1.0 [2/1] [U_]

md2 : active raid1 sda2[0] sdb2[1](F)
      28771200 blocks super 1.1 [2/1] [U_]
      bitmap: 1/1 pages [4KB], 65536KB chunk

raid.png (10 KB) Andrea Marchionni, 01/12/2015 05:47 AM

Associated revisions

Revision 2624ee6d
Added by Giacomo Sanchietti almost 5 years ago

Web UI: fix raid widget on dashboard. Refs #2995

Revision ff2a378b
Added by Giacomo Sanchietti almost 5 years ago

Web UI: fix raid widget on dashboard. Refs #2995

History

#1 Updated by Giacomo Sanchietti almost 5 years ago

  • Category set to nethserver-base
  • Status changed from NEW to TRIAGED
  • Target version set to v6.5
  • % Done changed from 0 to 20
  • Affected version changed from v6.5 to v6.5-final

Bug confirmed.

Here is the fix:

--- /usr/share/nethesis/NethServer/Template/Dashboard/SystemStatus/RaidStatus.php.ori    2015-01-12 11:03:37.554643682 +0000
+++ /usr/share/nethesis/NethServer/Template/Dashboard/SystemStatus/RaidStatus.php    2015-01-12 11:04:21.776403537 +0000
@@ -13,7 +13,7 @@
         echo " (".($raid['active_devs']=='none'?$T("none"):$raid['active_devs']).")";
         echo "</dd>";
         if ($raid['failed_devs'] != 'none') {
-            echo "<dt>".$T('failed_devs')."</dt><dd>"; echo $raid['failed_dev']; echo "</dd>";
+            echo "<dt>".$T('failed_devs')."</dt><dd>"; echo $raid['failed_devs']; echo "</dd>";
         }
         if ($raid['spare_devs'] != 'none') {
             echo "<dt>".$T('spare_devs')."</dt><dd>"; echo $raid['spare_devs']; echo "</dd>";

#2 Updated by Giacomo Sanchietti almost 5 years ago

  • Priority changed from Normal to Low

#3 Updated by Giacomo Sanchietti almost 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#4 Updated by Giacomo Sanchietti almost 5 years ago

Also remove |product| macro from inline help documents.

#5 Updated by Giacomo Sanchietti almost 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#6 Updated by Giacomo Sanchietti almost 5 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-testing:
  • nethserver-base-2.5.4-4.0git23ce23a3.ns6.noarch.rpm
  • nethserver-httpd-admin-1.3.5-1.2git14f5ec1.ns6.noarch
Test case
  • Install the updated package
  • Create a fake raid status:
    cat << EOF > /tmp/mdstat
    Personalities : [raid1] 
    md1 : active raid1 sdb1[1](F) sda1[0]
          524224 blocks super 1.0 [2/1] [U_]
    
    md2 : active raid1 sda2[0] sdb2[1](F)
          28771200 blocks super 1.1 [2/1] [U_]
          bitmap: 1/1 pages [4KB], 65536KB chunk
    EOF
    
  • Use the file inside the raid helper:
    sed -i 's/proc/tmp/g' /usr/libexec/nethserver/raid-status
    
  • Open the Dashboard and check the raid status is correctly reported

#7 Updated by Giovanni Bezicheri almost 5 years ago

  • Assignee set to Giovanni Bezicheri

#8 Updated by Giovanni Bezicheri almost 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giovanni Bezicheri)
  • % Done changed from 70 to 90

#9 Updated by Giacomo Sanchietti almost 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Relased in nethserve-updates:
  • nethserver-base-2.5.5-1.ns6.noarch.rpm
  • nethserver-httpd-admin-1.3.6-1.ns6.noarch.rpm

Also available in: Atom PDF