From: Andrew Schoen Date: Thu, 19 Oct 2017 15:35:10 +0000 (-0500) Subject: ceph-volume: api.lvm.remove_lv should return True when successful X-Git-Tag: v12.2.2~73^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6dd47ab6d1ec6784ec3cef8f65139baeaf4fa3a;p=ceph.git ceph-volume: api.lvm.remove_lv should return True when successful Signed-off-by: Andrew Schoen (cherry picked from commit 7f055aa6deb3904cf0334e214c13a26098b08aa8) --- diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 8b824f5da58..9c384ce09ca 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -216,6 +216,9 @@ def create_vg(name, *devices): def remove_lv(path): """ Removes a logical volume given it's absolute path. + + Will return True if the lv is successfully removed or + raises a RuntimeError if the removal fails. """ stdout, stderr, returncode = process.call( [ @@ -230,6 +233,7 @@ def remove_lv(path): ) if returncode != 0: raise RuntimeError("Unable to remove %s".format(path)) + return True def create_lv(name, group, size=None, tags=None):