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>
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:
# 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()