I don't use that haproxy-config.py script (that creates a configfile from a
directory layout; maybe some distro ships haproxy with that kind of
configuration).
This is how my logging for haproxy looks like:
/var/log/haproxy/*.log {
daily
missingok
rotate 365
compress
dateext
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null
||
true
endscript
}
You don't touch the haproxy daemon at all, so this will work. Alternatively
you can use the '*copytruncate' *option of logrotate.
--
Best regards,
Hauke
Hi Hauke,
thanks for your answer.
One question about the script. What means config in line 20
HAPROXY_CONFIG=/usr/local/sbin/haproxy-config.py /
Configurationfile is setting on line 17
Another question is configuration haproxy for logging and logrotate - in
logrotate I reload haproxy for creating new logfile - interaction with
corosync?
*Von:* Hauke [mailto:[email protected]]
*Gesendet:* Montag, 25. März 2013 11:41
*An:* [email protected]
*Betreff:* Re: haproxy in cluster with pacemaker and corosync
Hi Wolfgang,
maybe it helps: I use the simple lsb RA for haproxy in pacemaker. A
modified version of
https://github.com/finnlabs/haproxy/blob/master/haproxy-init[1] works for
me.
Environment: Active/Passive, Debian Squeeze, pacemaker and stuff out
of stable repos, self build haproxy (stable).
--
Best regards,
Hauke
On Monday, March 25, 2013 10:22:08 AM Wolfgang Routschka wrote:
Hi everybody,
today I would like to ask you about haproxy best practice in
pacemaker/corosync setups.
We want to use pacemaker/corosync for failover haproxy.
I found 2 ways for configuration - over lsb-ocf-script and a ocf-script
https://raw.github.com/russki/cluster-agents/master/haproxy[2]
What´s your "best practice" to configure haproxy in pacemaker/corosync
cluster?
regards,
Wolfgang
--------
[1] https://github.com/finnlabs/haproxy/blob/master/haproxy-init
[2] https://raw.github.com/russki/cluster-agents/master/haproxy