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:
@@ -76,6 +76,10 @@
|
|||||||
# (optional) Number of replicator workers to spawn.
|
# (optional) Number of replicator workers to spawn.
|
||||||
# Defaults to 1.
|
# Defaults to 1.
|
||||||
#
|
#
|
||||||
|
# [*replicator_interval*]
|
||||||
|
# (optional) Minimum time for a pass to take, in seconds.
|
||||||
|
# Defaults to 30.
|
||||||
|
#
|
||||||
# [*updater_concurrency*]
|
# [*updater_concurrency*]
|
||||||
# (optional) Number of updater workers to spawn.
|
# (optional) Number of updater workers to spawn.
|
||||||
# Defaults to 1.
|
# Defaults to 1.
|
||||||
@@ -164,6 +168,7 @@ define swift::storage::server(
|
|||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
$allow_versions = false,
|
$allow_versions = false,
|
||||||
$replicator_concurrency = 1,
|
$replicator_concurrency = 1,
|
||||||
|
$replicator_interval = 30,
|
||||||
$updater_concurrency = 1,
|
$updater_concurrency = 1,
|
||||||
$reaper_concurrency = 1,
|
$reaper_concurrency = 1,
|
||||||
$log_facility = 'LOG_LOCAL2',
|
$log_facility = 'LOG_LOCAL2',
|
||||||
|
@@ -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) }
|
it { is_expected.to contain_concat_fragment("swift-#{t}-#{title}").with_content(/\[#{t}-replicator\]\nconcurrency\s*=\s*42\s*$/m) }
|
||||||
end
|
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'
|
if t != 'account'
|
||||||
describe "when updater_concurrency is set" do
|
describe "when updater_concurrency is set" do
|
||||||
let :params do req_params.merge({:updater_concurrency => 73}) end
|
let :params do req_params.merge({:updater_concurrency => 73}) end
|
||||||
|
@@ -37,6 +37,7 @@ set log_address = <%= @log_address %>
|
|||||||
|
|
||||||
[account-replicator]
|
[account-replicator]
|
||||||
concurrency = <%= @replicator_concurrency %>
|
concurrency = <%= @replicator_concurrency %>
|
||||||
|
interval = <%= @replicator_interval %>
|
||||||
|
|
||||||
[account-auditor]
|
[account-auditor]
|
||||||
|
|
||||||
|
@@ -39,6 +39,7 @@ set log_address = <%= @log_address %>
|
|||||||
|
|
||||||
[container-replicator]
|
[container-replicator]
|
||||||
concurrency = <%= @replicator_concurrency %>
|
concurrency = <%= @replicator_concurrency %>
|
||||||
|
interval = <%= @replicator_interval %>
|
||||||
|
|
||||||
[container-updater]
|
[container-updater]
|
||||||
concurrency = <%= @updater_concurrency %>
|
concurrency = <%= @updater_concurrency %>
|
||||||
|
Reference in New Issue
Block a user