When rerunning ceph-volume lvm create on a device already prepared and
activated, ceph-volume should skip the creation.
This is a regression introduced by
bb4de1a3fc238eaf9f717dc59c6bdf338ef6d657
Fixes: https://tracker.ceph.com/issues/43981
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
"""
if args is not None:
self.args = args
+ if api.is_ceph_device(self.get_lv(self.args.data)):
+ logger.info("device {} is already used".format(self.args.data))
+ raise RuntimeError("skipping {}, it is already prepared".format(self.args.data))
try:
self.prepare()
except Exception: