]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test reintegration with directory limits
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 15 Dec 2021 15:06:34 +0000 (10:06 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Sun, 16 Jan 2022 14:57:33 +0000 (09:57 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit fe46985a638ee1588855ef41e617b3ef33cde82f)

qa/tasks/cephfs/test_strays.py

index f8313badd03584c3ab69c112b978972cb7ac7e56..7c4834028452fc192b63f92cc53a30997f60a396 100644 (file)
@@ -344,6 +344,35 @@ class TestStrays(CephFSTestCase):
 
         self.await_data_pool_empty()
 
+    def test_reintegration_limit(self):
+        """
+        That the reintegration is not blocked by full directories.
+        """
+
+        LOW_LIMIT = 50
+        self.config_set('mds', 'mds_bal_fragment_size_max', str(LOW_LIMIT))
+        time.sleep(10) # for config to reach MDS; async create is fast!!
+
+        last_reintegrated = self.get_mdc_stat("strays_reintegrated")
+        self.mount_a.run_shell_payload("""
+        mkdir a b
+        for i in `seq 1 50`; do
+           touch a/"$i"
+           ln a/"$i" b/"$i"
+        done
+        sync -f a b
+        rm a/*
+        """)
+
+        self.wait_until_equal(
+            lambda: self.get_mdc_stat("num_strays"),
+            expect_val=0,
+            timeout=60
+        )
+        curr_reintegrated = self.get_mdc_stat("strays_reintegrated")
+        self.assertGreater(curr_reintegrated, last_reintegrated)
+
+
     def test_hardlink_reintegration(self):
         """
         That removal of primary dentry of hardlinked inode results