]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is not on
authorPrashant D <pdhange@redhat.com>
Tue, 21 Jun 2022 06:53:41 +0000 (02:53 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 21 Jun 2022 11:18:39 +0000 (07:18 -0400)
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 <pdhange@redhat.com>
src/pybind/mgr/pg_autoscaler/module.py

index c84ecd23e4ddd81a86985a89e79675a3061138a4..92a149ae15645444135f8e4062c7436f45fc39d2 100644 (file)
@@ -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