use a non-legacy bluestore option on Luminous+
the 'experimental' option is no longer needed as of Luminous release https://github.com/ceph/ceph/blob/luminous/src/common/legacy_config_opts.h#L79 Change-Id: I9bbc0cc74833259b6ac1b0f951dceadebe0a267b
This commit is contained in:
parent
62925ccad7
commit
f962fadc21
@ -201,6 +201,7 @@ def get_ceph_context():
|
||||
'dio': str(config('use-direct-io')).lower(),
|
||||
'short_object_len': use_short_objects(),
|
||||
'bluestore': config('bluestore'),
|
||||
'bluestore_experimental': cmp_pkgrevno('ceph', '12.1.0') < 0,
|
||||
}
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
|
@ -1395,7 +1395,7 @@ def osdize_dev(dev, osd_format, osd_journal, reformat_osd=False,
|
||||
if encrypt:
|
||||
cmd.append('--dmcrypt')
|
||||
if cmp_pkgrevno('ceph', '0.48.3') >= 0:
|
||||
if osd_format:
|
||||
if osd_format and not bluestore:
|
||||
cmd.append('--fs-type')
|
||||
cmd.append(osd_format)
|
||||
|
||||
|
@ -37,7 +37,7 @@ cluster addr = {{ cluster_addr }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if bluestore -%}
|
||||
{% if bluestore_experimental and bluestore -%}
|
||||
enable experimental unrecoverable data corrupting features = bluestore rocksdb
|
||||
{%- endif %}
|
||||
|
||||
@ -68,9 +68,16 @@ keyring = /var/lib/ceph/mds/$cluster-$id/keyring
|
||||
|
||||
[osd]
|
||||
keyring = /var/lib/ceph/osd/$cluster-$id/keyring
|
||||
{% if bluestore -%}
|
||||
{% if not bluestore_experimental -%}
|
||||
osd objectstore = bluestore
|
||||
{%- endif -%}
|
||||
{%- else %}
|
||||
osd journal size = {{ osd_journal_size }}
|
||||
filestore xattr use omap = true
|
||||
journal dio = {{ dio }}
|
||||
{%- endif %}
|
||||
|
||||
{%- if short_object_len %}
|
||||
osd max object name len = 256
|
||||
osd max object namespace len = 64
|
||||
|
@ -62,7 +62,39 @@ class CephHooksTestCase(unittest.TestCase):
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': False}
|
||||
'bluestore': False,
|
||||
'bluestore_experimental': False}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
@patch.object(ceph_hooks, 'get_public_addr', lambda *args: "10.0.0.1")
|
||||
@patch.object(ceph_hooks, 'get_cluster_addr', lambda *args: "10.1.0.1")
|
||||
@patch.object(ceph_hooks, 'cmp_pkgrevno',
|
||||
lambda pkg, ver: -1 if ver == '12.1.0' else 1)
|
||||
@patch.object(ceph_hooks, 'get_mon_hosts', lambda *args: ['10.0.0.1',
|
||||
'10.0.0.2'])
|
||||
@patch.object(ceph_hooks, 'get_networks', lambda *args: "")
|
||||
@patch.object(ceph, 'config')
|
||||
@patch.object(ceph_hooks, 'config')
|
||||
def test_get_ceph_context_filestore_old(self, mock_config, mock_config2):
|
||||
config = copy.deepcopy(CHARM_CONFIG)
|
||||
mock_config.side_effect = lambda key: config[key]
|
||||
mock_config2.side_effect = lambda key: config[key]
|
||||
ctxt = ceph_hooks.get_ceph_context()
|
||||
expected = {'auth_supported': False,
|
||||
'ceph_cluster_network': '',
|
||||
'ceph_public_network': '',
|
||||
'cluster_addr': '10.1.0.1',
|
||||
'dio': 'true',
|
||||
'fsid': '1234',
|
||||
'loglevel': 1,
|
||||
'mon_hosts': '10.0.0.1 10.0.0.2',
|
||||
'old_auth': False,
|
||||
'osd_journal_size': 1024,
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': False,
|
||||
'bluestore_experimental': True}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
@patch.object(ceph_hooks, 'get_public_addr', lambda *args: "10.0.0.1")
|
||||
@ -92,7 +124,40 @@ class CephHooksTestCase(unittest.TestCase):
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': True}
|
||||
'bluestore': True,
|
||||
'bluestore_experimental': False}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
@patch.object(ceph_hooks, 'get_public_addr', lambda *args: "10.0.0.1")
|
||||
@patch.object(ceph_hooks, 'get_cluster_addr', lambda *args: "10.1.0.1")
|
||||
@patch.object(ceph_hooks, 'cmp_pkgrevno',
|
||||
lambda pkg, ver: -1 if ver == '12.1.0' else 1)
|
||||
@patch.object(ceph_hooks, 'get_mon_hosts', lambda *args: ['10.0.0.1',
|
||||
'10.0.0.2'])
|
||||
@patch.object(ceph_hooks, 'get_networks', lambda *args: "")
|
||||
@patch.object(ceph, 'config')
|
||||
@patch.object(ceph_hooks, 'config')
|
||||
def test_get_ceph_context_bluestore_old(self, mock_config, mock_config2):
|
||||
config = copy.deepcopy(CHARM_CONFIG)
|
||||
config['bluestore'] = True
|
||||
mock_config.side_effect = lambda key: config[key]
|
||||
mock_config2.side_effect = lambda key: config[key]
|
||||
ctxt = ceph_hooks.get_ceph_context()
|
||||
expected = {'auth_supported': False,
|
||||
'ceph_cluster_network': '',
|
||||
'ceph_public_network': '',
|
||||
'cluster_addr': '10.1.0.1',
|
||||
'dio': 'true',
|
||||
'fsid': '1234',
|
||||
'loglevel': 1,
|
||||
'mon_hosts': '10.0.0.1 10.0.0.2',
|
||||
'old_auth': False,
|
||||
'osd_journal_size': 1024,
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': True,
|
||||
'bluestore_experimental': True}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
@patch.object(ceph_hooks, 'get_public_addr', lambda *args: "10.0.0.1")
|
||||
@ -123,7 +188,8 @@ class CephHooksTestCase(unittest.TestCase):
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': False}
|
||||
'bluestore': False,
|
||||
'bluestore_experimental': False}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
@patch.object(ceph_hooks, 'get_public_addr', lambda *args: "10.0.0.1")
|
||||
@ -156,7 +222,8 @@ class CephHooksTestCase(unittest.TestCase):
|
||||
'public_addr': '10.0.0.1',
|
||||
'short_object_len': True,
|
||||
'use_syslog': 'true',
|
||||
'bluestore': False}
|
||||
'bluestore': False,
|
||||
'bluestore_experimental': False}
|
||||
self.assertEqual(ctxt, expected)
|
||||
|
||||
def test_nrpe_dependency_installed(self):
|
||||
|
Loading…
Reference in New Issue
Block a user