From 50496c4e761103a691ca8681b229a82e3f6b128e Mon Sep 17 00:00:00 2001 From: Simeon Gourlin Date: Fri, 8 Nov 2019 14:27:23 +0100 Subject: [PATCH 1/2] Added local syslog option for haproxy --- puppet/manifests/compute.pp | 1 + puppet/manifests/controller.pp | 1 + puppet/manifests/swiftproxy.pp | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/puppet/manifests/compute.pp b/puppet/manifests/compute.pp index db3fb504..d714a96a 100644 --- a/puppet/manifests/compute.pp +++ b/puppet/manifests/compute.pp @@ -109,6 +109,7 @@ class oci::compute( class { 'haproxy': global_options => { + 'log' => '/dev/log local0', 'maxconn' => '256', 'user' => 'haproxy', 'group' => 'haproxy', diff --git a/puppet/manifests/controller.pp b/puppet/manifests/controller.pp index ec9a88a5..27857852 100644 --- a/puppet/manifests/controller.pp +++ b/puppet/manifests/controller.pp @@ -530,6 +530,7 @@ export OS_CACERT=${$api_endpoint_ca_file} }-> class { 'haproxy': global_options => { + 'log' => '/dev/log local0', 'maxconn' => '40960', 'user' => 'haproxy', 'group' => 'haproxy', diff --git a/puppet/manifests/swiftproxy.pp b/puppet/manifests/swiftproxy.pp index 6712af7d..ffe652c7 100644 --- a/puppet/manifests/swiftproxy.pp +++ b/puppet/manifests/swiftproxy.pp @@ -130,6 +130,7 @@ class oci::swiftproxy( class { 'haproxy': global_options => { + 'log' => '/dev/log local0', 'maxconn' => '40960', 'user' => 'haproxy', 'group' => 'haproxy', @@ -143,6 +144,15 @@ class oci::swiftproxy( defaults_options => { 'mode' => 'http', 'maxconn' => '40960', + 'timeout' => [ + 'http-request 10s', + 'queue 1m', + 'connect 10s', + 'client 1m', + 'server 1m', + 'check 10s', + ], + 'stats' => 'enable', }, merge_options => true, }-> -- GitLab From 1c370d2a74b7dbd6c68665286d24c013912a46a0 Mon Sep 17 00:00:00 2001 From: Simeon Gourlin Date: Fri, 8 Nov 2019 14:48:22 +0100 Subject: [PATCH 2/2] Modified swift rsyslog config file --- puppet/files/rsyslog-swift.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/puppet/files/rsyslog-swift.conf b/puppet/files/rsyslog-swift.conf index b986691d..d58fbf8d 100644 --- a/puppet/files/rsyslog-swift.conf +++ b/puppet/files/rsyslog-swift.conf @@ -6,6 +6,10 @@ #$template HourlyProxyLog,"/var/log/swift/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%" #local0.* ?HourlyProxyLog +# Haproxy specific +if $programname contains 'haproxy' then /var/log/haproxy.log +if $programname contains 'haproxy' then stop + # Use the following to have separate log files for each of the main servers: # account-server, container-server, object-server, proxy-server. Note: # object-updater's output will be stored in object.log. -- GitLab