diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index c5bc7275..6490e1ba 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -79,6 +79,11 @@ # all times. This option affects only -server processes. # Defaults to $facts['os_service_default']. # +# [*db_preallocation*] +# (optional) Preallocate disk space with SQLite database to decrease +# fragmentation. +# Defaults to $facts['os_service_default']. +# # [*servers_per_port*] # (optional) Spawn multiple servers per device on different ports. # Make object-server run this many worker processes per unique port of @@ -296,6 +301,7 @@ $disable_fallocate = $facts['os_service_default'], $fallocate_reserve = $facts['os_service_default'], $server_fallocate_reserve = $facts['os_service_default'], + $db_preallocation = $facts['os_service_default'], $servers_per_port = $facts['os_service_default'], $user = undef, $workers = $facts['os_workers'], @@ -480,6 +486,7 @@ case $type { 'account': { $type_opts = { + 'DEFAULT/db_preallocation' => {'value' => $db_preallocation}, # account-server # account-auditor # account-replicator @@ -511,6 +518,7 @@ } 'container': { $type_opts = { + 'DEFAULT/db_preallocation' => {'value' => $db_preallocation}, 'DEFAULT/allowed_sync_hosts' => {'value' => join($::swift::storage::container::allowed_sync_hosts, ',')}, # container-server # container-auditor diff --git a/releasenotes/notes/db_preallocation-4226028636c46c4d.yaml b/releasenotes/notes/db_preallocation-4226028636c46c4d.yaml new file mode 100644 index 00000000..8fa50f0f --- /dev/null +++ b/releasenotes/notes/db_preallocation-4226028636c46c4d.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``swift::storage::server::db_preallocation`` parameter has been + added. diff --git a/spec/defines/swift_storage_server_spec.rb b/spec/defines/swift_storage_server_spec.rb index a63ba386..9a625f6c 100644 --- a/spec/defines/swift_storage_server_spec.rb +++ b/spec/defines/swift_storage_server_spec.rb @@ -98,6 +98,7 @@ class { 'swift::storage': storage_local_net_ip => '10.0.0.1' } is_expected.to contain_swift_account_config('DEFAULT/log_statsd_sample_rate_factor').with_value('') is_expected.to contain_swift_account_config('DEFAULT/log_statsd_metric_prefix').with_value('') + is_expected.to contain_swift_account_config('DEFAULT/db_preallocation').with_value('') is_expected.to contain_swift_account_config('account-auditor/').with_ensure('present') is_expected.to contain_swift_account_config('account-auditor/log_name').with_ensure('absent') is_expected.to contain_swift_account_config('account-replicator/').with_ensure('present') @@ -287,6 +288,7 @@ class { 'swift::storage': storage_local_net_ip => '10.0.0.1' } is_expected.to contain_swift_container_config('DEFAULT/log_statsd_sample_rate_factor').with_value('') is_expected.to contain_swift_container_config('DEFAULT/log_statsd_metric_prefix').with_value('') + is_expected.to contain_swift_container_config('DEFAULT/db_preallocation').with_value('') is_expected.to contain_swift_container_config('DEFAULT/allowed_sync_hosts').with_value('127.0.0.1') is_expected.to contain_swift_container_config('container-auditor/').with_ensure('present') is_expected.to contain_swift_container_config('container-auditor/log_name').with_ensure('absent')