From cfebec1b128bc2191d2bbe90f99191ae7750b203 Mon Sep 17 00:00:00 2001 From: Neha Date: Sun, 22 Mar 2020 20:01:23 +0000 Subject: [PATCH] qa/*/osd-backfill-recovery-log.sh: flush_pg_stats before checking log length It is possible for the pg dump to not be the latest when we check for newprimary in _common_test(). This is because mgr_stats_period is 5 seconds, and we may not have fetched the latest stats just yet. This causes the test to look at the same stats before and after wait_for_clean. Fixes: https://tracker.ceph.com/issues/43807 (2) Signed-off-by: Neha Ojha --- qa/standalone/osd/osd-backfill-recovery-log.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/standalone/osd/osd-backfill-recovery-log.sh b/qa/standalone/osd/osd-backfill-recovery-log.sh index 5358295833495..6f20d90b5b5ad 100755 --- a/qa/standalone/osd/osd-backfill-recovery-log.sh +++ b/qa/standalone/osd/osd-backfill-recovery-log.sh @@ -74,6 +74,8 @@ function _common_test() { sleep 1 wait_for_clean + flush_pg_stats + newprimary=$(ceph pg dump pgs --format=json | jq '.pg_stats[0].up_primary') kill_daemons -- 2.39.5