Skip to content

Commit 8d47795

Browse files
committed
ceph-volume: remove duplicate code
This check is already performed in `arg_validators.py`. By the way, this check is only valid when the user passes a VG/LV with the `<vg>/<lv>` format. Signed-off-by: Guillaume Abrioux <[email protected]>
1 parent 1107f5b commit 8d47795

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/ceph-volume/ceph_volume/objectstore/lvmbluestore.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,6 @@ def safe_prepare(self,
114114
if args is not None:
115115
self.args = args
116116

117-
try:
118-
vgname, lvname = self.args.data.split('/')
119-
lv = api.get_single_lv(filters={'lv_name': lvname,
120-
'vg_name': vgname})
121-
except ValueError:
122-
lv = None
123-
124-
if lv is not None:
125-
if api.is_ceph_device(lv):
126-
logger.info("device {} is already used".format(self.args.data))
127-
raise RuntimeError("skipping {}, it is already prepared".format(
128-
self.args.data))
129117
try:
130118
self.prepare()
131119
except Exception:

0 commit comments

Comments
 (0)