]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool/test.sh: use flush_pg_stats to sync mon with osd
authorKefu Chai <kchai@redhat.com>
Fri, 19 May 2017 06:54:58 +0000 (14:54 +0800)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 17:02:46 +0000 (13:02 -0400)
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/cephtool/test.sh

index 3938b133709b0d334e92c03e5059c1ca172fff10..c91f143fd3ae0981b89393201db065b9ccea6788 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/bash -x
+# -*- mode:shell-script; tab-width:8; sh-basic-offset:2; indent-tabs-mode:t -*-
+# vim: ts=8 sw=8 ft=bash smarttab
 
 source $(dirname $0)/../ceph-helpers.sh
 
@@ -2061,7 +2063,9 @@ function test_mon_cephdf_commands()
     rados -p cephdf_for_test ls - | grep -q cephdf_for_test && break
     sleep 1
   done
-
+  # "rados ls" goes straight to osd, but "ceph df" is served by mon. so we need
+  # to sync mon with osd
+  flush_pg_stats
   cal_raw_used_size=`ceph df detail | grep cephdf_for_test | awk -F ' ' '{printf "%d\n", 2 * $3}'`
   raw_used_size=`ceph df detail | grep cephdf_for_test | awk -F ' '  '{print $10}'`