]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.strategies use get_journal_size helper for filestore
authorAlfredo Deza <adeza@redhat.com>
Thu, 9 Aug 2018 19:02:01 +0000 (15:02 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 10 Aug 2018 17:14:31 +0000 (13:14 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/strategies/filestore.py

index 6651b4e94ec21bd65d246bf73c771e35b004a660..56372c6efb6d344261b5ab0b8608b99b5f8e1a53 100644 (file)
@@ -1,6 +1,6 @@
 from __future__ import print_function
 import json
-from ceph_volume.util import disk
+from ceph_volume.util import disk, prepare
 from ceph_volume.api import lvm
 from . import validators
 from ceph_volume.devices.lvm.create import Create
@@ -67,9 +67,8 @@ class SingleType(object):
         osds = self.computed['osds']
         vgs = self.computed['vgs']
         for device in devices:
-            # XXX needs to read `osd journal size` from ceph.conf
             device_size = disk.Size(b=device['size'])
-            journal_size = disk.Size(gb=5)
+            journal_size = prepare.get_journal_size(lv_format=False)
             data_size = device_size - journal_size
             data_percentage = data_size * 100 / device_size
             vgs.append({'devices': [device['path']], 'parts': 2})
@@ -99,8 +98,9 @@ class SingleType(object):
 
         # create the lvs from the vgs captured in the beginning
         for vg in osd_vgs:
-            # XXX needs to read `osd journal size` from ceph.conf
-            journal_lv = lvm.create_lv('osd-journal', vg.name, size='5G')
+            # this is called again, getting us the LVM formatted string
+            journal_size = prepare.get_journal_size()
+            journal_lv = lvm.create_lv('osd-journal', vg.name, size=journal_size)
             # no extents or size means it will use 100%FREE
             data_lv = lvm.create_lv('osd-data', vg.name)