Merge "Add Ceph tuning parameters and ability to override them"
This commit is contained in:
commit
12fbb09d0b
@ -23,6 +23,7 @@ $primary_mon = $ceph_primary_monitor_node[$primary_mons[0]]['name'
|
||||
prepare_network_config($network_scheme)
|
||||
$ceph_cluster_network = get_network_role_property('ceph/replication', 'network')
|
||||
$ceph_public_network = get_network_role_property('ceph/public', 'network')
|
||||
$ceph_tuning_settings = hiera('ceph_tuning_settings', {})
|
||||
|
||||
class {'ceph':
|
||||
primary_mon => $primary_mon,
|
||||
@ -46,6 +47,28 @@ class {'ceph':
|
||||
ephemeral_ceph => $storage_hash['ephemeral_ceph'],
|
||||
}
|
||||
|
||||
if $ceph_tuning_settings != {} {
|
||||
ceph_conf {
|
||||
'global/debug_default' : value => $debug;
|
||||
'global/max_open_files' : value => $ceph_tuning_settings['max_open_files'];
|
||||
'osd/osd_mkfs_type' : value => $ceph_tuning_settings['osd_mkfs_type'];
|
||||
'osd/osd_mount_options_xfs' : value => $ceph_tuning_settings['osd_mount_options_xfs'];
|
||||
'osd/osd_op_threads' : value => $ceph_tuning_settings['osd_op_threads'];
|
||||
'osd/filestore_queue_max_ops' : value => $ceph_tuning_settings['filestore_queue_max_ops'];
|
||||
'osd/filestore_queue_committing_max_ops' : value => $ceph_tuning_settings['filestore_queue_committing_max_ops'];
|
||||
'osd/journal_max_write_entries' : value => $ceph_tuning_settings['journal_max_write_entries'];
|
||||
'osd/journal_queue_max_ops' : value => $ceph_tuning_settings['journal_queue_max_ops'];
|
||||
'osd/objecter_inflight_ops' : value => $ceph_tuning_settings['objecter_inflight_ops'];
|
||||
'osd/filestore_queue_max_bytes' : value => $ceph_tuning_settings['filestore_queue_max_bytes'];
|
||||
'osd/filestore_queue_committing_max_bytes': value => $ceph_tuning_settings['filestore_queue_committing_max_bytes'];
|
||||
'osd/journal_max_write_bytes' : value => $ceph_tuning_settings['journal_queue_max_bytes'];
|
||||
'osd/journal_queue_max_bytes' : value => $ceph_tuning_settings['journal_queue_max_bytes'];
|
||||
'osd/ms_dispatch_throttle_bytes' : value => $ceph_tuning_settings['ms_dispatch_throttle_bytes'];
|
||||
'osd/objecter_infilght_op_bytes' : value => $ceph_tuning_settings['objecter_infilght_op_bytes'];
|
||||
'osd/filestore_max_sync_interval' : value => $ceph_tuning_settings['filestore_max_sync_interval'];
|
||||
}
|
||||
}
|
||||
|
||||
$osd_devices = split($::osd_devices_list, ' ')
|
||||
#Class Ceph is already defined so it will do it's thing.
|
||||
notify {"ceph_osd: ${osd_devices}": }
|
||||
|
@ -111,6 +111,32 @@ $apache_ports = hiera_array('apache_ports', unique([
|
||||
|
||||
$token_provider = hiera('token_provider','keystone.token.providers.fernet.Provider')
|
||||
|
||||
if ($storage_hash['volumes_ceph'] or $storage_hash['images_ceph'] or $storage_hash['objects_ceph']) {
|
||||
# Ceph is enabled
|
||||
# Define Ceph tuning settings
|
||||
$storage_tuning_settings = hiera($storage_hash['tuning_settings'], {})
|
||||
$ceph_tuning_settings = {
|
||||
'max_open_files' => pick($storage_tuning_settings['max_open_files'], '131072'),
|
||||
'osd_mkfs_type' => pick($storage_tuning_settings['osd_mkfs_type'], 'xfs'),
|
||||
'osd_mount_options_xfs' => pick($storage_tuning_settings['osd_mount_options_xfs'], 'rw,relatime,inode64,logbsize=256k,delaylog,allocsize=4M'),
|
||||
'osd_op_threads' => pick($storage_tuning_settings['osd_op_threads'], '20'),
|
||||
'filestore_queue_max_ops' => pick($storage_tuning_settings['filestore_queue_max_ops'], '500'),
|
||||
'filestore_queue_committing_max_ops' => pick($storage_tuning_settings['filestore_queue_committing_max_ops'], '5000'),
|
||||
'journal_max_write_entries' => pick($storage_tuning_settings['journal_max_write_entries'], '1000'),
|
||||
'journal_queue_max_ops' => pick($storage_tuning_settings['journal_queue_max_ops'], '3000'),
|
||||
'objecter_inflight_ops' => pick($storage_tuning_settings['objecter_inflight_ops'], '10240'),
|
||||
'filestore_queue_max_bytes' => pick($storage_tuning_settings['filestore_queue_max_bytes'], '1048576000'),
|
||||
'filestore_queue_committing_max_bytes' => pick($storage_tuning_settings['filestore_queue_committing_max_bytes'], 1048576000),
|
||||
'journal_max_write_bytes' => pick($storage_tuning_settings['journal_max_write_bytes'], 1048576000),
|
||||
'journal_queue_max_bytes' => pick($storage_tuning_settings['journal_queue_max_bytes'], '1048576000'),
|
||||
'ms_dispatch_throttle_bytes' => pick($storage_tuning_settings['ms_dispatch_throttle_bytes'], '1048576000'),
|
||||
'objecter_infilght_op_bytes' => pick($storage_tuning_settings['objecter_infilght_op_bytes'], '1048576000'),
|
||||
'filestore_max_sync_interval' => pick($storage_tuning_settings['filestore_max_sync_interval'], '10'),
|
||||
}
|
||||
} else {
|
||||
$ceph_tuning_settings = {}
|
||||
}
|
||||
|
||||
if $debug {
|
||||
$default_log_levels = {
|
||||
'amqp' => 'WARN',
|
||||
|
@ -7,6 +7,7 @@
|
||||
<% globals.store "apache_ports", @apache_ports -%>
|
||||
<% globals.store "base_mac", @base_mac -%>
|
||||
<% globals.store "base_syslog_hash", @base_syslog_hash -%>
|
||||
<% globals.store "ceph_tuning_settings", @ceph_tuning_settings -%>
|
||||
<% globals.store "ceph_monitor_nodes", @ceph_monitor_nodes -%>
|
||||
<% globals.store "ceph_primary_monitor_node", @ceph_primary_monitor_node -%>
|
||||
<% globals.store "ceph_rgw_nodes", @ceph_rgw_nodes -%>
|
||||
|
@ -6,6 +6,12 @@ describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
storage_hash = Noop.hiera 'storage'
|
||||
ceph_monitor_nodes = Noop.hiera 'ceph_monitor_nodes'
|
||||
if storage_hash['debug']
|
||||
debug = storage_hash['debug']
|
||||
else
|
||||
debug = Noop.hiera 'debug', true
|
||||
end
|
||||
ceph_tuning_settings = Noop.hiera 'ceph_tuning_settings'
|
||||
|
||||
if (storage_hash['images_ceph'] or storage_hash['objects_ceph'] or storage_hash['objects_ceph'])
|
||||
it { should contain_class('ceph').with(
|
||||
@ -17,6 +23,27 @@ describe manifest do
|
||||
)
|
||||
}
|
||||
|
||||
if ceph_tuning_settings
|
||||
it 'should set Ceph tuning settings' do
|
||||
should contain_ceph_conf('global/debug_default').with(:value => debug)
|
||||
should contain_ceph_conf('global/max_open_files').with(:value => ceph_tuning_settings['max_open_files'])
|
||||
should contain_ceph_conf('osd/osd_mkfs_type').with(:value => ceph_tuning_settings['osd_mkfs_type'])
|
||||
should contain_ceph_conf('osd/osd_mount_options_xfs').with(:value => ceph_tuning_settings['osd_mount_options_xfs'])
|
||||
should contain_ceph_conf('osd/osd_op_threads').with(:value => ceph_tuning_settings['osd_op_threads'])
|
||||
should contain_ceph_conf('osd/filestore_queue_max_ops').with(:value => ceph_tuning_settings['filestore_queue_max_ops'])
|
||||
should contain_ceph_conf('osd/filestore_queue_committing_max_ops').with(:value => ceph_tuning_settings['filestore_queue_committing_max_ops'])
|
||||
should contain_ceph_conf('osd/journal_max_write_entries').with(:value => ceph_tuning_settings['journal_max_write_entries'])
|
||||
should contain_ceph_conf('osd/journal_queue_max_ops').with(:value => ceph_tuning_settings['journal_queue_max_ops'])
|
||||
should contain_ceph_conf('osd/objecter_inflight_ops').with(:value => ceph_tuning_settings['objecter_inflight_ops'])
|
||||
should contain_ceph_conf('osd/filestore_queue_max_bytes').with(:value => ceph_tuning_settings['filestore_queue_max_bytes'])
|
||||
should contain_ceph_conf('osd/filestore_queue_committing_max_bytes').with(:value => ceph_tuning_settings['filestore_queue_committing_max_bytes'])
|
||||
should contain_ceph_conf('osd/journal_max_write_bytes').with(:value => ceph_tuning_settings['journal_max_write_bytes'])
|
||||
should contain_ceph_conf('osd/journal_queue_max_bytes').with(:value => ceph_tuning_settings['journal_queue_max_bytes'])
|
||||
should contain_ceph_conf('osd/ms_dispatch_throttle_bytes').with(:value => ceph_tuning_settings['ms_dispatch_throttle_bytes'])
|
||||
should contain_ceph_conf('osd/objecter_infilght_op_bytes').with(:value => ceph_tuning_settings['objecter_infilght_op_bytes'])
|
||||
should contain_ceph_conf('osd/filestore_max_sync_interval').with(:value => ceph_tuning_settings['filestore_max_sync_interval'])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user