From 51090e139e8052742d77d92bd3993d0423f0d58c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 25 Mar 2019 06:29:53 -0500 Subject: [PATCH] mgr/pg_autoscaler: include pg_autoscale_bias in autoscale-status table Signed-off-by: Sage Weil (cherry picked from commit f1d3be6ac7a9e5092a5a610ac3f5a59c74e25bc7) --- src/pybind/mgr/pg_autoscaler/module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index e92377eb4bdbb..2a1cf978c4afa 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -109,6 +109,7 @@ class PgAutoscaler(MgrModule): table = PrettyTable(['POOL', 'SIZE', 'TARGET SIZE', 'RATE', 'RAW CAPACITY', 'RATIO', 'TARGET RATIO', + 'BIAS', 'PG_NUM', # 'IDEAL', 'NEW PG_NUM', 'AUTOSCALE'], @@ -120,6 +121,7 @@ class PgAutoscaler(MgrModule): 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' @@ -145,6 +147,7 @@ class PgAutoscaler(MgrModule): mgr_util.format_bytes(p['subtree_capacity'], 6), '%.4f' % p['capacity_ratio'], tr, + p['bias'], p['pg_num_target'], # p['pg_num_ideal'], final, @@ -318,6 +321,7 @@ class PgAutoscaler(MgrModule): '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) -- 2.39.5