From: David Zafman Date: Tue, 25 Feb 2020 23:32:58 +0000 (-0800) Subject: test: Expect being off by up to 2 and make sure all PGs are active+clean X-Git-Tag: v15.1.1~206^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33566%2Fhead;p=ceph.git test: Expect being off by up to 2 and make sure all PGs are active+clean Fixes: https://tracker.ceph.com/issues/44296 Signed-off-by: David Zafman --- diff --git a/qa/standalone/mgr/balancer.sh b/qa/standalone/mgr/balancer.sh index 7e87cbf4a5f3..28db7038588e 100755 --- a/qa/standalone/mgr/balancer.sh +++ b/qa/standalone/mgr/balancer.sh @@ -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')