]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: always fail when setrlimit fails
authorWilliam Dauchy <w.dauchy@criteo.com>
Sun, 27 Oct 2019 19:08:11 +0000 (20:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Oct 2019 16:42:27 +0000 (17:42 +0100)
commit0fec3ab7bf114e69cde6d6bafac282b90535221d
tree3fceddf6ec9e795888f01ab0b4f83d85d7bdfce6
parentec73098171aba543cba0072d7f1fbfe1588fb837
MINOR: init: always fail when setrlimit fails

this patch introduces a strict-limits parameter which enforces the
setrlimit setting instead of a warning. This option can be forcingly
disable with the "no" keyword.
The general aim of this patch is to avoid bad surprises on a production
environment where you change the maxconn for example, a new fd limit is
calculated, but cannot be set because of sysfs setting. In that case you
might want to have an explicit failure to be aware of it before seeing
your traffic going down. During a global rollout it is also useful to
explictly fail as most progressive rollout would simply check the
general health check of the process.

As discussed, plan to use the strict by default mode starting from v2.3.

Signed-off-by: William Dauchy <w.dauchy@criteo.com>
doc/configuration.txt
include/types/global.h
src/cfgparse-global.c
src/cfgparse.c
src/haproxy.c