From: Prashant D Date: Tue, 21 Jun 2022 06:53:41 +0000 (-0400) Subject: pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is not on X-Git-Tag: v18.0.0~627^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=46ce0beda3878b62606bbf686a3d6713755acccb;p=ceph-ci.git pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is not on When noautscale is set, autoscale-status shows NEW PG_NUM value if pool pg_num is more than 96. If autoscaler is in off or warn mode for the pool then donot adjust the final pg count for the pool. Fixes: https://tracker.ceph.com/issues/56136 Signed-off-by: Prashant D --- diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index c84ecd23e4d..92a149ae156 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -602,7 +602,8 @@ class PgAutoscaler(MgrModule): if (final_pg_target > p['pg_num_target'] * threshold or final_pg_target < p['pg_num_target'] / threshold) and \ final_ratio >= 0.0 and \ - final_ratio <= 1.0: + final_ratio <= 1.0 and \ + p['pg_autoscale_mode'] == 'on': adjust = True assert pool_pg_target is not None