Fix Monitor being unable to change PG sizes

Vitaliy Filippov 2021-02-25 23:21:56 +03:00
parent 12adfa470c
commit fcb4aa0a11
1 changed files with 11 additions and 0 deletions

View File

@ -811,6 +811,17 @@ class Mon
}
PGUtil.scale_pg_count(prev_pgs, this.state.pg.history[pool_id]||{}, pg_history, pool_cfg.pg_count);
}
for (const pg of prev_pgs)
{
while (pg.length < pool_cfg.pg_size)
{
pg.push(0);
}
while (pg.length > pool_cfg.pg_size)
{
pg.pop();
}
}
optimize_result = await LPOptimizer.optimize_change({
prev_pgs,
osd_tree: pool_tree,