Allow customise log_facility in storage server configuration

Change-Id: I4c698b7657dde1d0f1ba6b4043ca9ce992dcdb56
This commit is contained in:
Mehdi Abaakouk 2013-02-25 14:41:45 +01:00
parent f849e5d572
commit b634c440ca
6 changed files with 14 additions and 6 deletions

@ -24,7 +24,8 @@ class swift::storage::all(
$object_pipeline = undef,
$container_pipeline = undef,
$mount_check = false,
$account_pipeline = undef
$account_pipeline = undef,
$log_facility = 'LOG_LOCAL2'
) {
class { 'swift::storage':
@ -41,17 +42,20 @@ class swift::storage::all(
type => 'account',
config_file_path => 'account-server.conf',
pipeline => $account_pipeline,
log_facility => $log_facility,
}
swift::storage::server { $container_port:
type => 'container',
config_file_path => 'container-server.conf',
pipeline => $container_pipeline,
log_facility => $log_facility,
}
swift::storage::server { $object_port:
type => 'object',
config_file_path => 'object-server.conf',
pipeline => $object_pipeline,
log_facility => $log_facility,
}
}

@ -17,6 +17,7 @@ define swift::storage::server(
$replicator_concurrency = $::processorcount,
$updater_concurrency = $::processorcount,
$reaper_concurrency = $::processorcount,
$log_facility = "LOG_LOCAL2",
# this parameters needs to be specified after type and name
$config_file_path = "${type}-server/${name}.conf"
) {

@ -23,7 +23,8 @@ describe 'swift::storage::all' do
:devices => '/srv/node',
:object_port => '6000',
:container_port => '6001',
:account_port => '6002'
:account_port => '6002',
:log_facility => 'LOG_LOCAL2'
}
end
@ -43,6 +44,7 @@ describe 'swift::storage::all' do
:object_pipeline => ["1", "2"],
:container_pipeline => ["3", "4"],
:account_pipeline => ["5", "6"],
:log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'],
}
].each do |param_set|
@ -79,7 +81,8 @@ describe 'swift::storage::all' do
let :storage_server_defaults do
{:devices => param_hash[:devices],
:storage_local_net_ip => param_hash[:storage_local_net_ip]
:storage_local_net_ip => param_hash[:storage_local_net_ip],
:log_facility => param_hash[:log_facility]
}
end

@ -4,7 +4,7 @@ bind_ip = <%= storage_local_net_ip %>
bind_port = <%= bind_port %>
mount_check = <%= mount_check %>
user = <%= user %>
log_facility = LOG_LOCAL2
log_facility = <%= log_facility %>
workers = <%= workers %>
[pipeline:main]

@ -4,7 +4,7 @@ bind_ip = <%= storage_local_net_ip %>
bind_port = <%= bind_port %>
mount_check = <%= mount_check %>
user = <%= user %>
log_facility = LOG_LOCAL2
log_facility = <%= log_facility %>
workers = <%= workers %>
[pipeline:main]

@ -4,7 +4,7 @@ bind_ip = <%= storage_local_net_ip %>
bind_port = <%= bind_port %>
mount_check = <%= mount_check %>
user = <%= user %>
log_facility = LOG_LOCAL2
log_facility = <%= log_facility %>
workers = <%= workers %>
[pipeline:main]