]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: pass *-slots arguments to LV creation 34277/head
authorJan Fajerski <jfajerski@suse.com>
Mon, 2 Mar 2020 14:16:39 +0000 (15:16 +0100)
committerJan Fajerski <jfajerski@suse.com>
Mon, 30 Mar 2020 07:08:06 +0000 (09:08 +0200)
Fixes: https://tracker.ceph.com/issues/44494
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 61f0c3af0b0f36a03748733b16de1b11048342e6)

src/ceph-volume/ceph_volume/devices/lvm/common.py
src/ceph-volume/ceph_volume/devices/lvm/prepare.py

index 06fc33541a309ba72113813aa5fb3e5067026023..6cd8c59b8863f401633f9b586c98fbb366bbeb2c 100644 (file)
@@ -66,6 +66,7 @@ def common_parser(prog, description):
         '--data-slots',
         help=('Intended number of slots on data device. The new OSD gets one'
               'of those slots or 1/nth of the available capacity'),
+        type=int,
         default=1,
     )
 
@@ -110,6 +111,7 @@ def common_parser(prog, description):
         dest='block_db_slots',
         help=('Intended number of slots on db device. The new OSD gets one'
               'of those slots or 1/nth of the available capacity'),
+        type=int,
         default=1,
     )
 
@@ -131,6 +133,7 @@ def common_parser(prog, description):
         dest='block_wal_slots',
         help=('Intended number of slots on wal device. The new OSD gets one'
               'of those slots or 1/nth of the available capacity'),
+        type=int,
         default=1,
     )
 
index c602a705fb921a78d7ddf0494d0fcf029b324523..4440109417438164c8f6581ce6c712f9e09c0aa7 100644 (file)
@@ -178,6 +178,9 @@ class Prepare(object):
             kwargs = {
                 'device': device_name,
                 'tags': tags,
+                'slots': getattr(self.args,
+                                 'block_{}_slots'.format(device_type),
+                                 1),
             }
             if size != 0:
                 kwargs['size'] = disk.Size.parse(size)
@@ -213,6 +216,7 @@ class Prepare(object):
             lv_name_prefix = "osd-{}".format(device_type)
             kwargs = {'device': device,
                       'tags': {'ceph.type': device_type},
+                      'slots': self.args.data_slots,
                      }
             logger.debug('data device size: {}'.format(self.args.data_size))
             if self.args.data_size != 0: