]> git.proxmox.com Git - pve-manager.git/commitdiff
fix wrong osd calculation in ceph dashboard
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 11 Jul 2017 12:39:18 +0000 (14:39 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 13 Jul 2017 04:36:34 +0000 (06:36 +0200)
in luminous, the error message is not
'x/y in osds are down' anymore, but
'x osds down'

so we need to adapt the parsing, and it means we cannot check
the number of in osds there anymore (was never really needed, so
we can simply omit it)

when an osd is down but marked as out, those errors disappear

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/ceph/StatusDetail.js

index 6517ab7b83a155ed28923bed2f698a9a32bf7026..f807674e295c8213a11f33101d1537ff691028f6 100644 (file)
@@ -127,18 +127,13 @@ Ext.define('PVE.ceph.StatusDetail', {
        var out_osds = total_osds - in_osds;
        var down_osds = total_osds - up_osds;
        var downin_osds = 0;
-       var downinregex = /(\d+)\/(\d+) in osds are down/;
+       var downinregex = /(\d+) osds down/;
        Ext.Array.some(record.data.health.summary, function(item) {
            var found = item.summary.match(downinregex);
 
            if (found !== null) {
-               // sanity check, test if the message is
-               // consistent with the direct value
-               // for in osds
-               if (found[2] == in_osds) {
                    downin_osds = parseInt(found[1],10);
                    return true;
-               }
            }
 
            return false;