From: John Spray Date: Mon, 19 Jan 2015 21:32:50 +0000 (+0000) Subject: tasks/mds_flush: use new stray/purge perfcounters X-Git-Tag: v0.94.10~27^2^2~192^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6b8e823f4dd7c607ef8afaa993727baa6411eda;p=ceph.git tasks/mds_flush: use new stray/purge perfcounters Where previously we only tracked RADOS-level delete ops during deletion, now also verify that they correspond to the right number of MDS-level purge operations. Signed-off-by: John Spray --- diff --git a/tasks/mds_flush.py b/tasks/mds_flush.py index 46c8a69b2f51..23282df6d27a 100644 --- a/tasks/mds_flush.py +++ b/tasks/mds_flush.py @@ -57,14 +57,19 @@ class TestFlush(CephFSTestCase): self.mount_a.wait_until_mounted() self.mount_a.run_shell(["rm", "-rf", "mydir"]) - # We will count the deletions to detect completion - # FIXME: let's add some MDS perf counters for strays so that we can monitor - # deletions directly (#10388) + # We will count the RADOS deletions and MDS file purges, to verify that + # the expected behaviour is happening as a result of the purge initial_dels = self.fs.mds_asok(['perf', 'dump'])['objecter']['osdop_delete'] + initial_purges = self.fs.mds_asok(['perf', 'dump'])['mds_cache']['strays_purged'] flush_data = self.fs.mds_asok(["flush", "journal"]) self.assertEqual(flush_data['return_code'], 0) + # We expect to see a single file purge + self.wait_until_true( + lambda: self.fs.mds_asok(['perf', 'dump'])['mds_cache']['strays_purged'] - initial_purges >= 1, + 60) + # We expect two deletions, one of the dirfrag and one of the backtrace self.wait_until_true( lambda: self.fs.mds_asok(['perf', 'dump'])['objecter']['osdop_delete'] - initial_dels >= 2,