Handle reweights in mon

trace-sqes
Vitaliy Filippov 2020-05-22 12:52:27 +03:00
parent 9f842ec9a5
commit fac75b0b57
1 changed files with 2 additions and 1 deletions

View File

@ -271,9 +271,10 @@ class Mon
if (stat.size && (this.state.osd.state[osd_num] || Number(stat.time) >= down_time))
{
// 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].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;
}
}