]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/pg_autoscaler: typo default option scale-up to scale-down 43746/head
authorKamoltat <ksirivad@redhat.com>
Fri, 29 Oct 2021 21:23:52 +0000 (21:23 +0000)
committerKamoltat <ksirivad@redhat.com>
Tue, 9 Nov 2021 15:00:47 +0000 (15:00 +0000)
Typo: `scale-up` should be `scale-down` in Module
Option.

This typo doesn't trigger a bug because we create
a key-value of `scale-down` profile in
the function `create_initial()` in `src/mon/KVMonitor.cc`.
This will override whatever is the default option
in pg_autoscaler/module.py when we start the cluster and
the monitor gets created.

The command: `ceph osd pool set autoscale-profile <option>`
is still the primary command to change the autoscale-profiler
after the pool is created.

Fixes: https://tracker.ceph.com/issues/53203
Signed-off-by: Kamoltat <ksirivad@redhat.com>
src/pybind/mgr/pg_autoscaler/module.py

index dc361f5337b1e80570b1c4277cf5bdd83cb2dbff..8ce7acd3f79e69b8983a246bb6a5993c5781f259 100644 (file)
@@ -128,14 +128,14 @@ class PgAutoscaler(MgrModule):
             default=60),
         Option(
             'autoscale_profile',
-            default='scale-up',
+            default='scale-down',
             type='str',
             desc='pg_autoscale profiler',
-            long_desc=('Determines the behavior of the autoscaler algorithm '
+            long_desc=('Determines the behavior of the autoscaler algorithm, '
+                       '`scale-down means start out with full pgs and scales'
+                       'down when there is pressure'
                        '`scale-up` means that it starts out with minmum pgs '
-                       'and scales up when there is pressure, `scale-down` '
-                       'means starts out with full pgs and scales down when '
-                       'there is pressure '),
+                       'and scales up when there is pressure'),
             runtime=True),
         Option(
             name='threshold',
@@ -156,7 +156,7 @@ class PgAutoscaler(MgrModule):
         # to just keep a copy of the pythonized version.
         self._osd_map = None
         if TYPE_CHECKING:
-            self.autoscale_profile: 'ScaleModeT' = 'scale-up'
+            self.autoscale_profile: 'ScaleModeT' = 'scale-down'
             self.sleep_interval = 60
             self.mon_target_pg_per_osd = 0
             self.threshold = 3.0