]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/standalone/mgr/balancer.sh
import 15.2.0 Octopus source
[ceph.git] / ceph / qa / standalone / mgr / balancer.sh
index 7e87cbf4a5f369d8cc1bf8fd1eb2d9b882f26b8c..28db7038588e6637ace1ea8f6486e479b5629931 100755 (executable)
@@ -163,7 +163,8 @@ function TEST_balancer2() {
     done
     test $OK = "yes" || return 1
     # Plan is found, but PGs still need to move
-    sleep 30
+    sleep 10
+    wait_for_clean || return 1
     ceph osd df
 
     PGS=$(ceph osd df --format=json-pretty | jq '.nodes[0].pgs')
@@ -193,13 +194,14 @@ function TEST_balancer2() {
     done
     test $OK = "yes" || return 1
     # Plan is found, but PGs still need to move
-    sleep 30
+    sleep 10
+    wait_for_clean || return 1
     ceph osd df
 
-    # We should be with plue or minus 1 of FINAL_PER_OSD2
+    # We should be with plus or minus 2 of FINAL_PER_OSD2
     # This is because here each pool is balanced independently
-    MIN=$(expr $FINAL_PER_OSD2 - 1)
-    MAX=$(expr $FINAL_PER_OSD2 + 1)
+    MIN=$(expr $FINAL_PER_OSD2 - 2)
+    MAX=$(expr $FINAL_PER_OSD2 + 2)
     PGS=$(ceph osd df --format=json-pretty | jq '.nodes[0].pgs')
     test $PGS -ge $MIN -a $PGS -le $MAX || return 1
     PGS=$(ceph osd df --format=json-pretty | jq '.nodes[1].pgs')