Hi Bryan.

Am 18-02-2016 21:18, schrieb Bryan Talbot:
Sorry I'm a bit late to this party but when running in a container it's
also easy to configure haproxy to log to a unix socket and bind mount
that socket to the host.

in haproxy.cnf

log /dev/log local2

Then when launching the container an option like "-v /var/log:/var/log"
works quite well to get container syslogs to the host.

Well this way is not possible in openshift due to the fact that the pods are not running as root!

-Bryan

On Thu, Feb 18, 2016 at 6:22 AM, Willy Tarreau <[email protected]> wrote:

Hi Aleks,

On Thu, Feb 18, 2016 at 02:53:29PM +0100, Aleksandar Lazic wrote:
But this moves just the stdout handling to other tools and does not
solve the problem with blocking handling of std*, as far as I have
understood right.

Yes it does because if the logging daemon blocks, logs are simply lost
on the UDP socket between haproxy and the daemon without blocking
haproxy.

It also 'violates' the best practice of docker.



https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run-only-one-process-per-container

Well it's written "in almost all cases". Otherwise you would not even
be allowed to use nbproc or the systemd wrapper. If you consider your
deamon as the log-dedicated process, it's OK :-)

Okay this could be solved with the linking as described in the link.

For openshift I will try to use 2 container in 1 pod.

If there any interests I can write here if this works ;-)

Sure, please report anyway.

Cheers,
Willy

Reply via email to