.
Can you try this patch ?
--
William Lallemand
From 7d40e9f6d3f8f1c5ce09e264226a1e5e369d70a0 Mon Sep 17 00:00:00 2001
From: William Lallemand wlallem...@exceliance.fr
Date: Thu, 9 Aug 2012 16:41:35 +0200
Subject: [PATCH] BUG/MINOR: to_log erased with unique-id-format
curproxy-to_log was reset
Help will be greatly appreciated.
I don't have any problem with your configuration, which version of HAProxy are
you using ?
--
William Lallemand
(-dev12) some bugs were fixed concerning log-format.
--
William Lallemand
Paul
--
William Lallemand
in the log is %ft which add a ~ in SSL. You can use
%f, it's the frontend without ~.
http://cbonte.github.com/haproxy-dconv/configuration-1.5.html#8.2.4
--
William Lallemand
implemented something more relevant, the
unique-id is now generated when a request failed.
--
William Lallemand
From 6c2adb543c54df657e37836fc484a7f4e97ef7e1 Mon Sep 17 00:00:00 2001
From: William Lallemand wlallem...@exceliance.fr
Date: Wed, 28 Aug 2013 15:44:19 +0200
Subject: [PATCH] BUG/MEDIUM
: most of the times, the syslog msg ends
with \n\0\0, other times with \n\n\0 or even \n\n.
I've tracked this down to:
Hello,
I can't reproduce the bug, how did you compile HAProxy?
What is your configuration file?
Thanks,
--
William Lallemand
of digits in
the facility.
Here's a patch with the real size to send :)
--
William Lallemand
From fcf527a2c629b696e8e2fa2993feb5be90b9ef04 Mon Sep 17 00:00:00 2001
From: William Lallemand wlallem...@exceliance.fr
Date: Fri, 30 Aug 2013 14:17:46 +0200
Subject: [PATCH] BUG/MINOR: log: junk
from the logs when empty? And is there a way to
force a or - sign when they are empty, to play nice with log parsers?
Thanks,
Julien
It's a bug, indeed, and thierry's patch is the right way to fix it.
--
William Lallemand
an operator in 'else' (Makefile:206)
*** Parse error: Missing dependency operator (Makefile:207)
*** Parse error: Need an operator in 'else' (Makefile:213)
[...]
You should install and use GNU Make, not the BSD one.
--
William Lallemand
sense (anyone ever dreamed of having haproxy in their
watches ?).
That's good news, we'll finally get ride of these filthy pointers!
--
William Lallemand
Hello,
Here a set of patches implementing http/tcp set-{dst,src}[-port].
The feature can be useful to connect to a IP/port which is defined in a map.
Regards,
--
William Lallemand
>From 4f44c85bd02830d690539b269a4669b6bd251e44 Mon Sep 17 00:00:00 2001
From: William Lallemand <wlallem..
On Tue, May 31, 2016 at 05:28:13PM -0700, Derek Brown wrote:
> I'll give them a try. Are they to be applied to the latest 1.7-dev branch?
>
That's right.
--
William Lallemand
Hi-
>
> I'm wondering if you need any additional information, or if I can provide
> any clarification, to get a response to my query.
>
> Thanks, in advance
> Derek
>
--
William Lallemand
erged. thanks Fred!
> Willy
>
Thanks Fred, that will be really useful!
--
William Lallemand
nheritance.
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
This commit remove the -Ds systemd mode in HAProxy in order to replace
it by a more generic master workers system. It aims to replace entirely
the systemd wrapper in the near future.
The master workers mode implements a new way of managing HAProxy
processes. The master is in charge of parsing the
The master won't change PID anymore in master workers + daemon mode.
---
src/haproxy.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index 5e3028d..e0b6462 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -157,6 +157,8 @@ struct
This is a work in progress set of patches.
The current systemd model works this way:
- systemd-wrapper
` haproxy master
` haproxy child
` haproxy child
` haproxy child
The master workers model will allow you to have the same architecture, but
without the systemd wrapper at the
In Master Workers mode, when the reloading of the configuration fail,
the process is exiting leaving the children without their father.
To handle this, we register an exit function with atexit(3), which is
reexecuting the binary in a special mode. This particular mode of
HAProxy don't reload the
The master process is now able to manage old processes when they didn't
quit on a reload. The master won't exit if every current processes has
left but there are still old process.
There is now a notification message when a child exits, either an old or
a current process.
When every workers have
This behavior allows to reload HAProxy using the master works mode.
It's inherited from the systemd wrapper, when the SIGUSR2 signal is
received, the master process will reexecute itself with the -sf flag
followed by the PIDs of the children.
---
src/haproxy.c | 135
ob 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
: always detach the tcp/http tasks before freeing them
ben51degrees (1):
DOC: Updated 51Degrees git URL to point to a stable version.
--
William Lallemand
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
, 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
om 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 <wlallem...@haproxy.com>
Date: Mon, 19 Jun 2017
copy to his
mail which lead to this.
Please don't continue this thread on the mailing list, thanks.
--
William Lallemand
anks.
>
>
> 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
t know if that's a good idea.
And you don't want your stats to disappear without asking a reload yourself.
> But in any case, I think we need some way of handling this so that site
> interruption is minimal.
>
> -Patrick
--
William Lallemand
listeners" stats socket option and
remove the "no-unused-socket" global option.
It behaves exactly has Willy explain above minus the master process :-)
ps: Master Worker patches are coming soon!
--
William Lallemand
>From 5567d977f722e862c6ba56d65118e094ac28735c Mon Sep 17 00:
Hi again,
On Fri, May 19, 2017 at 11:45:18AM +0200, William Lallemand wrote:
> Hi,
>
> On Thu, May 18, 2017 at 05:25:26PM -0400, Patrick Hemmer wrote:
> > So we had an incident today where haproxy segfaulted and our site went
> > down. Unfortunately we did not capture a c
---
doc/configuration.txt | 16
doc/management.txt| 15 +--
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/doc/configuration.txt b/doc/configuration.txt
index ad7d3a8..5fa49d3 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@
The master-worker will reload itself on SIGUSR2/SIGHUP
It's inherited from the systemd wrapper, when the SIGUSR2 signal is
received, the master process will reexecute itself with the -sf flag
followed by the PIDs of the children.
In the systemd wrapper, the children were using a pipe to notify
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
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
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
Adding Type=forking in the unit file ensure better monitoring from
systemd. During a systemctl start the tool is able to return an error if
it didn't work with this option.
---
contrib/systemd/haproxy.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git
In Master Worker mode, when the reloading of the configuration fail,
the process is exiting leaving the children without their father.
To handle this, we register an exit function with atexit(3), which is
reexecuting the binary in a special mode. This particular mode of
HAProxy don't reload the
This option exits every workers when one of the current workers die.
It allows you to monitor the master process in order to relaunch
everything on a failure.
For example it can be used with systemd and Restart=on-failure in a spec
file.
---
include/types/global.h | 1 +
src/cfgparse.c
This patch ensure that the children will exit when the master quits,
even if the master didn't send any signal.
The master and the workers are connected through a pipe, when the pipe
closes the children leave.
---
src/haproxy.c | 55 +++
1 file
The master worker mode replaces the systemd wrapper, it does not need a
separated binary anymore, everything is builtin.
This mode will launch a "master" which will monitor the "workers". Using this
mode, you can reload HAProxy directly by sending a SIGUSR2 signal to the
master. The master-worker
Will do.
> Otherwise the series looks quite good, it would be nice to get some
> feedback especially from systemd hostages^Wusers (my comments above
> will not affect their experience unless they're really unlucky).
>
> Thanks!
> Willy
>
I'll send you another batch with the fixes, and maybe some cleanup. In the
meanwhile people can still try them.
--
William Lallemand
tuate
between 1 and 2 kB/s.
--
William Lallemand
This option exits every workers when one of the current workers die.
It allows you to monitor the master process in order to relaunch
everything on a failure.
For example it can be used with systemd and Restart=on-failure in a spec
file.
---
include/types/global.h | 1 +
src/cfgparse.c
Adding Type=forking in the unit file ensure better monitoring from
systemd. During a systemctl start the tool is able to return an error if
it didn't work with this option.
---
contrib/systemd/haproxy.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git
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
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
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
The master-worker will reload itself on SIGUSR2/SIGHUP
It's inherited from the systemd wrapper, when the SIGUSR2 signal is
received, the master process will reexecute itself with the -sf flag
followed by the PIDs of the children.
In the systemd wrapper, the children were using a pipe to notify
In Master Worker mode, when the reloading of the configuration fail,
the process is exiting leaving the children without their father.
To handle this, we register an exit function with atexit(3), which is
reexecuting the binary in a special mode. This particular mode of
HAProxy don't reload the
Those minor problems have been corrected in this new patchset.
Please merge them if that's ok for you.
---
doc/configuration.txt | 16
doc/management.txt| 15 +--
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/doc/configuration.txt b/doc/configuration.txt
index ad7d3a8..5fa49d3 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@
This patch ensure that the children will exit when the master quits,
even if the master didn't send any signal.
The master and the workers are connected through a pipe, when the pipe
closes the children leave.
---
src/haproxy.c | 60 +++
1
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
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
; > bad:
> >> haproxy -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
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) {
; > bad:
> >> haproxy -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
gent 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
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
orked 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
ive 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
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
at least one report for this in 1.7.
>
>
>
> Thanks,
> Lukas
Sure, it will be backported.
--
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
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 patch didn't
make it to the master
m the master-worker code, however that does not explain why the
old
worker does not quit.
--
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
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/configuration.html#3.1-nbproc
> [2
worker_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
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
+0100, PiBa-NL wrote:
> Thanks for the review, new patch attached that basically incorporates
> all your comments.
> Regards,
> PiBa-NL / Pieter
>
--
William Lallemand
ive signals.
I spot two other 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
we can integrate the -Ws command in the unit file without changing the
behavior of the normal option.
Cheers,
--
William Lallemand
ait for session to be finished. It will cause the restart to behave like
the reload but with a PID change.
Cheers,
--
William Lallemand
On Mon, Nov 20, 2017 at 03:58:35PM +0100, Tim Düsterhus wrote:
> From: Tim Duesterhus <t...@bastelstu.be>
>
> This patch adds support for `Type=notify` to the systemd unit.
Looks good to me, thanks!
Willy can you merge it?
--
William Lallemand
tly 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
g/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
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 exampl
On Tue, Nov 21, 2017 at 11:12:45AM +0100, Lukas Tribus wrote:
> Hello,
>
> 2017-11-21 8:39 GMT+01:00 William Lallemand <wlallem...@haproxy.com>:
>
> That's not it, the hold-off timer is only a consequence of this
> problem. I believe the notification does not work in
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
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
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
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
@@
A few patches which help using the pidfile in master-worker mode.
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
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
---
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
old processes did not receive the SIGTTOU for an unknown reason,
or did not unbind once it received the signal.
Maybe you could try to compare what's happening on your solaris-like system and
your ubuntu with the -dR option, using strace on linux and truss on solaris.
Regards,
--
William Lallemand
setsid();
> + }
> +
> mworker_wait();
> /* should never get there */
> exit(EXIT_FAILURE);
Cheers,
--
William Lallemand
ha_alert("exit-on-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
the SIGTTOU
> signal from the master (200 times), so the worker must not have been
> unbinding.
>
Okay, so it looks like that the unbinding with SIGTOUT does not work on your
OS, but the seamless reload seems to work...
According to the code commentary that's a known problem on Solaris, maybe we
should add a note in the documentation about it.
Regards,
--
William Lallemand
s post is not correct for the
seamless reload (-x + expose-fd), but only for a "classic" reload.
During a seamless reload, the new process try to get the FDs of the listeners
using the unix socket.
Did you try the seamless reload using -x without the master-worker?
--
William Lallemand
In commit abbf607 ("MEDIUM: cli: Add payload support") some cli keywords
without usage message have been added at the beginning of the keywords
array.
cli_gen_usage_usage_msg() use the kw->usage == NULL to stop generating
the usage message for the current keywords array. With those keywords at
last process
> > but I sometimes get: "Pid: 28271"(!) which is a > 24 hours old
> > process.
> >
> > Is there something we are doing wrongly?
>
> After some more testing, I don't have this issue using haproxy v1.8.8
> (rollbacked for > 12 hours). I hope I don't speak too fast.
>
Hi,
I managed to reproduce something similar with the 1.8.8 version. It looks like
letting a socat connected to the socket helps.
I'm looking into the code to see what's happening.
--
William Lallemand
BUG/MEDIUM: http: don't always abort transfers on CF_SHUTR
BUG/MEDIUM: ssl: properly protect SSL cert generation
--
William Lallemand
The bug happens with an existing entry, when you try to overwrite the
value with wrong data, for example, a string when the type is INT.
The code path was not secure and tried to set *err and *merr while
err = merr = NULL when performing an http action.
Must be backported in 1.6, 1.7, 1.8.
---
> > only increases verbosity in case of problem, do you want it to be
> > backported to 1.8 as well ?
>
>
> It should great !
>
> Thierry
Backported to 1.8.
--
William Lallemand
On Fri, Jun 08, 2018 at 02:10:44PM +0200, William Dauchy wrote:
> On Thu, Jun 07, 2018 at 11:50:45AM +0200, William Lallemand wrote:
> > Sorry for the late reply, I manage to reproduce and fix what seams to be
> > the bug.
> > The signal management was not handled c
1 - 100 of 679 matches
Mail list logo