]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: make KernelMount.umount_wait idempotent
authorJohn Spray <john.spray@redhat.com>
Tue, 30 Aug 2016 12:02:28 +0000 (13:02 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 7 Dec 2016 00:45:45 +0000 (00:45 +0000)
Some places (notably CephFSTestCase.setUp) don't check
for mountedness before calling this.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/kernel_mount.py

index f9e9050aa3b3e75884ddfdb134b43d27c2aafb71..41091ef1da2cfb0ba1f928f23113251d431fa3c8 100644 (file)
@@ -107,6 +107,9 @@ class KernelMount(CephFSMount):
         """
         Unlike the fuse client, the kernel client's umount is immediate
         """
+        if not self.is_mounted():
+            return
+
         try:
             self.umount()
         except CommandFailedError: