]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Expect being off by up to 2 and make sure all PGs are active+clean 33566/head
authorDavid Zafman <dzafman@redhat.com>
Tue, 25 Feb 2020 23:32:58 +0000 (15:32 -0800)
committerDavid Zafman <dzafman@redhat.com>
Fri, 28 Feb 2020 02:12:25 +0000 (18:12 -0800)
Fixes: https://tracker.ceph.com/issues/44296
Signed-off-by: David Zafman <dzafman@redhat.com>
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')