From: Kyle Date: Tue, 17 Aug 2021 18:03:00 +0000 (-0700) Subject: reduce threshold min to 1.0 X-Git-Tag: v17.1.0~1007^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=67b52a982674d28ccd3e4170bc968dfc8056f800;p=ceph.git reduce threshold min to 1.0 Signed-off-by: Kyle McGough --- diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 926c0b5d842e..dc361f5337b1 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -142,9 +142,9 @@ class PgAutoscaler(MgrModule): type='float', desc='scaling threshold', long_desc=('The factor by which the `NEW PG_NUM` must vary from the current' - '`PG_NUM` before being accepted. Should not be less than 2.0'), + '`PG_NUM` before being accepted. Cannot be less than 1.0'), default=3.0, - min=2.0), + min=1.0), ] def __init__(self, *args: Any, **kwargs: Any) -> None: @@ -258,8 +258,8 @@ class PgAutoscaler(MgrModule): set the autoscaler threshold A.K.A. the factor by which the new PG_NUM must vary from the existing PG_NUM """ - if num < 2.0: - return 22, "", "threshold can not be set less than 2.0" + if num < 1.0: + return 22, "", "threshold cannot be set less than 1.0" self.set_module_option("threshold", num) return 0, "threshold updated", "" @@ -579,7 +579,7 @@ class PgAutoscaler(MgrModule): ) -> Tuple[List[Dict[str, Any]], Dict[int, CrushSubtreeResourceStatus]]: threshold = self.threshold - assert threshold >= 2.0 + assert threshold >= 1.0 crush_map = osdmap.get_crush() root_map, overlapped_roots = self.get_subtree_resource_status(osdmap, crush_map)