]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/balancer: add min/max fields for begin[end]_weekday
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Feb 2019 10:30:52 +0000 (18:30 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Feb 2019 11:31:31 +0000 (19:31 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/pybind/mgr/balancer/module.py

index 97294f09ead102edb882cfba8b8f8f5621b3626f..638a4337f522fd5922ac9e18cb093a61fe22ffbe 100644 (file)
@@ -225,6 +225,8 @@ class Module(MgrModule):
             'name': 'begin_weekday',
             'type': 'uint',
             'default': 0,
+            'min': 0,
+            'max': 7,
             'desc': 'Restrict automatic balancing to this day of the week or later',
             'long_desc': '0 or 7 = Sunday, 1 = Monday, etc.',
             'runtime': True,
@@ -233,6 +235,8 @@ class Module(MgrModule):
             'name': 'end_weekday',
             'type': 'uint',
             'default': 7,
+            'min': 0,
+            'max': 7,
             'desc': 'Restrict automatic balancing to days of the week earlier than this',
             'long_desc': '0 or 7 = Sunday, 1 = Monday, etc.',
             'runtime': True,
@@ -241,8 +245,8 @@ class Module(MgrModule):
             'name': 'crush_compat_max_iterations',
             'type': 'uint',
             'default': 25,
-            'min': '1',
-            'max': '250',
+            'min': 1,
+            'max': 250,
             'desc': 'maximum number of iterations to attempt optimization',
             'runtime': True,
         },
@@ -258,8 +262,8 @@ class Module(MgrModule):
             'name': 'crush_compat_step',
             'type': 'float',
             'default': .5,
-            'min': '.001',
-            'max': '.999',
+            'min': .001,
+            'max': .999,
             'desc': 'aggressiveness of optimization',
             'long_desc': '.99 is very aggressive, .01 is less aggressive',
             'runtime': True,