Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-05-06 Thread William Lallemand
On Sun, May 05, 2019 at 03:06:31PM +0200, Tim Düsterhus wrote: > William, > > Am 26.04.19 um 20:30 schrieb Tim Düsterhus: > > William, > > > > Am 26.04.19 um 14:56 schrieb William Lallemand: > >> On Fri, Apr 26, 2019 at 12:15:37AM +0200, Tim Duesterhus wrote: > >>> [Service] > >>> -Environment="

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-05-05 Thread Tim Düsterhus
William, Am 26.04.19 um 20:30 schrieb Tim Düsterhus: > William, > > Am 26.04.19 um 14:56 schrieb William Lallemand: >> On Fri, Apr 26, 2019 at 12:15:37AM +0200, Tim Duesterhus wrote: >>> [Service] >>> -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" >>> +Environment="CON

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-30 Thread Patrick Hemmer
*From:* Willy Tarreau [mailto:w...@1wt.eu] *Sent:* Monday, April 29, 2019, 23:55 EDT *To:* William Lallemand *Cc:* Tim Düsterhus , Patrick Hemmer , haproxy@formilux.org *Subject:* [PATCH] MINOR: systemd: Make use of

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-30 Thread Tim Düsterhus
Willy, Am 30.04.19 um 05:55 schrieb Willy Tarreau: > By the way, does systemd support passing actions on stdin and getting > the result on stdout ? Given that the master process is forced to > stay in foreground, at least we could have the equivalent of the CLI > on stdio used as a "console" and n

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-29 Thread Willy Tarreau
On Tue, Apr 30, 2019 at 01:47:13AM +0200, William Lallemand wrote: > the systemd API > is limited and it's not possible to report a fail during a reload with > sd_notify. Anyway a service manager which requires daemons to stay in foreground, does not allow processes to be replaced, and relies on

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-29 Thread William Lallemand
On Mon, Apr 29, 2019 at 08:51:58PM +0200, Tim Düsterhus wrote: > > One issue here is that this problem was not detected by the > configuration check (for obvious reasons), most problems (fat fingered > configuration) are detected using the check. > > Regarding the sd_notify integration: > > I gu

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-29 Thread Tim Düsterhus
Patrick, Am 29.04.19 um 20:37 schrieb Patrick Hemmer: > Yes, we use Type=notify. The problem though is that systemd is reporting > reload success even if the reload fails. > > Take the following example config: > > global > stats socket /tmp/foo > > With the current systemd file provided by hap

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-29 Thread Patrick Hemmer
*From:* Tim Düsterhus [mailto:t...@bastelstu.be] *Sent:* Friday, April 26, 2019, 15:03 EDT *To:* Patrick Hemmer , William Lallemand *Cc:* haproxy@formilux.org, w...@1wt.eu *Subject:* [PATCH] MINOR: systemd: Make use of

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-26 Thread Tim Düsterhus
Patrick, Am 26.04.19 um 20:55 schrieb Patrick Hemmer: > One other consideration is a problem I've been looking to address, and > that's better reloads. Right now the systemd unit sends a signal for the > reload, but sending a signal gets no feedback on whether the reload > operation was successful

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-26 Thread Willy Tarreau
Hi Patrick, On Fri, Apr 26, 2019 at 02:55:30PM -0400, Patrick Hemmer wrote: > One other consideration is a problem I've been looking to address, and > that's better reloads. Right now the systemd unit sends a signal for the > reload, but sending a signal gets no feedback on whether the reload > op

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-26 Thread Patrick Hemmer
*From:* Tim Düsterhus [mailto:t...@bastelstu.be] *Sent:* Friday, April 26, 2019, 14:30 EDT *To:* William Lallemand *Cc:* haproxy@formilux.org, w...@1wt.eu *Subject:* [PATCH] MINOR: systemd: Make use of master socket in

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-26 Thread Tim Düsterhus
William, Am 26.04.19 um 14:56 schrieb William Lallemand: > On Fri, Apr 26, 2019 at 12:15:37AM +0200, Tim Duesterhus wrote: >> [Service] >> -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" >> +Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" >> "MA

Re: [PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-26 Thread William Lallemand
Hi Tim, On Fri, Apr 26, 2019 at 12:15:37AM +0200, Tim Duesterhus wrote: > [Service] > -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" > +Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" > "MASTER_SOCKET=/run/haproxy-master.sock" > ExecStartPre=@

[PATCH] MINOR: systemd: Make use of master socket in systemd unit

2019-04-25 Thread Tim Duesterhus
This commit adds the -S option to the ExecStart= line of the provided systemd unit file. This patch may be backported to 1.9. --- contrib/systemd/haproxy.service.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/systemd/haproxy.service.in b/contrib/systemd/haprox