]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: relax min_caps_per_client check 27040/head
authorYan, Zheng <zyan@redhat.com>
Thu, 7 Mar 2019 13:12:28 +0000 (21:12 +0800)
committerPrashant D <pdhange@redhat.com>
Tue, 19 Mar 2019 02:10:17 +0000 (22:10 -0400)
new kernel client proactively release caps. caps count can go below
mds_min_caps_per_client

Fixes: http://tracker.ceph.com/issues/38270
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 8e81bd74c59259a06f587bb425d58bf2b2176341)

qa/tasks/cephfs/test_client_limits.py

index bc029cd8a5ab8300a99c599bfda7eda7b96aeb45..706f4af0addd3c5d63549c45772fa6df85b778ca 100644 (file)
@@ -86,9 +86,7 @@ class TestClientLimits(CephFSTestCase):
         # which depend on the caps outstanding, cache size and overall ratio
         def expected_caps():
             num_caps = self.get_session(mount_a_client_id)['num_caps']
-            if num_caps < mds_min_caps_per_client:
-                raise RuntimeError("client caps fell below min!")
-            elif num_caps == mds_min_caps_per_client:
+            if num_caps <= mds_min_caps_per_client:
                 return True
             elif num_caps < cache_size:
                 return True
@@ -253,9 +251,7 @@ class TestClientLimits(CephFSTestCase):
         mount_a_client_id = self.mount_a.get_global_id()
         def expected_caps():
             num_caps = self.get_session(mount_a_client_id)['num_caps']
-            if num_caps < mds_min_caps_per_client:
-                raise RuntimeError("client caps fell below min!")
-            elif num_caps <= mds_max_caps_per_client:
+            if num_caps <= mds_max_caps_per_client:
                 return True
             else:
                 return False