]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: remove duplicate code
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 15 Jan 2025 12:33:45 +0000 (12:33 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 24 Feb 2025 11:54:37 +0000 (11:54 +0000)
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 <gabrioux@ibm.com>
(cherry picked from commit 8d477959d62c172ef34f67c7284e908454044540)

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

index fa3fb43261fcbcc7e815f83683fc0754b144c5e4..4a1557ec6a60fc6dd414cb45456421d77c455830 100644 (file)
@@ -114,18 +114,6 @@ class LvmBlueStore(BlueStore):
         if args is not None:
             self.args = args
 
-        try:
-            vgname, lvname = self.args.data.split('/')
-            lv = api.get_single_lv(filters={'lv_name': lvname,
-                                            'vg_name': vgname})
-        except ValueError:
-            lv = None
-
-        if lv is not None:
-            if api.is_ceph_device(lv):
-                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: