]> git.apps.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)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 13 Feb 2018 22:58:04 +0000 (16:58 -0600)
This function will unmount the given path

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/util/system.py

index f04f00e130917c722ff7a5d50456be665ab98f6d..2b4473efe62f1cc6ef93d964601410af0d4f3794 100644 (file)
@@ -121,6 +121,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