]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/mgr/balancer: Add cram based test for altering target_max_misplaced_ratio setting 30646/head
authorShyukri Shyukriev <shshyukriev@suse.com>
Thu, 26 Sep 2019 08:24:08 +0000 (11:24 +0300)
committerShyukri Shyukriev <shshyukriev@suse.com>
Mon, 30 Sep 2019 11:17:16 +0000 (14:17 +0300)
Signed-off-by: Shyukri Shyukriev <shshyukriev@suse.com>
qa/suites/rados/singleton-nomsgr/all/balancer.yaml [new file with mode: 0644]
src/test/cli-integration/balancer/misplaced.t [new file with mode: 0644]

diff --git a/qa/suites/rados/singleton-nomsgr/all/balancer.yaml b/qa/suites/rados/singleton-nomsgr/all/balancer.yaml
new file mode 100644 (file)
index 0000000..7541050
--- /dev/null
@@ -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 (file)
index 0000000..59a2a10
--- /dev/null
@@ -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