From: Shyukri Shyukriev Date: Thu, 26 Sep 2019 08:24:08 +0000 (+0300) Subject: qa/mgr/balancer: Add cram based test for altering target_max_misplaced_ratio setting X-Git-Tag: v15.1.0~1229^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37a45deb5bb435afd056a05d09cf691bb36f2086;p=ceph.git qa/mgr/balancer: Add cram based test for altering target_max_misplaced_ratio setting Signed-off-by: Shyukri Shyukriev --- diff --git a/qa/suites/rados/singleton-nomsgr/all/balancer.yaml b/qa/suites/rados/singleton-nomsgr/all/balancer.yaml new file mode 100644 index 000000000000..75410508215d --- /dev/null +++ b/qa/suites/rados/singleton-nomsgr/all/balancer.yaml @@ -0,0 +1,10 @@ +roles: +- [mon.a, mgr.x, osd.0, osd.1, osd.2, client.0] +tasks: +- install: +- ceph: + fs: xfs +- cram: + clients: + client.0: + - src/test/cli-integration/balancer/misplaced.t diff --git a/src/test/cli-integration/balancer/misplaced.t b/src/test/cli-integration/balancer/misplaced.t new file mode 100644 index 000000000000..59a2a10d07dd --- /dev/null +++ b/src/test/cli-integration/balancer/misplaced.t @@ -0,0 +1,26 @@ + $ ceph osd pool create balancer_opt 128 + pool 'balancer_opt' created + $ ceph osd pool application enable balancer_opt rados + enabled application 'rados' on pool 'balancer_opt' + $ rados bench -p balancer_opt 50 write --no-cleanup > /dev/null + $ ceph balancer on + $ ceph balancer mode crush-compat + $ ceph balancer ls + [] + $ ceph config set osd.* target_max_misplaced_ratio .07 + $ ceph balancer eval + current cluster score [0-9]*\.?[0-9]+.* (re) + $ ceph balancer optimize test_plan balancer_opt + $ ceph balancer ls + [ + "test_plan" + ] + $ ceph balancer execute test_plan + $ ceph balancer eval + current cluster score [0-9]*\.?[0-9]+.* (re) +# Plan is gone after execution ? + $ ceph balancer execute test_plan + Error ENOENT: plan test_plan not found + [2] + $ ceph osd pool rm balancer_opt balancer_opt --yes-i-really-really-mean-it + pool 'balancer_opt' removed