diff --git a/config.yaml b/config.yaml index 4e0f4a55..8e04fb10 100644 --- a/config.yaml +++ b/config.yaml @@ -120,13 +120,10 @@ options: Only supported with ceph >= 0.48.3. bluestore: type: boolean - default: false + default: True description: | - Use experimental bluestore storage format for OSD devices; only supported - in Ceph Jewel (10.2.0) or later. - . - Note that despite bluestore being the default for Ceph Luminous, if this - option is False, OSDs will still use filestore. + Enable bluestore storage format for OSD devices; Only applies for Ceph + Luminous or later. osd-encrypt: type: boolean default: False diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index 3b8cfcdd..414ce1b0 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -220,6 +220,16 @@ def use_vaultlocker(): return False +def use_bluestore(): + """Determine whether bluestore should be used for OSD's + + :returns: whether bluestore disk format should be used + :rtype: bool""" + if cmp_pkgrevno('ceph', '10.2.0') < 0: + return False + return config('bluestore') + + def install_apparmor_profile(): """ Install ceph apparmor profiles and configure @@ -336,7 +346,7 @@ def get_ceph_context(upgrading=False): 'dio': str(config('use-direct-io')).lower(), 'short_object_len': use_short_objects(), 'upgrade_in_progress': upgrading, - 'bluestore': config('bluestore'), + 'bluestore': use_bluestore(), 'bluestore_experimental': cmp_pkgrevno('ceph', '12.1.0') < 0, 'bluestore_block_wal_size': config('bluestore-block-wal-size'), 'bluestore_block_db_size': config('bluestore-block-db-size'), @@ -468,12 +478,13 @@ def prepare_disks_and_activate(): if ceph.is_bootstrapped(): log('ceph bootstrapped, rescanning disks') emit_cephconf() + bluestore = use_bluestore() for dev in get_devices(): ceph.osdize(dev, config('osd-format'), osd_journal, config('ignore-device-errors'), config('osd-encrypt'), - config('bluestore'), + bluestore, config('osd-encrypt-keymanager')) # Make it fast! if config('autotune'): diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index 26c9f53d..8c75e98f 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -398,8 +398,6 @@ class CephOsdBasicDeployment(OpenStackAmuletDeployment): }, 'osd': { 'keyring': '/var/lib/ceph/osd/$cluster-$id/keyring', - 'osd journal size': '1024', - 'filestore xattr use omap': 'true' }, }