From: Kefu Chai Date: Mon, 18 Nov 2019 12:31:05 +0000 (+0800) Subject: qa/workunits/cephtool/test.sh: set min_{bytes,pgs}_per_osd for reweight X-Git-Tag: v15.1.0~866^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4594ab9aa7476cb66e300a505b0c20ca57ca86be;p=ceph.git qa/workunits/cephtool/test.sh: set min_{bytes,pgs}_per_osd for reweight otherwise ceph-mgr will refuse to perform reweight Signed-off-by: Kefu Chai --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index f20706175201..0733139117ba 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -2461,6 +2461,13 @@ function test_mon_osd_misc() set -e + local old_bytes_per_osd=$(ceph config get mgr mon_reweight_min_bytes_per_osd) + local old_pgs_per_osd=$(ceph config get mgr mon_reweight_min_pgs_per_osd) + # otherwise ceph-mgr complains like: + # Error EDOM: Refusing to reweight: we only have 5372 kb used across all osds! + # Error EDOM: Refusing to reweight: we only have 20 PGs across 3 osds! + ceph config set mgr mon_reweight_min_bytes_per_osd 0 + ceph config set mgr mon_reweight_min_pgs_per_osd 0 ceph osd reweight-by-utilization 110 ceph osd reweight-by-utilization 110 .5 expect_false ceph osd reweight-by-utilization 110 0 @@ -2474,6 +2481,9 @@ function test_mon_osd_misc() ceph osd reweight-by-pg 110 rbd ceph osd reweight-by-pg 110 .5 rbd expect_false ceph osd reweight-by-pg 110 boguspoolasdfasdfasdf + # restore the setting + ceph config set mgr mon_reweight_min_bytes_per_osd $old_bytes_per_osd + ceph config set mgr mon_reweight_min_pgs_per_osd $old_pgs_per_osd } function test_admin_heap_profiler()