]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm skip empty vg_name removals
authorAlfredo Deza <adeza@redhat.com>
Wed, 28 Nov 2018 13:18:03 +0000 (08:18 -0500)
committerAlfredo Deza <adeza@redhat.com>
Fri, 30 Nov 2018 19:06:35 +0000 (14:06 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 14c74ede9a83975a3464c219cab0be3c06238ff9)

src/ceph-volume/ceph_volume/api/lvm.py

index aed4a8f6417c4fc31337f3868efd190cf9104041..bcb54d65bf472b4e679bd9db02e13708a00ab6a0 100644 (file)
@@ -466,6 +466,9 @@ def remove_vg(vg_name):
     """
     Removes a volume group.
     """
+    if not vg_name:
+        logger.warning('Skipping removal of invalid VG name: "%s"', vg_name)
+        return
     fail_msg = "Unable to remove vg %s" % vg_name
     process.run(
         [