Merge pull request #24077 from alfredodeza/wip-rm35970

ceph-volume  fix zap not working with LVs

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
Andrew Schoen 2018-09-13 10:29:54 -05:00 committed by GitHub
commit 641ff5e7c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -100,8 +100,9 @@ class Zap(object):
for vg_name in vgs:
mlogger.info("Destroying volume group %s because --destroy was given", vg_name)
api.remove_vg(vg_name)
mlogger.info("Destroying physical volume %s because --destroy was given", device)
api.remove_pv(device)
if not lv:
mlogger.info("Destroying physical volume %s because --destroy was given", device)
api.remove_pv(device)
wipefs(path)
zap_data(path)

View File

@ -42,7 +42,7 @@
# osd.0 device
- name: zap test_group/data-lv1
command: "ceph-volume lvm zap test_group/data-lv1"
command: "ceph-volume lvm zap --destroy test_group/data-lv1"
environment:
CEPH_VOLUME_DEBUG: 1

View File

@ -47,6 +47,8 @@
CEPH_VOLUME_DEBUG: 1
# osd.0 data lv
# note: we don't use --destroy here to test this works without that flag.
# --destroy is used in the bluestore tests
- name: zap test_group/data-lv1
command: "ceph-volume lvm zap test_group/data-lv1"
environment: