]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is not on 53464/head
authorPrashant D <pdhange@redhat.com>
Tue, 21 Jun 2022 06:53:41 +0000 (02:53 -0400)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Thu, 14 Sep 2023 13:52:04 +0000 (20:52 +0700)
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>
(cherry picked from commit 46ce0beda3878b62606bbf686a3d6713755acccb)

src/pybind/mgr/pg_autoscaler/module.py

index f1c0bad19ac899bd2a6fe6d2de31888df765aa6a..191da430c8dcaa70521556e4ab65b6cf5822615d 100644 (file)
@@ -585,7 +585,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