Handle reweights in mon
This commit is contained in:
@@ -271,9 +271,10 @@ class Mon
|
|||||||
if (stat.size && (this.state.osd.state[osd_num] || Number(stat.time) >= down_time))
|
if (stat.size && (this.state.osd.state[osd_num] || Number(stat.time) >= down_time))
|
||||||
{
|
{
|
||||||
// Numeric IDs are reserved for OSDs
|
// Numeric IDs are reserved for OSDs
|
||||||
|
const reweight = this.state.config.osd[osd_num] && Number(this.state.config.osd[osd_num].reweight) || 1;
|
||||||
tree[osd_num] = tree[osd_num] || { id: osd_num, parent: stat.host };
|
tree[osd_num] = tree[osd_num] || { id: osd_num, parent: stat.host };
|
||||||
tree[osd_num].level = 'osd';
|
tree[osd_num].level = 'osd';
|
||||||
tree[osd_num].size = stat.size / 1024 / 1024 / 1024 / 1024; // terabytes
|
tree[osd_num].size = reweight * stat.size / 1024 / 1024 / 1024 / 1024; // terabytes
|
||||||
delete tree[osd_num].children;
|
delete tree[osd_num].children;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user