]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs/test_client_limits.py: test for client oldest tid warning
authorYan, Zheng <zyan@redhat.com>
Tue, 21 Apr 2015 12:24:39 +0000 (20:24 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 21 Apr 2015 15:29:47 +0000 (23:29 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
suites/fs/recovery/tasks/client-limits.yaml
tasks/cephfs/test_client_limits.py

index d4016f51d7295690ffbea95c770eb930abb80877..288866c636fdee953bee64c99107337cfc0d3fe2 100644 (file)
@@ -3,6 +3,7 @@ overrides:
   ceph:
     log-whitelist:
       - responding to mclientcaps\(revoke\)
+      - not advance its oldest_client_tid
 
 tasks:
   - cephfs_test_runner:
index c2e4e56fbb7d5849e49356e3cca3418d1ed33883..decc6a86ba27bb0ba39e531088a5525dad478c1d 100644 (file)
@@ -143,3 +143,29 @@ class TestClientLimits(CephFSTestCase):
         # Client B should complete
         self.fs.mds_asok(['session', 'evict', "%s" % mount_a_client_id])
         rproc.wait()
+
+    def test_client_oldest_tid(self):
+        """
+        When a client does not advance its oldest tid, the MDS should notice that
+        and generate health warnings.
+        """
+
+        # num of requests client issues
+        max_requests = 5000
+
+        # The debug hook to inject the failure only exists in the fuse client
+        if not isinstance(self.mount_a, FuseMount):
+            raise SkipTest("Require FUSE client to inject client release failure")
+
+        self.set_conf('client', 'client inject fixed oldest tid', 'true')
+        self.mount_a.teardown()
+        self.mount_a.mount()
+        self.mount_a.wait_until_mounted()
+
+        self.fs.mds_asok(['config', 'set', 'mds_max_completed_requests', '{0}'.format(max_requests)])
+
+        # Create lots of files in background
+        self.mount_a.open_n_background("testdir/file", max_requests * 2)
+
+        # Wait for the health warnings. Assume mds can handle 10 request per second at least
+        self.wait_for_health("failing to advance its oldest_client_tid", max_requests / 10)