Skip to content

Commit

Permalink
mgr/pg_autoscaler: include pg_autoscale_bias in autoscale-status table
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Mar 25, 2019
1 parent f845fa1 commit f1d3be6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pybind/mgr/pg_autoscaler/module.py
Expand Up @@ -110,6 +110,7 @@ def _command_autoscale_status(self, cmd):
table = PrettyTable(['POOL', 'SIZE', 'TARGET SIZE',
'RATE', 'RAW CAPACITY',
'RATIO', 'TARGET RATIO',
'BIAS',
'PG_NUM',
# 'IDEAL',
'NEW PG_NUM', 'AUTOSCALE'],
Expand All @@ -121,6 +122,7 @@ def _command_autoscale_status(self, cmd):
table.align['RAW CAPACITY'] = 'r'
table.align['RATIO'] = 'r'
table.align['TARGET RATIO'] = 'r'
table.align['BIAS'] = 'r'
table.align['PG_NUM'] = 'r'
# table.align['IDEAL'] = 'r'
table.align['NEW PG_NUM'] = 'r'
Expand All @@ -146,6 +148,7 @@ def _command_autoscale_status(self, cmd):
mgr_util.format_bytes(p['subtree_capacity'], 6),
'%.4f' % p['capacity_ratio'],
tr,
p['bias'],
p['pg_num_target'],
# p['pg_num_ideal'],
final,
Expand Down Expand Up @@ -319,6 +322,7 @@ def _get_pool_status(
'pg_num_ideal': int(pool_pg_target),
'pg_num_final': final_pg_target,
'would_adjust': adjust,
'bias': p.get('options', {}).get('pg_autoscale_bias', 1.0),
});

return (ret, root_map, pool_root)
Expand Down

0 comments on commit f1d3be6

Please sign in to comment.