]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks: tear down the background process before unmounting
authorXiubo Li <xiubli@redhat.com>
Tue, 13 Oct 2020 08:11:43 +0000 (16:11 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 21 Oct 2020 08:02:38 +0000 (04:02 -0400)
If the background process keeps running by opening the mountpoint
directory, the unmount will fail with BUSY.

Fixes: https://tracker.ceph.com/issues/46883
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/kernel_mount.py
qa/tasks/cephfs/test_client_recovery.py

index 33c557c2d346384949eeadb5682119cc2c079248..2218e057f8cd0cde88cdba3fea0cddc2ef6e16c3 100644 (file)
@@ -66,9 +66,9 @@ class KernelMount(CephFSMount):
         self.mounted = True
 
     def _run_mount_cmd(self, mntopts, check_status):
-        opts = 'norequire_active_mds,'
+        opts = 'norequire_active_mds'
         if self.client_id:
-            opts += 'name=' + self.client_id
+            opts += ',name=' + self.client_id
         if self.client_keyring_path and self.client_id:
             opts += ',secret=' + self.get_key_from_keyfile()
         if self.config_path:
index 65ae312d4ec7056b3689bd5133c7d98f6b0a79b5..ab2fe239c1c6a5d2717e8e89b5f51b35b30099f0 100644 (file)
@@ -414,6 +414,9 @@ class TestClientRecovery(CephFSTestCase):
             # succeed
             self.wait_until_true(lambda: lock_taker.finished, timeout=10)
         finally:
+            # Tear down the background process
+            self.mount_a._kill_background(lock_holder)
+
             # teardown() doesn't quite handle this case cleanly, so help it out
             self.mount_a.kill()
             self.mount_a.kill_cleanup()