Merge "Allow users to change container-replicator interval value."

This commit is contained in:
Zuul 2020-01-20 16:03:46 +00:00 committed by Gerrit Code Review
commit 12b62e289c
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.
@ -176,6 +180,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 %>