From 44708d8365ca6bc26d586683c36d7e0409629490 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 19 May 2017 14:54:58 +0800 Subject: [PATCH] qa/workunits/cephtool/test.sh: use flush_pg_stats to sync mon with osd Signed-off-by: Kefu Chai --- qa/workunits/cephtool/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 3938b133709..c91f143fd3a 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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}'`