From: David Zafman Date: Tue, 10 Jan 2017 17:43:09 +0000 (-0800) Subject: wait_for_clean: Racing with pg creation might cause increasing num PGs X-Git-Tag: v12.0.0~106^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1009a16291fca88b02c164d2003593e3fe6981c9;p=ceph.git wait_for_clean: Racing with pg creation might cause increasing num PGs Signed-off-by: David Zafman --- diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 8da5295ac3c..c2bd782c229 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1133,15 +1133,14 @@ function wait_for_clean() { local cur_active_clean local -a delays=($(get_timeout_delays $TIMEOUT .1)) local -i loop=0 - local num_pgs=$(get_num_pgs) - test $num_pgs != 0 || return 1 + test $(get_num_pgs) != 0 || return 1 while true ; do # Comparing get_num_active_clean & get_num_pgs is used to determine # if the cluster is clean. That's almost an inline of is_clean() to # get more performance by avoiding multiple calls of get_num_active_clean. cur_active_clean=$(get_num_active_clean) - test $cur_active_clean = $num_pgs && break + test $cur_active_clean = $(get_num_pgs) && break if test $cur_active_clean != $num_active_clean ; then loop=0 num_active_clean=$cur_active_clean