]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_volume: fix regression
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Jul 2020 23:04:10 +0000 (01:04 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 20 Jul 2020 19:24:06 +0000 (21:24 +0200)
do not skip zapping if osd_fsid is passed

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit f402ab2b87813f0f9c3fba661a52f5afebc19723)

library/ceph_volume.py

index a3eb630b23b2f3b1788c43e4b2064916e5edcbfc..1fcd6eafdb6e17c04fd447de87b3e944e56015f2 100644 (file)
@@ -625,18 +625,22 @@ def run_module():
         # Zap the OSD
         skip = []
         for device_type in ['journal','data', 'db', 'wal']:
+            # 1/ if we passed vg/lv
             if module.params.get('{}_vg'.format(device_type), None) and module.params.get(device_type, None):
+                # 2/ check this is an actual lv/vg
                 ret = is_lv(module, module.params['{}_vg'.format(device_type)], module.params[device_type], container_image)
                 skip.append(ret)
+                # 3/ This isn't a lv/vg device
                 if not ret:
                     module.params['{}_vg'.format(device_type)] = False
                     module.params[device_type] = False
+            # 4/ no journal|data|db|wal|_vg was passed, so it must be a raw device
             elif not module.params.get('{}_vg'.format(device_type), None) and module.params.get(device_type, None):
                 skip.append(True)
 
         cmd = zap_devices(module, container_image)
 
-        if any(skip):
+        if any(skip) or module.params.get('osd_fsid', None):
             rc, cmd, out, err = exec_command(
                 module, cmd)
         else: