Add configurable log for storage server
This patch add configurable log for swift account/container/object server service. Partially implements blueprint puppet-swift-log-support. Change-Id: Ib3db483dfbad97f23ab7ba2068632856b5e00f11
This commit is contained in:
parent
c8936fea9b
commit
6a0e505ee9
@ -18,6 +18,8 @@ define swift::storage::server(
|
||||
$updater_concurrency = $::processorcount,
|
||||
$reaper_concurrency = $::processorcount,
|
||||
$log_facility = "LOG_LOCAL2",
|
||||
$log_level = "INFO",
|
||||
$log_address = "/dev/log",
|
||||
# this parameters needs to be specified after type and name
|
||||
$config_file_path = "${type}-server/${name}.conf"
|
||||
) {
|
||||
|
@ -145,7 +145,13 @@ describe 'swift::storage::server' do
|
||||
.with_content(/^user\s*=\s*swift\s*$/)
|
||||
}
|
||||
it { should contain_file(fragment_file) \
|
||||
.with_content(/^log_facility\s*=\s*LOG_LOCAL2\s*$/)
|
||||
.with_content(/^set log_facility\s*=\s*LOG_LOCAL2\s*$/)
|
||||
}
|
||||
it { should contain_file(fragment_file) \
|
||||
.with_content(/^set log_level\s*=\s*INFO\s*$/)
|
||||
}
|
||||
it { should contain_file(fragment_file) \
|
||||
.with_content(/^set log_address\s*=\s*\/dev\/log\s*$/)
|
||||
}
|
||||
it { should contain_file(fragment_file) \
|
||||
.with_content(/^workers\s*=\s*1\s*$/)
|
||||
|
@ -12,6 +12,12 @@ pipeline = <%= @pipeline.to_a.join(' ') %>
|
||||
|
||||
[app:account-server]
|
||||
use = egg:swift#account
|
||||
set log_name = account-server
|
||||
set log_facility = <%= log_facility %>
|
||||
set log_level = <%= log_level %>
|
||||
set log_requests = True
|
||||
set log_address = <%= log_address %>
|
||||
|
||||
|
||||
[account-replicator]
|
||||
concurrency = <%= @replicator_concurrency %>
|
||||
|
@ -13,6 +13,11 @@ pipeline = <%= @pipeline.to_a.join(' ') %>
|
||||
|
||||
[app:container-server]
|
||||
use = egg:swift#container
|
||||
set log_name = container-server
|
||||
set log_facility = <%= log_facility %>
|
||||
set log_level = <%= log_level %>
|
||||
set log_requests = True
|
||||
set log_address = <%= log_address %>
|
||||
|
||||
[container-replicator]
|
||||
concurrency = <%= @replicator_concurrency %>
|
||||
|
@ -12,6 +12,11 @@ pipeline = <%= @pipeline.to_a.join(' ') %>
|
||||
|
||||
[app:object-server]
|
||||
use = egg:swift#object
|
||||
set log_name = object-server
|
||||
set log_facility = <%= log_facility %>
|
||||
set log_level = <%= log_level %>
|
||||
set log_requests = True
|
||||
set log_address = <%= log_address %>
|
||||
|
||||
[object-replicator]
|
||||
concurrency = <%= @replicator_concurrency %>
|
||||
|
Loading…
Reference in New Issue
Block a user