FS#50696 - [haproxy] Logging in chroot (with/without journald)
Attached to Project:
Community Packages
Opened by Adis Nezirović (adis) - Wednesday, 07 September 2016, 16:24 GMT
Last edited by Johannes Löthberg (demize) - Friday, 23 September 2016, 17:29 GMT
Opened by Adis Nezirović (adis) - Wednesday, 07 September 2016, 16:24 GMT
Last edited by Johannes Löthberg (demize) - Friday, 23 September 2016, 17:29 GMT
|
Details
Description:
The default configuration chroots haproxy to /usr/share/haproxy, but there is no logging infrastructure configured in chroot. Is it possible to add rsyslog as an optional dependency for haproxy, and have something like the following in /etc/rsyslog.d/haproxy.conf AddUnixListenSocket /var/lib/haproxy/dev/log if $programname startswith 'haproxy' then /var/lib/haproxy/dev/log &~ Maybe ship this rsyslog conf with haproxy package and add a note somewhere. Additional info: * package version: 1.6.9 Steps to reproduce: Enable logging in global section global log /dev/log local0 debug and add log format to a frontend: log-format "%r %ST %B %Tr" restart haproxy service and observe logs: journalctl -xf -u haproxy Other than start/restart no other haproxy messages are logged to the journal |
This task depends upon
Closed by Johannes Löthberg (demize)
Friday, 23 September 2016, 17:29 GMT
Reason for closing: Deferred
Additional comments about closing: Added post_install message in 1.6.9-2.
HAProxy doesn't support logging to stdout, and the example config is just an example, so tell the user to set it up however they want themselves.
Friday, 23 September 2016, 17:29 GMT
Reason for closing: Deferred
Additional comments about closing: Added post_install message in 1.6.9-2.
HAProxy doesn't support logging to stdout, and the example config is just an example, so tell the user to set it up however they want themselves.
Comment by
Johannes Löthberg (demize) -
Friday, 23 September 2016, 16:44 GMT
I'm not really okay with depending on rsyslog when it's not
needed, but I'm definitely okay with adding it as an opt
dependency. It would definitely be preferable to be able to
support having it actually log to journald from the chroot though,
hmm.
Comment by
Johannes Löthberg (demize) -
Friday, 23 September 2016, 17:03 GMT
Since HAProxy still doesn't seem to be able to log to stdout, I'm
just going to add the optdep and then print a post_install message
saying that if you want logs chrooted you'll have to either
install rsyslog or have the journald socket bound into the chroot.