diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 1239a752..37e10834 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -112,10 +112,18 @@ # (optional) Number of updater workers to spawn. # Defaults to 1. # +# [*updater_interval*] +# (optional) Minimum time for a pass to take, in seconds. +# Default to $facts['os_service_default']. +# # [*reaper_concurrency*] # (optional) Number of reaper workers to spawn. # Defaults to 1. # +# [*reaper_interval*] +# (optional) Minimum time for a pass to take, in seconds. +# Default to $facts['os_service_default']. +# # [*log_facility*] # (optional) Syslog log facility. # Defaults to 'LOG_LOCAL2'. @@ -256,7 +264,9 @@ define swift::storage::server( $replicator_concurrency = 1, $replicator_interval = $facts['os_service_default'], $updater_concurrency = 1, + $updater_interval = $facts['os_service_default'], $reaper_concurrency = 1, + $reaper_interval = $facts['os_service_default'], $log_facility = 'LOG_LOCAL2', $log_level = 'INFO', $log_address = '/dev/log', @@ -433,6 +443,7 @@ define swift::storage::server( # account-reaper 'account-reaper/' => {'ensure' => present}, 'account-reaper/concurrency' => {'value' => $reaper_concurrency}, + 'account-reaper/interval' => {'value' => $reaper_interval}, } } 'container': { @@ -446,6 +457,7 @@ define swift::storage::server( # container-updater 'container-updater/' => {'ensure' => present}, 'container-updater/concurrency' => {'value' => $updater_concurrency}, + 'container-updater/interval' => {'value' => $updater_interval}, # container-sync 'container-sync/' => {'ensure' => present}, # container-sharder @@ -473,6 +485,7 @@ define swift::storage::server( # object-updater 'object-updater/' => {'ensure' => present}, 'object-updater/concurrency' => {'value' => $updater_concurrency}, + 'object-updater/interval' => {'value' => $updater_interval}, # object-reconstructor 'object-reconstructor/' => {'ensure' => present}, } diff --git a/releasenotes/notes/updater-reaper-interval-23f30950cf7cdd19.yaml b/releasenotes/notes/updater-reaper-interval-23f30950cf7cdd19.yaml new file mode 100644 index 00000000..a55d31fe --- /dev/null +++ b/releasenotes/notes/updater-reaper-interval-23f30950cf7cdd19.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + The ``swift::storage::servce`` defined resource type now supports + the following parameters. + + - ``updater_interval`` used by container-updater and object-updater + - ``reaper_interval`` used by account-reaper diff --git a/spec/defines/swift_storage_server_spec.rb b/spec/defines/swift_storage_server_spec.rb index 10bd34fb..74b95d35 100644 --- a/spec/defines/swift_storage_server_spec.rb +++ b/spec/defines/swift_storage_server_spec.rb @@ -94,6 +94,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_account_config('account-replicator/interval').with_value('') is_expected.to contain_swift_account_config('account-reaper/').with_ensure('present') is_expected.to contain_swift_account_config('account-reaper/concurrency').with_value(1) + is_expected.to contain_swift_account_config('account-reaper/interval').with_value('') } context 'with customized pipeline' do @@ -245,6 +246,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_container_config('container-replicator/interval').with_value('') is_expected.to contain_swift_container_config('container-updater/').with_ensure('present') is_expected.to contain_swift_container_config('container-updater/concurrency').with_value(1) + is_expected.to contain_swift_container_config('container-updater/interval').with_value('') is_expected.to contain_swift_container_config('container-sharder/').with_ensure('present') is_expected.to contain_swift_container_config('container-sharder/auto_shard').with_value('') is_expected.to contain_swift_container_config('container-sharder/concurrency').with_value('') @@ -408,6 +410,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_object_config('object-replicator/rsync_bwlimit').with_value('') is_expected.to contain_swift_object_config('object-updater/').with_ensure('present') is_expected.to contain_swift_object_config('object-updater/concurrency').with_value(1) + is_expected.to contain_swift_object_config('object-updater/interval').with_value('') is_expected.to contain_swift_object_config('object-reconstructor/').with_ensure('present') }