From: Xiubo Li Date: Tue, 13 Oct 2020 08:11:43 +0000 (+0800) Subject: qa/tasks: tear down the background process before unmounting X-Git-Tag: v16.1.0~767^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37652%2Fhead;p=ceph.git qa/tasks: tear down the background process before unmounting 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 --- diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index 33c557c2d346..2218e057f8cd 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -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: diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index 65ae312d4ec7..ab2fe239c1c6 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -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()