]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: adds a util.system.unmount function
authorAndrew Schoen <aschoen@redhat.com>
Thu, 1 Feb 2018 20:29:30 +0000 (14:29 -0600)
committerAlfredo Deza <adeza@redhat.com>
Wed, 14 Feb 2018 12:23:02 +0000 (07:23 -0500)
This function will unmount the given path

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 6909baef542f3cd9b7d97113a6152280e72013f6)

src/ceph-volume/ceph_volume/util/system.py

index 952fa56fe58628274ff7b4ed537495654be6882e..4778e0d4f0e83094e3b8d6d086fb5c91d69fad6c 100644 (file)
@@ -119,6 +119,17 @@ class tmp_mount(object):
             encryption.dmcrypt_close(self.device)
 
 
+def unmount(path):
+    """
+    Removes mounts at the given path
+    """
+    process.run([
+        'umount',
+        '-v',
+        path,
+    ])
+
+
 def path_is_mounted(path, destination=None):
     """
     Check if the given path is mounted