object-expirer: Support more tunables
Change-Id: Ib348ab61117e4730fd2eb7d0dbb02a379de5afdd
This commit is contained in:
@@ -40,6 +40,15 @@
|
||||
# reclaimed.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*request_tries*]
|
||||
# (optional) Server errors from requests will be retried by default
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*tasks_per_second*]
|
||||
# (optional) Deletes can be ratelimited to prevent the expirer from
|
||||
# overwhelming the cluster
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*recon_cache_path*]
|
||||
# (optional) Directory where stats for a few items will be stored.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
@@ -130,6 +139,8 @@ class swift::objectexpirer(
|
||||
$process = $facts['os_service_default'],
|
||||
$processes = $facts['os_service_default'],
|
||||
$reclaim_age = $facts['os_service_default'],
|
||||
$request_tries = $facts['os_service_default'],
|
||||
$tasks_per_second = $facts['os_service_default'],
|
||||
$recon_cache_path = $facts['os_service_default'],
|
||||
$report_interval = $facts['os_service_default'],
|
||||
Swift::ServiceProvider $service_provider = $::swift::params::service_provider,
|
||||
@@ -223,6 +234,8 @@ class swift::objectexpirer(
|
||||
'object-expirer/process': value => $process;
|
||||
'object-expirer/processes': value => $processes;
|
||||
'object-expirer/reclaim_age': value => $reclaim_age;
|
||||
'object-expirer/request_tries': value => $request_tries;
|
||||
'object-expirer/tasks_per_second': value => $tasks_per_second;
|
||||
'object-expirer/recon_cache_path': value => $recon_cache_path;
|
||||
'object-expirer/report_interval': value => $report_interval;
|
||||
'object-expirer/log_name': value => $log_name;
|
||||
|
@@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``swift::objectexpirer`` class now supports the following parameters.
|
||||
|
||||
- ``request_tries``
|
||||
- ``tasks_per_second``
|
@@ -34,6 +34,10 @@ describe 'swift::objectexpirer' do
|
||||
'object-expirer/processes').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/reclaim_age').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/request_tries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/tasks_per_second').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/recon_cache_path').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
@@ -73,18 +77,24 @@ describe 'swift::objectexpirer' do
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:interval => '600',
|
||||
:reclaim_age => '10000',
|
||||
:concurrency => '3',
|
||||
:concurrency => 4,
|
||||
:interval => 600,
|
||||
:reclaim_age => 86400,
|
||||
:request_tries => 3,
|
||||
:tasks_per_second => 50,
|
||||
)
|
||||
end
|
||||
it 'configures object-expirer.conf' do
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/concurrency').with_value('3')
|
||||
'object-expirer/concurrency').with_value(4)
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/interval').with_value('600')
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/reclaim_age').with_value('10000')
|
||||
'object-expirer/reclaim_age').with_value(86400)
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/request_tries').with_value(3)
|
||||
is_expected.to contain_swift_object_expirer_config(
|
||||
'object-expirer/tasks_per_second').with_value(50)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user