Re: Which signal causes HAProxy to reload its config

2015-03-25 Thread Marc-Antoine Perennou
On 25 March 2015 at 12:25, jeff saremi jeffsar...@hotmail.com wrote: I have to do manually what -sf is supposed to be doing since it's either not working or not supported and removed. I know what that does is send a signal to the pid stored by the haproxy process. I'd like to do that myself.

Re: [PATCH] Also accept SIGHUP/SIGTERM in systemd-wrapper

2014-09-11 Thread Marc-Antoine Perennou
On 11 September 2014 07:44, Willy Tarreau w...@1wt.eu wrote: On Wed, Sep 10, 2014 at 10:38:55PM -0700, Matt Robenolt wrote: Awesome, thanks. :) Is it possible to also get this applied into the 1.5 branch since this is low risk and doesn???t break any backwards compatibility and whatnot?

Re: [PATCH 0/3] systemd wrapper improvements

2014-04-17 Thread Marc-Antoine Perennou
Hi, On Thursday, April 17, 2014, Apollon Oikonomopoulos apoi...@debian.org wrote: Hi, The following patches improve the systemd wrapper in a couple of ways: - The systemd wrapper itself is now re-executed on SIGUSR2, allowing a new version of both HAProxy and the wrapper to be

Re: haproxy-systemd-wrapper spawning multiple processes

2014-02-15 Thread Marc-Antoine Perennou
Hi, On 16 February 2014 01:51, Ryan O'Hara roh...@redhat.com wrote: I started tinkering with haproxy-systemd-wrapper recently and noticed that I get two haproxy processes when I start: # systemctl start haproxy # systemctl status haproxy haproxy.service - HAProxy Load Balancer Loaded:

Re: haproxy-systemd-wrapper spawning multiple processes

2014-02-15 Thread Marc-Antoine Perennou
On Sat, 2014-02-15 at 20:04 -0600, Ryan O'Hara wrote: On Sun, Feb 16, 2014 at 10:08:31AM +0900, Marc-Antoine Perennou wrote: This is why you get haproxy-systemd-wrapper - main haproxy process - haproxy worker. haproxy-systemd-wrapper waits for the main haproxy process to exit

Re: Three patches to the haproxy-systemd-wrapper

2013-11-23 Thread Marc-Antoine Perennou
Hello, On Saturday, November 23, 2013, Willy Tarreau wrote: Hello Kristoffer, On Fri, Nov 22, 2013 at 11:21:21AM +0100, Kristoffer Grönlund wrote: Hello, I have packaged haproxy 1.4.24 for openSUSE 13.1 [1], which uses systemd as the init system. At first I tried using a service

[PATCH] BUG/MEDIUM: systemd-wrapper: don't leak zombie processes

2013-04-02 Thread Marc-Antoine Perennou
Formerly, if A was replaced by B, and then B by C before A finished exiting, we didn't wait for B to finish so it ended up as a zombie process. Fix this by waiting randomly every child we spawn. Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- src/haproxy-systemd-wrapper.c | 10

Re: [PATCH v2] BUG/MEDIUM: systemd-wrapper: don't leak zombie processes

2013-04-01 Thread Marc-Antoine Perennou
, Marc-Antoine Perennou wrote: Formerly, if A was replaced by B, and then B by C before A finished exiting, we didn't wait for B to finish so it ended up as a zombie process. Fix this by queuing all process we spawn for waitpid. I'm a bit puzzled, why is it necessary to keep a queue of all

[PATCH v2] BUG/MEDIUM: systemd-wrapper: don't leak zombie processes

2013-03-14 Thread Marc-Antoine Perennou
Formerly, if A was replaced by B, and then B by C before A finished exiting, we didn't wait for B to finish so it ended up as a zombie process. Fix this by queuing all process we spawn for waitpid. Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- src/haproxy-systemd-wrapper.c

[PATCH] MEDIUM: systemd-wrapper: don't leak zombie processes

2013-02-25 Thread Marc-Antoine Perennou
Formerly, if A was replaced by B, and then B by C before A finished exiting, we didn't wait for B to finish so it ended up as a zombie process. Fix this by queuing all process we spawn for waitpid. Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- src/haproxy-systemd-wrapper.c

Re: [[V2] 3/3] MEDIUM: add systemd service

2013-02-13 Thread Marc-Antoine Perennou
Hi, On 13 February 2013 08:11, Willy Tarreau w...@1wt.eu wrote: Hi Marc-Antoine, On Tue, Feb 12, 2013 at 10:53:54AM +0100, Marc-Antoine Perennou wrote: +systemd/haproxy.service: contrib/systemd/haproxy.service.in + mkdir -p systemd + sed -e 's:@SBINDIR@:'$(strip $(SBINDIR

[[V3] 3/3] MEDIUM: add systemd service

2013-02-13 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- .gitignore | 1 + contrib/systemd/Makefile | 8 contrib/systemd/haproxy.service.in | 11 +++ 3 files changed, 20 insertions(+) create mode 100644 contrib/systemd/Makefile

[[V2] 1/3] MEDIUM: New cli option -Ds for systemd compatibility

2013-02-12 Thread Marc-Antoine Perennou
-by: Marc-Antoine Perennou marc-anto...@perennou.com --- doc/haproxy-en.txt | 1 + doc/haproxy-fr.txt | 1 + doc/haproxy.1 | 4 include/types/global.h | 1 + src/haproxy.c | 35 +++ 5 files changed, 30 insertions(+), 12 deletions

[[V2] 2/3] MEDIUM: add haproxy-systemd-wrapper

2013-02-12 Thread Marc-Antoine Perennou
itself) signal, and spawing a new haproxy with -sf as a child to relay the first one. Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- .gitignore| 1 + Makefile | 16 +- src/haproxy-systemd-wrapper.c | 113

[[V2] 3/3] MEDIUM: add systemd service

2013-02-12 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- .gitignore | 1 + Makefile | 8 ++-- contrib/systemd/haproxy.service.in | 11 +++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 contrib

Re: [PATCH 1/3] MEDIUM: New cli option -Ds for systemd compatibility

2013-02-09 Thread Marc-Antoine Perennou
On 9 February 2013 09:45, Willy Tarreau w...@1wt.eu wrote: On Fri, Feb 08, 2013 at 03:58:46PM +0100, Marc-Antoine Perennou wrote: @@ -1493,8 +1499,13 @@ int main(int argc, char **argv) px = px-next; } - if (proc == global.nbproc

Re: [PATCH 2/3] MEDIUM: add haproxy-systemd-wrapper

2013-02-09 Thread Marc-Antoine Perennou
here ? I first did it with SIGUSR1 but then children couldn't bind to this signal on reload, since it was already a USR1 action, so I took the first one not colliding. On 9 February 2013 09:49, Willy Tarreau w...@1wt.eu wrote: On Fri, Feb 08, 2013 at 03:58:47PM +0100, Marc-Antoine Perennou wrote

Re: [PATCH 1/3] MEDIUM: New cli option -Ds for systemd compatibility

2013-02-09 Thread Marc-Antoine Perennou
On 9 February 2013 11:06, Willy Tarreau w...@1wt.eu wrote: Hi, On Sat, Feb 09, 2013 at 10:44:04AM +0100, Marc-Antoine Perennou wrote: I just made a simple test, running a webserver serving a big file locally, using haproxy, my wrapper and systemd service. I started a download and during

[PATCH 2/3] MEDIUM: add haproxy-systemd-wrapper

2013-02-08 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- .gitignore| 1 + Makefile | 16 +- src/haproxy-systemd-wrapper.c | 122 ++ 3 files changed, 137 insertions(+), 2 deletions(-) create mode

HAProxy and systemd compatibility

2013-02-08 Thread Marc-Antoine Perennou
Hi, Currently, to reload haproxy configuration, you have to use -sf. Systemd philosophy is for the daemon not to fork by themselves, but rather let the init process do it for them. My first patch adds a new option -Ds which is exactly like -D, but instead of forking n times to get n jobs

[PATCH 1/3] MEDIUM: New cli option -Ds for systemd compatibility

2013-02-08 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- doc/haproxy-en.txt | 1 + doc/haproxy-fr.txt | 1 + doc/haproxy.1 | 4 include/types/global.h | 1 + src/haproxy.c | 35 +++ 5 files changed, 30 insertions(+), 12

[PATCH 3/3] MEDIUM: add systemd service

2013-02-08 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- .gitignore | 1 + Makefile | 8 ++-- contrib/systemd/haproxy.service.in | 11 +++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 contrib

Re: -sf/-st not working

2013-02-07 Thread Marc-Antoine Perennou
It is totally normal that systemd kills the new process as the main one which was the first has exited. This is the expected behaviour. I'm currently patching haproxy to fully support systemd, I'll probably submit my patches by tomorrow (It's fully functionnal here, only needs a little cleaning)

[PATCH] MEDIUM: New cli option -Ds for systemd compatibility

2012-11-07 Thread Marc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou marc-anto...@perennou.com --- doc/haproxy-en.txt | 1 + doc/haproxy-fr.txt | 1 + doc/haproxy.1 | 4 include/types/global.h | 1 + src/haproxy.c | 31 +++ 5 files changed, 26 insertions(+), 12