assert not self.is_mounted()
self._fuse_conn = None
- def umount_wait(self, force=False):
+ def umount_wait(self, force=False, require_clean=False):
"""
:param force: Complete cleanly even if the MDS is offline
"""
if force:
+ assert not require_clean # mutually exclusive
+
# When we expect to be forcing, kill the ceph-fuse process directly.
# This should avoid hitting the more aggressive fallback killing
# in umount() which can affect other mounts too.
"indicates a bug within ceph-fuse.")
raise
except CommandFailedError:
- pass
+ if require_clean:
+ raise
self.cleanup()
def cleanup(self):
pass
- def umount_wait(self, force=False):
+ def umount_wait(self, force=False, require_clean=False):
"""
Unlike the fuse client, the kernel client's umount is immediate
"""
def umount(self):
raise NotImplementedError()
- def umount_wait(self, force=False):
+ def umount_wait(self, force=False, require_clean=False):
+ """
+
+ :param force: Expect that the mount will not shutdown cleanly: kill
+ it hard.
+ :param require_clean: Wait for the Ceph client associated with the
+ mount (e.g. ceph-fuse) to terminate, and
+ raise if it doesn't do so cleanly.
+ :return:
+ """
raise NotImplementedError()
def kill_cleanup(self):