]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: print a message to terminal if --destroy is skipped
authorAndrew Schoen <aschoen@redhat.com>
Thu, 18 Jan 2018 20:41:53 +0000 (14:41 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 1 Feb 2018 20:01:43 +0000 (14:01 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit d2529ee5dd9a4dc6a81eeb2d5e54c0bdd6beeb2f)

src/ceph-volume/ceph_volume/devices/lvm/zap.py

index f7ec1116934d1170ea4e9f0a192a3fd4256ff4d6..22637d0832f4a2472644fa09fb3f6017e2cd52ab 100644 (file)
@@ -72,6 +72,9 @@ class Zap(object):
                 logger.info("Destroying physical volume %s because --destroy was given", device)
                 terminal.write("Destroying physical volume %s because --destroy was given" % device)
                 api.remove_pv(device)
+            else:
+                logger.info("Skipping --destroy because no associated physical volumes are found for %s", device)
+                terminal.write("Skipping --destroy because no associated physical volumes are found for %s" % device)
 
         wipefs(path)
         zap_data(path)