]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/vstart_runner: use parent's umount methods 36863/head
authorXiubo Li <xiubli@redhat.com>
Thu, 5 Mar 2020 01:59:04 +0000 (20:59 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 27 Aug 2020 21:00:04 +0000 (14:00 -0700)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 95820bf48f24579a099a2acf02575cddb3295c4a)

Conflicts:
qa/tasks/vstart_runner.py

qa/tasks/cephfs/fuse_mount.py
qa/tasks/cephfs/kernel_mount.py
qa/tasks/vstart_runner.py

index c71b2041da1d887ce9b34a69c00e70d0da52a51a..664de4f4c8c3ea896d11854d6131abd2eeee5781 100644 (file)
@@ -248,6 +248,9 @@ class FuseMount(CephFSMount):
         return self.client_remote.run(args=["ls", "-d", self.mountpoint], check_status=False, cwd=self.test_dir, timeout=(15*60)).exitstatus == 0
 
     def umount(self):
+        if not self.is_mounted():
+            return
+
         try:
             log.info('Running fusermount -u on {name}...'.format(name=self.client_remote.name))
             self.client_remote.run(
index e749c06119c08e1fbbc3443f64b2a664b4d0464a..d027bcfcc4ca1aa35e396d975a77892277247bcf 100644 (file)
@@ -70,6 +70,9 @@ class KernelMount(CephFSMount):
         self.mounted = True
 
     def umount(self, force=False):
+        if not self.is_mounted():
+            return
+
         log.debug('Unmounting client client.{id}...'.format(id=self.client_id))
 
         cmd=['sudo', 'umount', self.mountpoint]
index 315ab84460e629890dd61a438a6b4ec4dad516f1..bf9809d878088217114014e1340781c9bd51640d 100644 (file)
@@ -482,10 +482,6 @@ class LocalFuseMount(FuseMount):
         log.info("I think my launching pid was {0}".format(self.fuse_daemon.subproc.pid))
         return path
 
-    def umount(self):
-        if self.is_mounted():
-            super(LocalFuseMount, self).umount()
-
     def mount(self, mount_path=None, mount_fs_name=None, mountpoint=None):
         if mountpoint is not None:
             self.mountpoint = mountpoint