Allow users to change container-replicator interval value.

The default interval value is 30s and in some case, this is way
too agressive and we need an automated way of tweaking this value.

Change-Id: I271c218b45d10f15544077e93ded9d74d7842f65
Closes-bug: #1850856
This commit is contained in:
David Hill 2019-10-31 16:50:18 -04:00
parent 57503cb95a
commit 7d46d12b41
4 changed files with 17 additions and 0 deletions

View File

@ -76,6 +76,10 @@
# (optional) Number of replicator workers to spawn.
# Defaults to 1.
#
# [*replicator_interval*]
# (optional) Minimum time for a pass to take, in seconds.
# Defaults to 30.
#
# [*updater_concurrency*]
# (optional) Number of updater workers to spawn.
# Defaults to 1.
@ -164,6 +168,7 @@ define swift::storage::server(
$workers = $::os_workers,
$allow_versions = false,
$replicator_concurrency = 1,
$replicator_interval = 30,
$updater_concurrency = 1,
$reaper_concurrency = 1,
$log_facility = 'LOG_LOCAL2',

View File

@ -92,6 +92,16 @@ describe 'swift::storage::server' do
it { is_expected.to contain_concat_fragment("swift-#{t}-#{title}").with_content(/\[#{t}-replicator\]\nconcurrency\s*=\s*42\s*$/m) }
end
if t != 'object'
describe "when replicator_concurrency and replicator_interval are set" do
let :params do req_params.merge(
{ :replicator_concurrency => 42,
:replicator_interval => 42})
end
it { is_expected.to contain_concat_fragment("swift-#{t}-#{title}").with_content(/\[#{t}-replicator\]\nconcurrency\s*=\s*42\ninterval\s*=\s*42\s*$/m) }
end
end
if t != 'account'
describe "when updater_concurrency is set" do
let :params do req_params.merge({:updater_concurrency => 73}) end

View File

@ -37,6 +37,7 @@ set log_address = <%= @log_address %>
[account-replicator]
concurrency = <%= @replicator_concurrency %>
interval = <%= @replicator_interval %>
[account-auditor]

View File

@ -39,6 +39,7 @@ set log_address = <%= @log_address %>
[container-replicator]
concurrency = <%= @replicator_concurrency %>
interval = <%= @replicator_interval %>
[container-updater]
concurrency = <%= @updater_concurrency %>