[PATCH v3 4/9] MEDIUM: mworker: try to guess the next stats socket to use with -x

2017-06-01 Thread William Lallemand
In master worker mode, you can't specify the stats socket where you get your listeners FDs on a reload, because the command line of the re-exec is launched by the master. To solve the problem, when -x is found on the command line, its parameter is rewritten on a reexec with the first stats socket

[PATCH v3 1/9] MEDIUM: mworker: replace systemd mode by master worker mode

2017-06-01 Thread William Lallemand
This commit remove the -Ds systemd mode in HAProxy in order to replace it by a more generic master worker system. It aims to replace entirely the systemd wrapper in the near future. The master worker mode implements a new way of managing HAProxy processes. The master is in charge of parsing the co

[PATCH v3 9/9] MAJOR: systemd-wrapper: get rid of the wrapper

2017-06-01 Thread William Lallemand
The master worker mode obsoletes the systemd-wrapper, to ensure that nobody uses it anymore, the code has been removed. --- Makefile | 18 +-- contrib/systemd/haproxy.service.in | 2 +- src/haproxy-systemd-wrapper.c | 319 - 3 f

Re: exit error regression on haproxy1.8dev

2017-06-07 Thread William Lallemand
xy -f test.cfg > >> echo $? > > 1 > > > > With bunch of modified code, i am a little lost to track the bug. > > > > Manu > > > > > You are right about the regression, however this part of the code should be called in daemon mode only, the

Re: exit error regression on haproxy1.8dev

2017-06-08 Thread William Lallemand
xy -f test.cfg > >> echo $? > > 1 > > > > With bunch of modified code, i am a little lost to track the bug. > > > > Manu > > > > > You are right about the regression, however this part of the code should be called in daemon mode only, the

[PATCH] BUG/MEDIUM: build without openssl broken

2017-06-08 Thread William Lallemand
The commit 872f9c213 ("MEDIUM: ssl: add basic support for OpenSSL crypto engine") broke the build without openssl support. The ssl_free_dh() function is not defined when USE_OPENSSL is not defined and leads to a compilation failure. --- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH] BUG/MINOR: warning: ‘need_resend’ may be used uninitialized

2017-06-08 Thread William Lallemand
The commit 201c07f68 ("MAJOR/REORG: dns: DNS resolution task and requester queues") introduces a warning during compilation: src/dns.c: In function ‘dns_resolve_recv’: src/dns.c:487:6: warning: ‘need_resend’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (need_resend) {

Re: exit error regression on haproxy1.8dev

2017-06-08 Thread William Lallemand
On Thu, Jun 08, 2017 at 01:49:15PM +0200, William Lallemand wrote: > > You are right about the regression, however this part of the code should be > called in daemon mode only, the regression was elsewhere :) > > Fix attached. > Willy, could you apply this one? Thanks, -- William Lallemand

[ANNOUNCE] haproxy-1.7.6

2017-06-16 Thread William Lallemand
UG/MINOR: checks: don't send proxy protocol with agent checks BUG/MAJOR: http: call manage_client_side_cookies() before erasing the buffer BUG/MEDIUM: unix: never unlink a unix socket from the file system scripts: create-release pass -n to tail SCRIPTS: create-release: enforce GIT_COMMITTER_{NAME|EMAIL} validity -- William Lallemand

Re: master-worker and seamless reload (bug)

2017-06-16 Thread William Lallemand
master worker reexec the process adding a -x with what it found in the configuration, you don't have to start it with -x at startup. Regarding the PID, I think you have this behavior because you started the daemon mode with -sf. > one last: > # haproxy -x > Segmentation fault I'll fix that. > > ++ > Manu > Thanks for the tests! -- William Lallemand

Re: master-worker and seamless reload (bug)

2017-06-19 Thread William Lallemand
er-worker, and that's useful in your usecase, if your socket path changed in the configuration file. I think that's just a matter of documentation, maybe I can write a longer paragraph in the management.txt doc explaining how to upgrade for the legacy mode, and what changed between this one and the master worker. -- William Lallemand

Re: LoadBalance whole subnet

2017-06-20 Thread William Lallemand
n copy to his mail which lead to this. Please don't continue this thread on the mailing list, thanks. -- William Lallemand

Re: master-worker and seamless reload (bug)

2017-06-20 Thread William Lallemand
ocesses from it. I add a warning about that. I fixed the few issues you had in the attached patches. Willy, could you merge them? thanks -- William Lallemand >From 9927f4a1e864638e16dcb3c61de23bcc8f256a91 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 19 Jun 2017 15:57:55 +0200 Subj

Re: 1.7.6 redirect regression (commit 73d071ecc84e0f26ebe1b9576fffc1ed0357ef32)

2017-06-21 Thread William Lallemand
, patch fixes the problem (with test config (I'll try to > test with prod. config later)). > > -Jarno > Thanks for tests, I will backport it in the 1.7 branch. -- William Lallemand

Re: LoadBalance whole subnet

2017-06-21 Thread William Lallemand
ailing list, thanks. > > > Well, I assume I understand you. > To clarify, I think I wasn't clear enough. I meant it's not necessary to continue the thread with Anamarija and contact@ on the mailing list :-) -- William Lallemand

[ANNOUNCE] haproxy-1.7.8

2017-07-07 Thread William Lallemand
acl: fix unwanted flags inheritance. Jarno Huuskonen (1): DOC: fix references to the section about time format. Willy Tarreau (1): BUG/MINOR: http: properly handle all 1xx informational responses -- William Lallemand

Re: server ports - server state file

2017-08-03 Thread William Lallemand
now merged. thanks Fred! > Willy > Thanks Fred, that will be really useful! -- William Lallemand

[ANNOUNCE] haproxy-1.7.9

2017-08-17 Thread William Lallemand
: lua: always detach the tcp/http tasks before freeing them ben51degrees (1): DOC: Updated 51Degrees git URL to point to a stable version. -- William Lallemand

Re: graceful shutdown maximum time

2017-08-18 Thread William Lallemand
create a cron job that kills old haproxy > processes on a delay. Would be nice if there were a better option > though. > > Thanks for any suggestion. > > Justin > The "hard-stop-after" keyword do what you want: https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#hard-stop-after -- William Lallemand

Re: Haproxy refuses new connections when doing a reload followed by a restart

2017-10-08 Thread William Lallemand
tart, it will eventualy kill something which has been forked between the reload and the restart. And the list will grow indefinitely with each reload/restart. The master-worker model should fix that kind of issue, because it's aware of all PIDs, old and new. You could try: * To change the KillMode to the default, which should kill -SIGTERM all processes on a stop or restart. But if I remember well, it leads to a bad exit code on the systemd side and display an error. * To reduce the timeout of the SIGTERM with TimeoutStopSec= in your unit file -- William Lallemand

Re: Haproxy refuses new connections when doing a reload followed by a restart

2017-10-12 Thread William Lallemand
e ready to receive traffic at this stage. However I'm not sure it's that useful, you can know when a process is ready using the logs, and it will add specific code for systemd and a dependency. Are there really advantages to letting know systemd when a reload is finished or when a process is ready? Cheers, -- William Lallemand

Re: Haproxy refuses new connections when doing a reload followed by a restart

2017-10-12 Thread William Lallemand
ervices is that systemd will wait > for READY=1 before starting units with After=haproxy (although HAProxy > is really a "leaf" kind of service). > That's interesting, nobody ever ask for that, but I see a few cases where that can be useful. > Note that the dependency is really thin, and you can always make it a > compile-time option. > > Regards, > Apollon Cheers, -- William Lallemand

Re: [PATCH] Reset a few more counters on "clear counters"

2017-10-18 Thread William Lallemand
gt; > > SslBackendMaxKeyRate) are not cleared as I think they should, when clear > > > counters is used. > > > The attached patch addresses that. > > > > Applied, thanks! > > Willy > > > > Can we backport this one? There is at least one report

Re: [ANNOUNCE] haproxy-1.8-rc1 : the last mile

2017-11-02 Thread William Lallemand
he way, > though I have no idea how to do that but I think it's mentionned > somewhere in the config manual. William was about to write some doc > when I interrupted him to get his code, but he'll certainly get back > to this soon. It will need a configuration filter keyword for the cache, to define the explicit order of the filters. The cache might not work after the compression in the current state of the filter API. -- William Lallemand

some mworker + pidfile patches

2017-11-06 Thread William Lallemand
A few patches which help using the pidfile in master-worker mode.

[PATCH 3/3] MINOR: mworker: write parent pid in the pidfile

2017-11-06 Thread William Lallemand
The first pid in the pidfile is now the parent, it's more convenient for supervising the processus. You can now reload haproxy in master-worker mode with convenient command like: kill -USR2 $(head -1 /tmp/haproxy.pid) --- src/haproxy.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sr

[PATCH 1/3] MINOR: add master-worker in the warning about nbproc

2017-11-06 Thread William Lallemand
--- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 68b5e427b..bbd26b82d 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1749,7 +1749,7 @@ static void init(int argc, char **argv) if ((global.nbproc > 1) && !(global.

[PATCH 2/3] MINOR: mworker: allow pidfile in mworker + foreground

2017-11-06 Thread William Lallemand
This patch allows the use of the pidfile in master-worker mode without using the background option. --- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index bbd26b82d..f12e903b2 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2499

[PATCH] MINOR: mworker: do not store child pid anymore in the pidfile

2017-11-06 Thread William Lallemand
The parent process supervises itself the children, we don't need to store the children pids anymore in the pidfile in master-worker mode. --- src/haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index bcbbad4a1..4d4bd3b26 100644 --- a/src/

Re: [PATCH] MINOR: mworker: do not store child pid anymore in the pidfile

2017-11-06 Thread William Lallemand
On Mon, Nov 06, 2017 at 12:11:13PM +0100, Pavlos Parissis wrote: > On 06/11/2017 11:16 πμ, William Lallemand wrote: > > The parent process supervises itself the children, we don't need to > > store the children pids anymore in the pidfile in master-worker mode. > >

Re: [PATCH] BUG/MEDIUM: mworker: Fix re-exec when haproxy is started from PATH

2017-11-14 Thread William Lallemand
r problems in this code path, I'll fix them shortly. > Replace `execv` with `execvp` to establish the expected > behaviour. Willy, could you please apply this patch? thanks -- William Lallemand

Re: [PATCH] BUG/MEDIUM: mworker: Fix re-exec when haproxy is started from PATH

2017-11-15 Thread William Lallemand
Hi Tim, On Tue, Nov 14, 2017 at 08:20:25PM +0100, Tim Düsterhus wrote: > William, > > Am 14.11.2017 um 15:03 schrieb William Lallemand: > > Well, in my opinion the return value does not need to be checked because we > > should never reach the code after the exec, that mean

Re: [PATCH] BUG/MEDIUM: mworker: Fix re-exec when haproxy is started from PATH

2017-11-16 Thread William Lallemand
On Thu, Nov 16, 2017 at 05:30:05PM +0100, Tim Düsterhus wrote: > William, > > Am 15.11.2017 um 21:17 schrieb William Lallemand: > > These problems have been fixed in the master with the following commits: > > > > 75ea0a06b BUG/MEDIUM: mworker: does not close inherited

Re: [PATCH v2 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
we can integrate the -Ws command in the unit file without changing the behavior of the normal option. Cheers, -- William Lallemand

Re: [PATCH v2 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
but wait for session to be finished. It will cause the restart to behave like the reload but with a PID change. Cheers, -- William Lallemand

Re: [PATCH v2 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
On Mon, Nov 20, 2017 at 11:39:53AM +0100, Tim Düsterhus wrote: > William, > > Am 20.11.2017 um 10:59 schrieb William Lallemand: > > I think a good way to activate this feature will be to use it with a -Ws > > command > > line option instead of changing the behavior o

Re: [PATCH v2 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
On Mon, Nov 20, 2017 at 12:55:06PM +0100, Tim Düsterhus wrote: > William, > > Am 20.11.2017 um 12:01 schrieb William Lallemand: > >> The only difference I can see is that haproxy will fail to start for a > >> different reason (use of undefined option, instead of n

Re: [PATCH v2 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
On Mon, Nov 20, 2017 at 02:07:18PM +0100, Tim Düsterhus wrote: > William, > > Am 20.11.2017 um 13:45 schrieb William Lallemand: > > On Mon, Nov 20, 2017 at 12:55:06PM +0100, Tim Düsterhus wrote: > >> May I suggest the following: If haproxy is *not* compiled with the >

Re: [PATCH v3 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
On Mon, Nov 20, 2017 at 03:58:35PM +0100, Tim Düsterhus wrote: > From: Tim Duesterhus > > This patch adds support for `Type=notify` to the systemd unit. Looks good to me, thanks! Willy can you merge it? -- William Lallemand

Re: haproxy-1.8-rc4 - FreeBSD 11.1 - master-worker daemon parent staying alive/process-owner

2017-11-20 Thread William Lallemand
ion notification in the future, using the admin socket for example. > Currently a whole new set of master-worker processes seems to be take over.. Well, I supposed that's because you launched a new master-worker with -sf, it's not supposed to be used that way but it should work too if you don't mind having a new PID. > Regards, > PiBa-NL / Pieter > Best Regards, -- William Lallemand

Re: [PATCH v3 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-20 Thread William Lallemand
.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutStartSec= I suggest we configure it to a greater value per default, it can be set to infinity too, but I don't like the idea. -- William Lallemand

Re: [PATCH v3 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-21 Thread William Lallemand
On Tue, Nov 21, 2017 at 11:12:45AM +0100, Lukas Tribus wrote: > Hello, > > 2017-11-21 8:39 GMT+01:00 William Lallemand : > > That's not it, the hold-off timer is only a consequence of this > problem. I believe the notification does not work in my case, which is > why f

Re: [PATCH v3 1/1] MEDIUM: mworker: Add systemd `Type=notify` support

2017-11-21 Thread William Lallemand
On Tue, Nov 21, 2017 at 11:28:55AM +0100, Willy Tarreau wrote: > On Tue, Nov 21, 2017 at 11:19:41AM +0100, William Lallemand wrote: > > I don't like the idea of the "daemon" keyword being ignored, > > We already do that with -D which ignores "debug" for e

Re: [docs] about master-worker mode

2017-11-27 Thread William Lallemand
procs> correct? Couldn’t use > this on the command line. > That's an error, -W doesn't take a process argument, it's only a flag. The master-worker only simplify the reload and the supervision of HAProxy. > ~jm > > [1] http://cbonte.github.io/haproxy-dconv/1.8/co

Re: [1.8] tune.ssl.cachesize

2017-11-28 Thread William Lallemand
red_block)), > > Still, William is the best person to ask. :-) > Thanks for the report, the bug was elsewhere, in fact the shctx was initialized for each ssl bind. Patch attached. -- William Lallemand >From 6798b9d884096f17f0f4863dc8ce52445865f90d Mon Sep 17 00:00:00 2001 From: William

Re: cache issue : some data skipped in the middle of the content

2017-11-28 Thread William Lallemand
;-) > > Also, I've not checked yet but I was wondering : is it specific to the cache > filter or can we find the same issue in other ones (compression for example) ? > > Cyril You're absolutely right, we spot this one before but it seems the

Re: [BUG] haproxy 1.8-last/master-worker/peers

2017-11-28 Thread William Lallemand
e master-worker code, however that does not explain why the old worker does not quit. -- William Lallemand

Re: [BUG] haproxy 1.8-last/master-worker/peers

2017-11-28 Thread William Lallemand
On Tue, Nov 28, 2017 at 02:56:55PM +0100, William Lallemand wrote: > On Tue, Nov 28, 2017 at 12:22:04PM +0100, Emmanuel Hocdet wrote: > > ok, i should have something strange because it’s easy to reproduce in my > > environnement. > > > > When i look lsof i see on mas

Re: [PATCH] BUG/MINOR: Check if master-worker pipe getenv succeeded, also allow pipe fd 0 as valid.

2017-11-28 Thread William Lallemand
e: ret = pipe(mworker_pipe); if (ret < 0) { ha_alert("[%s.main()] Cannot create master pipe.\n", argv[0]); exit(1); } This code will guarantee that the whole master-worker quit if there is a problem. -- William Lallemand

Re: [PATCH] BUG/MINOR: when master-worker is in daemon mode, detach from tty

2017-11-28 Thread William Lallemand
and 1 FDs in the pipe, we also need to rely on setsid() to do a proper tty detach. This is already done in -D mode without -W, maybe this part of the code should me moved elsewhere, but we have to be careful not to break the daemon mode w/o mworker. -- William Lallemand

Re: [PATCH] BUG/MINOR: Check if master-worker pipe getenv succeeded, also allow pipe fd 0 as valid.

2017-12-02 Thread William Lallemand
+0100, PiBa-NL wrote: > Thanks for the review, new patch attached that basically incorporates > all your comments. > Regards, > PiBa-NL / Pieter > -- William Lallemand

Re: [PATCH] BUG/MINOR: when master-worker is in daemon mode, detach from tty

2017-12-02 Thread William Lallemand
ly daemonize. */ > + fclose(stdin); fclose(stdout); > fclose(stderr); > + global.mode &= ~MODE_VERBOSE; > + global.mode |= MODE_QUIET; /* ensure > that we won't say anything from now */ > + setsid(); > + } > + > mworker_wait(); > /* should never get there */ > exit(EXIT_FAILURE); Cheers, -- William Lallemand

Re: [PATCH 1/2] DOC: mworker: Update messages referencing exit-on-failure

2017-12-04 Thread William Lallemand
-failure: killing > every workers with SIGTERM\n"); I prefer to leave this one, because otherwise the user won't understand why it killed the workers, and a grep on "exit-on-failure" in the documentation will find "no-exit-on-failure" so that's not a problem. -- William Lallemand

[ANNOUNCE] haproxy-1.8.16

2018-12-21 Thread William Lallemand
not per-thread --- -- William Lallemand

Re: haproxy reload terminated with master/worker

2019-01-08 Thread William Lallemand
a reload failed, but you could read the errors in the service logs. I have some plans for the master worker in the future, to have a synchronous state of the reload on the CLI, but this is not possible with the current architecture. We will probably need to stop reexecuting the process to achieve th

Re: Seamless reloads: file descriptors utilization in LUA

2019-01-21 Thread William Lallemand
void FD leaks during a reload of the master process, those FDs must be marked FD_CLOEXEC. I don't know how you are opening these file but you should try to do a fcntl on the FD. -- William Lallemand

Re: Reloads do not terminate old processes (1.9.x)

2019-01-29 Thread William Lallemand
r worker mode, you just have to specify "expose-fd listeners" in the configuration, and the master will had this option for you. The systemd configuration looks good to me. Cheers, -- William Lallemand

Re: %[] in use-server directives

2019-02-18 Thread William Lallemand
ourse.haproxy.org/t/in-use-server/3529 > > Indeed it's not possible to parse a log-format string there. However, you can set dynamically the destination IP with 'http-request set-dst' and '0.0.0.0:0' as a server address. That's an ugly trick and that might be difficult to read logs and statistics when doing it because it will use the same server. -- William Lallemand

Re: Issue with systemd haproxy.service on RHEL 7.4

2019-03-07 Thread William Lallemand
e cannot be reloaded > because it is inactive. > > > Have attached haproxy.service for reference. Can I get some pointers to > resolve this issue. > > Thanks > badari Looks like you copied the haproxy.service.in instead of the haproxy.service generated. "@SBINDIR@" is a macro that is present in the .in but replaced in the .service. -- William Lallemand

Re: 1.9.5, SIGABRT

2019-03-27 Thread William Lallemand
it tried to remove a child which is not in the process list anymore, it's not supposed to happened. Can you share your configuration? Thanks. -- William Lallemand

Re: 1.9.5, SIGABRT

2019-03-27 Thread William Lallemand
On Wed, Mar 27, 2019 at 02:24:23PM +0100, William Lallemand wrote: > > On Wed, Mar 27, 2019 at 01:59:59PM +0300, Максим Куприянов wrote: > > Hi, everybody! Got a core on 1.9.5. > > > > Hello, > > How did it happened? Can you reproduce? > Can you share the sys

Re: 1.9.5, SIGABRT

2019-03-28 Thread William Lallemand
? The only case we can imagine, is something forking from the master which is not a worker, maybe a fork in a lua script, or in a openssl engine. -- William Lallemand >From cf0a8557e758b10b75a2bb64b0992ce052a969af Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 27 Mar 2019

Re: Abort on exit "libgcc_s.so.1 must be installed for pthread_cancel to work"

2019-04-05 Thread William Lallemand
ibgcc_s, so it tries to load libgcc_s during the call to phtread_exit() but that can't work if the process is chroot'ed. Your solution is the good one, but it was not working on some distributions, I add to do ADDLIB="-Wl,--no-as-needed -lgcc_s -Wl,--as-needed" instead. Regards, -- William Lallemand

Re: Abort on exit "libgcc_s.so.1 must be installed for pthread_cancel to work"

2019-04-10 Thread William Lallemand
f > > the > > process is chroot'ed. > > > > Your solution is the good one, but it was not working on some > > distributions, I > > add to do ADDLIB="-Wl,--no-as-needed -lgcc_s -Wl,--as-needed" instead. > > > > Regards, > > > > -

Re: `stats bind-process` broken

2019-04-12 Thread William Lallemand
Patrick, Christian, Could you try the attached patch? It should fix the issue. Thanks -- William Lallemand >From 71dae971bf9b59ec8ef2f94cab2c0d762744c2a9 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Fri, 12 Apr 2019 14:40:36 +0200 Subject: [PATCH] BUG/MEDIUM: mworker/cli: do

Re: how does ./reg-tests/seamless-reload/b00000.vtc should work ?

2019-04-16 Thread William Lallemand
Hi Ilya, This is a regression due to recent changes in the master-worker. I also found a minor bug when debugging it. The following patches shoud fix the problem. Cheers,

[PATCH 1/3] BUG/MINOR: mworker: mworker_kill should apply on every children

2019-04-16 Thread William Lallemand
Commit 3f12887 ("MINOR: mworker: don't use children variable anymore") introduced a regression. The previous behavior was to send a signal to every children, whether or not they are former children. Instead of this, we only send a signal to the current children, so we don't try to kill -INT or -TE

[PATCH 3/3] BUG/MINOR: mworker: ensure that we still quits with SIGINT

2019-04-16 Thread William Lallemand
Since the fix "BUG/MINOR: mworker: don't exit with an ambiguous value" we are leaving with a EXIT_SUCCESS upon a SIGINT. We still need to quit with a SIGINT when a worker leaves with a SIGINT. This is done this way because vtest expect a 130 during the process stop, haproxy without mworker return

[PATCH 2/3] BUG/MINOR: mworker: don't exit with an ambiguous value

2019-04-16 Thread William Lallemand
When the sigchld handler is called and waitpid() returns -1, the behavior of waitpid() with the status variable is undefined. It is not a good idea to exit with the value contained in it. Since this exit path does not use the exitcode variable, it means that this is an expected and successful exit

Re: bad guarding of reg-tests

2019-04-16 Thread William Lallemand
ests, or they won't be portable. > 2) tests do not check whether haproxy is built with USE_PCRE=1 (but they > assume that) > Did you try to add a REQUIRE_OPTIONS=PCRE in those tests? I think that should work. > thanks, > Ilya Shipitcin -- William Lallemand

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

2019-04-26 Thread William Lallemand
pinion that's not a good idea to do it this way, because you can't disable the master CLI by unsetting the MASTER_SOCKET variable. It's probably better to have "-S /run/haproxy-master.sock" in an $OPTIONS variable at the end of the ExecStart line. -- William Lallemand

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

2019-04-29 Thread William Lallemand
that, because the re-execution of the process close the connection to the master CLI. -- William Lallemand

Re: PATCH: s6 readiness notification support

2019-05-02 Thread William Lallemand
> + notifyfd = fdopen(3, "w"); > + fprintf(notifyfd, "UP\n"); > + fclose(notifyfd); > + } If the FD is already open you could do directly a write() to this FD. Please add your option in the documentation (management.txt). Cheers, -- William Lallemand

Re: leak of handle to /dev/urandom since 1.8?

2019-05-02 Thread William Lallemand
e mworker_reload function. You just need to check the SSL macros for the build and the minimum openssl version (1.1.1), so probably something like this: #if defined(USE_OPENSSL) && (OPENSSL_VERSION_NUMBER >= 0x10101000L) RAND_keep_random_devices_open(0); #endif I don't think we need anything in ssl_sock.c though. Regards, -- William Lallemand

Re: leak of handle to /dev/urandom since 1.8?

2019-05-03 Thread William Lallemand
g a concern that is. Any thoughts? In this case you could check the variables global.ssl_used_frontend && global.ssl_used_backend to ensure that SSL was used in the configuration. When those variables are not set, the random is not initialized. Regards, -- William Lallemand

Re: leak of handle to /dev/urandom since 1.8?

2019-05-03 Thread William Lallemand
dig up the entire history right now, will do that > later for context, however, please do not commit this yet. > > Lukas, This is the code of deinitilisation of the master, which is launched before the re-execution of the master, it does not impact the workers. -- William Lallemand

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:

Re: [PATCH v2 0/2] systemd: Make use of master socket in systemd unit

2019-05-06 Thread William Lallemand
fic to each distribution, but they could still patch it in the other distributions. In my opinion this file is more like an example and it must be adapted to each distribution. -- William Lallemand

Re: [PATCH v2 1/2] MINOR: systemd: Use the variables from /etc/default/haproxy

2019-05-06 Thread William Lallemand
heir own unit file anyway, people should edit this file before using it. -- William Lallemand

Re: [PATCH v2 0/2] systemd: Make use of master socket in systemd unit

2019-05-06 Thread William Lallemand
t in git > send-email? > > This time I added it to git format-patch, but it did not make the actual > patches a reply to the --cover-letter. Will it work properly when > specifying it with git send-email? I never used it with git format-patch, I usually do a `git send-email --compose

Re: [PATCH v2 1/2] MINOR: systemd: Use the variables from /etc/default/haproxy

2019-05-06 Thread William Lallemand
gt; still be compatible with both styles of distribution with: > > EnvironmentFile=-/etc/default/haproxy > EnvironmentFile=-/etc/sysconfig/haproxy Oh that's right, I forgot that the - was checking if the file exists, looks like a good solution. -- William Lallemand

Re: [PATCH v2 1/2] MINOR: systemd: Use the variables from /etc/default/haproxy

2019-05-07 Thread William Lallemand
On Mon, May 06, 2019 at 04:07:47PM +0200, William Lallemand wrote: > On Mon, May 06, 2019 at 02:20:32PM +0200, Vincent Bernat wrote: > > However, many people prefer /etc/default and /etc/sysconfig to systemd > > overrides. And for distribution, it enables a smoother transition. For

Re: leak of handle to /dev/urandom since 1.8?

2019-05-07 Thread William Lallemand
/* close random device FDs */ > + RAND_keep_random_devices_open(0); > +#endif > > and requests a backport to 1.8 and 1.9 where we noticed this issue (and > which > include the re-exec for reload code, if I followed its history > thoroughly). > > Rob &

Re: systemd watchdog support?

2019-05-07 Thread William Lallemand
y with Restart=on-failure, this is what is done when one of the worker segfault, for example. > > Any thoughts on the matter, or do we not want to do this, and rely on a > custom check in the cluster management software? > > -Patrick > -- William Lallemand

Re: Link error building haproxy-1.9.7

2019-05-09 Thread William Lallemand
r target 'haproxy' failed > make: *** [haproxy] Error 1 > > Eyeballing the code I think it's because USE_THREAD is not defined and > __ha_cas_dw is only defined when USE_THREAD is defined > > HAProxy is not supposed to build without a TARGET argument, I can't reproduce your problem, what is your complete make line? -- William Lallemand

Re: [PATCH 1/2] BUG/MINOR: mworker: Prevent potential use-after-free in mworker_env_to_proc_list

2019-05-14 Thread William Lallemand
v branch. No backport required. Sorry, I'm only reading this mail and I already fixed this one in the master! -- William Lallemand

Re: [PATCH v2 1/1] BUG/MINOR: mworker: Fix memory leak of mworker_proc members

2019-05-22 Thread William Lallemand
_proc *child) > +{ > + if (child == NULL) > + return; Thanks, merged. -- William Lallemand

Re: [PR] MINOR: doc: Remove -Ds option in man page

2019-06-13 Thread William Lallemand
per binary, that's why it was removed when the systemd wrapper was replaced by the master worker mode. Depending on your usage, you probably want to use the master worker mode (-W), which will allow multi-process mode in foreground. Patch applied, thanks. -- William Lallemand

Re: Idea + question regarding the build targets

2019-06-14 Thread William Lallemand
) Could be something called "linux-recommended". -- William Lallemand

Re: Does anyone still use examples/haproxy.spec ?

2019-06-19 Thread William Lallemand
ase. If we want to reintroduce it, we really need to update it. Regards, -- William Lallemand

Re: [PATCH 4/9] BUG/MINOR: mworker: Fix segmentation fault during cfgparse

2019-06-24 Thread William Lallemand
bug was introduced in 9a1ee7ac31c56fd7d881adf2ef4659f336e50c9f. > This fix must be backported to HAProxy 2.0. Thanks, merged. Also, I renamed the tag from "mworker" to "mworker-prog". -- William Lallemand

Re: haproxy 2.0 - stretch - libgcc_s.so.1

2019-06-24 Thread William Lallemand
on the list before and searched my INBOX. > > Best regards > Tim Düsterhus > Hi, It happens to me with the latest commit in 1.9 branch. You need a nbthread > 1 to reproduce. Regards, -- William Lallemand

Re: haproxy 2.0 - stretch - libgcc_s.so.1

2019-06-24 Thread William Lallemand
On Mon, Jun 24, 2019 at 07:42:44PM +0200, William Lallemand wrote: > On Mon, Jun 24, 2019 at 07:38:03PM +0200, Tim Düsterhus wrote: > > Vincent, > > > > Am 24.06.19 um 19:32 schrieb Vincent Bernat: > > > with 1.9.8. Do you know what could have changed? > > &g

Re: Invalid blank line in master socket output when run in non-admin level

2019-06-29 Thread William Lallemand
t process. I'll take a look at the code on monday to see if it's easily fixable. Regards, -- William Lallemand

Re: Invalid blank line in master socket output when run in non-admin level

2019-07-01 Thread William Lallemand
Hi Daniel, On Sat, Jun 29, 2019 at 03:16:06PM +0200, William Lallemand wrote: > > I'll take a look at the code on monday to see if it's easily fixable. > The attached patch should fix your problem. Regards, -- William Lallemand >From 3dffa809d35e6380a958d657e10b9c18858

Re: Invalid blank line in master socket output when run in non-admin level

2019-07-01 Thread William Lallemand
On Mon, Jul 01, 2019 at 11:16:21AM +0200, William Lallemand wrote: > Hi Daniel, > > On Sat, Jun 29, 2019 at 03:16:06PM +0200, William Lallemand wrote: > > > > I'll take a look at the code on monday to see if it's easily fixable. > > > >

Re: [PATCH] MEDIUM: config: Add user/group options to program section

2019-07-15 Thread William Lallemand
On Fri, Jul 12, 2019 at 11:50:26AM +0800, Andrew Heberle wrote: > This patch adds "user" and "group" config options to the "program" > section so the configured command can be run as a different user. Thanks, I just pushed it in the master. -- William Lallemand

Re: load-server-state-from-file "automatic" transfer?

2019-07-25 Thread William Lallemand
e configuration, it is not doable yet using the internal socketpair of the master-worker model. -- William Lallemand

Re: load-server-state-from-file "automatic" transfer?

2019-07-25 Thread William Lallemand
On Thu, Jul 25, 2019 at 10:23:24AM +0200, Aleksandar Lazic wrote: > Hi. > > Am 25.07.2019 um 10:06 schrieb William Lallemand: > > On Thu, Jul 25, 2019 at 08:07:45AM +0200, Baptiste wrote: > >> Hi Daniel, > >> > >> You're making a good point. Use th

Re: load-server-state-from-file "automatic" transfer?

2019-07-30 Thread William Lallemand
On Mon, Jul 29, 2019 at 11:28:29AM +0200, Daniel Schneller wrote: > Hi! > > Thanks for taking a look and explaining. Should I create a ticket on GitHub > for this? > > Daniel > > Sure, you can fill a feature request so we don't lose it. -- William Lallemand

<    1   2   3   4   5   6   7   8   >