mirror of https://github.com/ceph/ceph-ansible.git
ceph_volume: fix regression
do not skip zapping if osd_fsid is passed Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/5531/head
parent
40307f810c
commit
f402ab2b87
|
@ -636,18 +636,22 @@ def run_module():
|
||||||
# Zap the OSD
|
# Zap the OSD
|
||||||
skip = []
|
skip = []
|
||||||
for device_type in ['journal','data', 'db', 'wal']:
|
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):
|
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)
|
ret = is_lv(module, module.params['{}_vg'.format(device_type)], module.params[device_type], container_image)
|
||||||
skip.append(ret)
|
skip.append(ret)
|
||||||
|
# 3/ This isn't a lv/vg device
|
||||||
if not ret:
|
if not ret:
|
||||||
module.params['{}_vg'.format(device_type)] = False
|
module.params['{}_vg'.format(device_type)] = False
|
||||||
module.params[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):
|
elif not module.params.get('{}_vg'.format(device_type), None) and module.params.get(device_type, None):
|
||||||
skip.append(True)
|
skip.append(True)
|
||||||
|
|
||||||
cmd = zap_devices(module, container_image)
|
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(
|
rc, cmd, out, err = exec_command(
|
||||||
module, cmd)
|
module, cmd)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue