]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
14 years ago[MINOR] log: ability to override the syslog tag
Kevinm [Wed, 22 Dec 2010 16:08:21 +0000 (16:08 +0000)] 
[MINOR] log: ability to override the syslog tag

One of the requirements we have is to run multiple instances of haproxy on a
single host; this is so that we can split the responsibilities (and change
permissions) between product teams. An issue we ran up against is how we
would distinguish between the logs generated by each instance. The solution
we came up with (please let me know if there is a better way) is to override
the application tag written to syslog. We can then configure syslog to write
these to different files.

I have attached a patch adding a global option 'log-tag' to override the
default syslog tag 'haproxy' (actually defaults to argv[0]).

14 years ago[MINOR] tcp: add support for dynamic MSS setting
Willy Tarreau [Fri, 24 Dec 2010 14:26:39 +0000 (15:26 +0100)] 
[MINOR] tcp: add support for dynamic MSS setting

By passing a negative value to the "mss" argument of "bind" lines, it
becomes possible to subtract this value to the MSS advertised by the
client, which results in segments smaller than advertised. The effect
is useful with some TCP stacks which ACK less often when segments are
not full, because they only ACK every other full segment as suggested
by RFC1122.

NOTE: currently this has no effect on Linux kernel 2.6, a kernel patch
is still required to change the MSS of established connections.

14 years ago[MINOR] log: add support for passing the forwarded hostname
Joe Williams [Wed, 29 Dec 2010 16:05:48 +0000 (17:05 +0100)] 
[MINOR] log: add support for passing the forwarded hostname

Haproxy does not include the hostname rather the IP of the machine in
the syslog headers it sends. Unfortunately this means that for each log
line rsyslog does a reverse dns on the client IP and in the case of
non-routable IPs one gets the public hostname not the internal one.

While this is valid according to RFC3164 as one might imagine this is
troublsome if you have some machines with public IPs, internal IPs, no
reverse DNS entries, etc and you want a standardized hostname based log
directory structure. The rfc says the preferred value is the hostname.

This patch adds a global "log-send-hostname" statement which accepts an
optional string to force the host name. If unset, the local host name
is used.

14 years ago[BUG] http: fix http-pretend-keepalive and httpclose/tunnel mode
Cyril Bonté [Wed, 29 Dec 2010 08:36:56 +0000 (09:36 +0100)] 
[BUG] http: fix http-pretend-keepalive and httpclose/tunnel mode

Since haproxy 1.4.9, combining option httpclose and option
http-pretend-keepalive can leave the connections opened until the backend
keep-alive timeout is reached, providing bad performances.
The same can occur when the proxy is in tunnel mode.

This patch ensures that the server side connection is closed after the
response and ignore http-pretend-keepalive in tunnel mode.

14 years ago[BUG] session: release slot before processing pending connections
Willy Tarreau [Wed, 29 Dec 2010 13:32:28 +0000 (14:32 +0100)] 
[BUG] session: release slot before processing pending connections

When a connection error is encountered on a server and the server's
connection pool is full, pending connections are not woken up because
the current connection is still accounted for on the server, so it
still appears full. This becomes visible on a server which has
"maxconn 1" because the pending connections will only be able to
expire in the queue.

Now we take care of releasing our current connection before trying to
offer it to another pending request, so that the server can accept a
next connection.

This patch should be backported to 1.4.

14 years ago[CRITICAL] session: correctly leave turn-around and queue states on abort
Willy Tarreau [Wed, 29 Dec 2010 13:03:02 +0000 (14:03 +0100)] 
[CRITICAL] session: correctly leave turn-around and queue states on abort

When a client connection aborts while the server-side connection is in
turn-around after a failed connection attempt, the turn-around timeout
is reset in shutw() but the state is not changed. The session then
remains stuck in this state forever. Change the QUE and TAR states to
DIS just as we do for CER to fix this.

This patch should be backported to 1.4.

14 years ago[BUG] http: fix incorrect error reporting during data transfers
Willy Tarreau [Wed, 29 Dec 2010 10:23:27 +0000 (11:23 +0100)] 
[BUG] http: fix incorrect error reporting during data transfers

We've had several issues related to data transfers. First, if a
client aborted an upload before the server started to respond, it
would get a 502 followed by a 400. The same was true (in the other
way around) if the server suddenly aborted while the client was
uploading the data.

The flags reported in the logs were misleading. Request errors could
be reported while the transfer was stopped during the data phase. The
status codes could also be overwritten by a 400 eventhough the start
of the response was transferred to the client.

The stats were also wrong in case of data aborts. The server or the
client could sometimes be miscredited for being the author of the
abort depending on where the abort was detected. Some client aborts
could also be accounted as request errors and some server aborts as
response errors.

Now it seems like all such issues are fixed. Since we don't have a
specific state for data flowing from the client to the server
before the server responds, we're still counting the client aborted
transfers as "CH", and they become "CD" when the server starts to
respond. Ideally a "P" state would be desired.

This patch should be backported to 1.4.

14 years ago[CLEANUP] frontend: only apply TCP-specific settings to TCP/TCP6 sockets
Willy Tarreau [Fri, 24 Dec 2010 13:49:37 +0000 (14:49 +0100)] 
[CLEANUP] frontend: only apply TCP-specific settings to TCP/TCP6 sockets

It's useless to apply keep-alive or lingering to non-TCP sockets.

14 years ago[BUG] http: analyser optimizations broke pipelining
Willy Tarreau [Fri, 17 Dec 2010 06:13:42 +0000 (07:13 +0100)] 
[BUG] http: analyser optimizations broke pipelining

HTTP pipelining currently needs to monitor the response buffer to wait
for some free space to be able to send a response. It was not possible
for the HTTP analyser to be called based on response buffer activity.
Now we introduce a new buffer flag BF_WAKE_ONCE which is set when the
HTTP request analyser is set on the response buffer and some activity
is detected. This is not clean at all but once of the only ways to fix
the issue before we make it possible to register events for analysers.

Also it appeared that one realign condition did not cover all cases.

14 years ago[MINOR] acl: add be_id/srv_id to match backend's and server's id
Hervé COMMOWICK [Wed, 15 Dec 2010 13:04:51 +0000 (14:04 +0100)] 
[MINOR] acl: add be_id/srv_id to match backend's and server's id

These ones can be useful in responses.

14 years ago[MINOR] add warnings on features not compatible with multi-process mode
Cyril Bonté [Tue, 14 Dec 2010 21:48:49 +0000 (22:48 +0100)] 
[MINOR] add warnings on features not compatible with multi-process mode

Using haproxy in multi-process mode (nbproc > 1), some features can be
not fully compatible or not work at all. haproxy will now display a warning on
startup for :
- appsession
- sticking rules
- stats / stats admin
- stats socket
- peers (fatal error in that case)

14 years ago[DOC] fix ignore-persist documentation
Cyril Bonté [Tue, 14 Dec 2010 21:48:23 +0000 (22:48 +0100)] 
[DOC] fix ignore-persist documentation

During the documentation of the "ignore-persist" keyword, I documented an
invalid "option ignore-persist" and forgot to remove it. It's time to fix it.

14 years ago[DOC] fix a minor typo
Cyril Bonté [Tue, 14 Dec 2010 21:47:51 +0000 (22:47 +0100)] 
[DOC] fix a minor typo

should be httpclose instead of http_close

14 years ago[MINOR] stats: add global event ID and count
Willy Tarreau [Sun, 12 Dec 2010 13:00:34 +0000 (14:00 +0100)] 
[MINOR] stats: add global event ID and count

This counter will help quickly spot whether there are new errors or not.
It is also assigned to each capture so that a script can keep trace of
which capture was taken when.

14 years ago[MINOR] http: capture incorrectly chunked message bodies
Willy Tarreau [Sun, 12 Dec 2010 12:10:11 +0000 (13:10 +0100)] 
[MINOR] http: capture incorrectly chunked message bodies

It is possible to block on incorrectly chunked requests or responses,
but this becomes very hard to debug when it happens once in a while.
This patch adds the ability to also capture incorrectly chunked requests
and responses. The chunk will appear in the error buffer and will be
verifiable with the usual "show errors". The incorrect byte will match
the error location.

14 years ago[MINOR] http: support wrapping messages in error captures
Willy Tarreau [Sun, 12 Dec 2010 12:09:08 +0000 (13:09 +0100)] 
[MINOR] http: support wrapping messages in error captures

Error captures did only support contiguous messages. This is annoying
for capturing chunking errors, so let's ensure the function is able to
copy wrapped messages.

14 years ago[BUG] stream_interface: truncate buffers when sending error messages
Willy Tarreau [Sun, 12 Dec 2010 12:06:00 +0000 (13:06 +0100)] 
[BUG] stream_interface: truncate buffers when sending error messages

When an error message is returned to a client, all buffer contents
were left intact. Since the analysers were removed, the potentially
invalid data that were read had a chance to be sent too.

Now we ensure we only keep the already scheduled data in the buffer
and we truncate it after that. That means that responses with data
that must be blocked will really be blocked, and that incorrectly
chunked data will be stopped at the point where the chunking fails.

14 years ago[BUG] http chunking: don't report a parsing error on connection errors
Willy Tarreau [Sun, 12 Dec 2010 11:50:05 +0000 (12:50 +0100)] 
[BUG] http chunking: don't report a parsing error on connection errors

When haproxy parses chunk-encoded data that are scheduled to be sent, it is
possible that the other end is closed (mainly due to a client abort returning
as an error). The message state thus changes to HTTP_MSG_ERROR and the error
is reported as a chunk parsing error ("PD--") while it is not. Detect this
case before setting the flags and set the appropriate flag in this case.

14 years ago[MINOR] stats: report HTTP message state and buffer flags in error dumps
Willy Tarreau [Sun, 12 Dec 2010 11:46:33 +0000 (12:46 +0100)] 
[MINOR] stats: report HTTP message state and buffer flags in error dumps

Debugging parsing errors can be greatly improved if we know what the parser
state was and what the buffer flags were (especially for closed inputs/outputs
and full buffers). Let's add that to the error snapshots.

14 years ago[DOC] fix another typo in the doc
Willy Tarreau [Sat, 11 Dec 2010 19:19:38 +0000 (20:19 +0100)] 
[DOC] fix another typo in the doc

Config check is -c, not -d. Reported by David Dunaway.

14 years ago[DOC] fix minor typos reported recently in the peers section
Willy Tarreau [Mon, 6 Dec 2010 21:59:17 +0000 (22:59 +0100)] 
[DOC] fix minor typos reported recently in the peers section

14 years ago[OPTIM] http: don't send each chunk in a separate packet
Willy Tarreau [Wed, 1 Dec 2010 23:37:14 +0000 (00:37 +0100)] 
[OPTIM] http: don't send each chunk in a separate packet

When forwarding chunk-encoded data, each chunk gets a TCP PUSH flag when
going onto the wire simply because the send() function does not know that
some data remain after it (next chunk). Now we set the BF_EXPECT_MORE flag
on the buffer if the chunk size is not null. That way we can reduce the
number of packets sent, which is particularly noticeable when forwarding
compressed data, especially as it requires less ACKs from the client.

14 years ago[BUG] http: do not re-enable the PROXY analyser on keep-alive
Willy Tarreau [Wed, 24 Nov 2010 15:22:09 +0000 (16:22 +0100)] 
[BUG] http: do not re-enable the PROXY analyser on keep-alive

The PROXY analyser is connection-oriented and must only be set once. When
an HTTP transaction is done, we must not re-enable it.

14 years ago[DOC] update roadmap file
Willy Tarreau [Wed, 24 Nov 2010 15:21:56 +0000 (16:21 +0100)] 
[DOC] update roadmap file

14 years ago[MEDIUM] hash: add support for an 'avalanche' hash-type
Willy Tarreau [Wed, 24 Nov 2010 14:04:29 +0000 (15:04 +0100)] 
[MEDIUM] hash: add support for an 'avalanche' hash-type

When the number of servers is a multiple of the size of the input set,
map-based hash can be inefficient. This typically happens with 64
servers when doing URI hashing. The "avalanche" hash-type applies an
avalanche hash before performing a map lookup in order to smooth the
distribution. The result is slightly less smooth than the map for small
numbers of servers, but still better than the consistent hashing.

14 years ago[CLEANUP] hash: move the avalanche hash code globally available
Willy Tarreau [Wed, 24 Nov 2010 13:01:45 +0000 (14:01 +0100)] 
[CLEANUP] hash: move the avalanche hash code globally available

We'll use this hash at other places, let's make it globally available.
The function has also been renamed because its "chash_hash" name was
not appropriate.

14 years ago[BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4
Willy Tarreau [Sun, 28 Nov 2010 07:28:15 +0000 (08:28 +0100)] 
[BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4

Gcc 4.4 enables strict aliasing by default, resuling in complaints
when casting struct sockaddr_storage to sockaddr_in. Not only doing
this does not provide any noticeable performance improvement, it also
presents a risk of strange bugs even when the compiler does not emit
a warning, so let's disable this optimization !

14 years ago[BUILD] add the CPU=native and ARCH=32/64 build options
Willy Tarreau [Sun, 28 Nov 2010 06:41:00 +0000 (07:41 +0100)] 
[BUILD] add the CPU=native and ARCH=32/64 build options

Hank A. Paulson suggested to add CPU=native to optimize the code for
the build machine. This makes sense in a lot of situations. Since it
is often possible to have both 32 and 64 bits supported on recent
systems, the ARCH=32 and ARCH=64 build options were also added.

14 years ago[BUG] http: correctly update the header list when removing two consecutive headers
Willy Tarreau [Sun, 28 Nov 2010 05:57:24 +0000 (06:57 +0100)] 
[BUG] http: correctly update the header list when removing two consecutive headers

When a header is removed, the previous header's next pointer is updated
to reflect the next of the current header. However, when cycling through
the loop, we update the prev pointer to point to the deleted header, which
means that if we delete another header, it's the deleted header's next
pointer that will be updated, leaving the deleted header in the list with
a null length, which is forbidden.

We must just not update the prev pointer after a removal.

This bug was present when either "reqdel" and "rspdel" removed two consecutive
headers. It could also occur when removing cookies in either requests or
responses, but since headers were the last header processing, the issue
remained unnoticed.

Issue reported by Hank A. Paulson.

This fix must be ported to 1.4 and possibly 1.3.

14 years ago[CRITICAL] cookies: mixing cookies in indirect mode and appsession can crash the...
Willy Tarreau [Wed, 24 Nov 2010 17:31:28 +0000 (18:31 +0100)] 
[CRITICAL] cookies: mixing cookies in indirect mode and appsession can crash the process

Cookies in indirect mode are removed from the cookie header. Three pointers
ought to be updated when appsession cookies are processed next, but were not.
The result is that a memcpy() can be called with a negative value causing the
process to crash. It is not sure whether this can be remotely exploited or not.
(cherry picked from commit c5f3749aa3ccfdebc4992854ea79823d26f66213)

14 years ago[BUG] appsession: fix possible double free in case of out of memory
Willy Tarreau [Fri, 19 Nov 2010 10:29:06 +0000 (11:29 +0100)] 
[BUG] appsession: fix possible double free in case of out of memory

In out of memory conditions, the ->destroy function would free all
possibly allocated pools from the current appsession, including those
that were not yet allocated nor assigned, which used to point to a
previous allocation, obviously resulting in a segfault.
(cherry picked from commit 75eae485921d3a6ce197915c769673834ecbfa5c)

14 years ago[BUG] capture: do not capture a cookie if there is no memory left
Willy Tarreau [Fri, 19 Nov 2010 10:27:18 +0000 (11:27 +0100)] 
[BUG] capture: do not capture a cookie if there is no memory left

In case of out of memory, it was possible to write to a null pointer
when capturing response cookies due to a missing "else" block. The
request handling was fine though.
(cherry picked from commit 62e3604d7dd27741c0b4c9e27d9e7c73495dfc32)

14 years ago[BUG] debug: report the correct poller list in verbose mode
Willy Tarreau [Fri, 19 Nov 2010 09:20:36 +0000 (10:20 +0100)] 
[BUG] debug: report the correct poller list in verbose mode

When running with -vv or -V -d, the list of usable polling systems
is reported. The final selection did not take into account the
possible failures during the tests, which is misleading and could
make one think that a non-working poller will be used, while it is
not the case. Fix that to really report the correct ones.
(cherry picked from commit 6d0e354e0171f08b7b3868ad2882c3663bd068a7)

14 years ago[CLEANUP] unix sockets : move create_uxst_socket() in uxst_bind_listener()
Cyril Bonté [Sun, 14 Nov 2010 16:03:19 +0000 (17:03 +0100)] 
[CLEANUP] unix sockets : move create_uxst_socket() in uxst_bind_listener()

The code of create_uxst_socket() is moved in uxst_bind_listener() so that we
don't need to pass a lot of parameters, as it was only called there.

14 years ago[MINOR] unix sockets : inherits the backlog size from the listener
Cyril Bonté [Sun, 14 Nov 2010 16:03:18 +0000 (17:03 +0100)] 
[MINOR] unix sockets : inherits the backlog size from the listener

Since unix sockets are supported for bind, the default backlog size was not
enough to accept the traffic. The size is now inherited from the listener
to behave like the tcp listeners.

This also affects the "stats socket" backlog, which is now determined by
"stats maxconn".

14 years ago[OPTIM] linux: add support for bypassing libc to force using vsyscalls
Willy Tarreau [Sun, 14 Nov 2010 16:09:33 +0000 (17:09 +0100)] 
[OPTIM] linux: add support for bypassing libc to force using vsyscalls

Some distros' libc are built for CPUs earlier than i686 and as such do
not offer support for Linux kernel's faster vsyscalls. This code adds
a new build option USE_VSYSCALLS to bypass libc for most commonly used
system calls. A net gain of about 10% can be observed with this change
alone.

It only works when /proc/sys/abi/vsyscall32 equals exactly 2. When it's
set to 1, the VDSO is randomized and cannot be used.

14 years ago[BUILD] pattern: use 'int' instead of 'int32_t'
Willy Tarreau [Sun, 14 Nov 2010 13:24:27 +0000 (14:24 +0100)] 
[BUILD] pattern: use 'int' instead of 'int32_t'

Ross West reported that int32_t breaks compilation on FreeBSD. Since an
int is 32-bit on all supported platforms and we already rely on that,
change the type.

14 years ago[DOC] update ROADMAP file
Willy Tarreau [Sun, 14 Nov 2010 13:23:22 +0000 (14:23 +0100)] 
[DOC] update ROADMAP file

move what was done and add a few collected wishes.

14 years ago[RELEASE] Released version 1.5-dev3
Willy Tarreau [Thu, 11 Nov 2010 22:29:35 +0000 (23:29 +0100)] 
[RELEASE] Released version 1.5-dev3

Released version 1.5-dev3 with the following main changes :
    - [DOC] fix http-request documentation
    - [MEDIUM] enable/disable servers from the stats web interface
    - [MEDIUM] stats: add an admin level
    - [DOC] stats: document the "stats admin" statement
    - [MINOR] startup: print the proxy socket which caused an error
    - [CLEANUP] Remove unneeded chars allocation
    - [MINOR] config: detect options not supported due to compilation options
    - [MINOR] Add pattern's fetchs payload and payload_lv
    - [MINOR] frontend: improve accept-proxy header parsing
    - [MINOR] frontend: add tcpv6 support on accept-proxy bind
    - [MEDIUM] Enhance message errors management on binds
    - [MINOR] Manage unix socket source field on logs
    - [MINOR] Manage unix socket source field on session dump on sock stats
    - [MINOR] Support of unix listener sockets for debug and log event messages on frontend.c
    - [MINOR] Add some tests on sockets family for port remapping and mode transparent.
    - [MINOR] Manage socket type unix for some logs
    - [MINOR] Enhance controls of socket's family on acls and pattern fetch
    - [MINOR] Support listener's sockets unix on http logs.
    - [MEDIUM] Add supports of bind on unix sockets.
    - [BUG] stick table purge failure if size less than 255
    - [BUG] stick table entries expire on counters updates/read or show table, even if there is no "expire" parameter
    - [MEDIUM] Implement tcp inspect response rules
    - [DOC] tcp-response content and inspect
    - [MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type
    - [DOC] acls rep_ssl_hello and req_ssl_hello
    - [MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy if data from protected areas need to be manipulated.
    - [DOC] new type binary in stick-table
    - [DOC] stick store-response and new patterns payload and payload_lv
    - [MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command
    - [MEDIUM] Create updates tree on stick table to manage sync.
    - [MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h for sync stick table management
    - [MEDIUM] Manage peers section parsing and stick table registration on peers.
    - [MEDIUM] Manage soft stop on peers proxy
    - [DOC] add documentation for peers section
    - [MINOR] checks: add support for LDAPv3 health checks
    - [MINOR] add better support to "mysql-check"
    - [BUG] Restore info about available active/backup servers
    - [CONTRIB] Update haproxy.pl
    - [CONTRIB] Update Cacti Tempates
    - [CONTRIB] add templates for Cacti.
    - [BUG] http: don't consider commas as a header delimitor within quotes
    - [MINOR] support a global jobs counter
    - [DOC] add a summary about cookie incompatibilities between specs and browsers
    - [DOC] fix description of cookie "insert" and "indirect" modes
    - [MEDIUM] http: fix space handling in the request cookie parser
    - [MEDIUM] http: fix space handling in the response cookie parser
    - [DOC] fix typo in the queue() definition (backend, not frontend)
    - [BUG] deinit: unbind listeners before freeing them
    - [BUG] stream_interface: only call si->release when both dirs are closed
    - [MEDIUM] buffers: rework the functions to exchange between SI and buffers
    - [DOC] fix typo in the avg_queue() and be_conn() definition (backend, not frontend)
    - [MINOR] halog: add '-tc' to sort by termination codes
    - [MINOR] halog: skip non-traffic logs for -st and -tc
    - [BUG] stream_sock: cleanly disable the listener in case of resource shortage
    - [BUILD] stream_sock: previous fix lacked the #include, causing a warning.
    - [DOC] bind option is "defer-accept", not "defer_accept"
    - [DOC] missing index entry for http-check send-state
    - [DOC] tcp-request inspect-delay is for backends too
    - [BUG] ebtree: string_equal_bits() could return garbage on identical strings
    - [BUG] stream_sock: try to flush any extra pending request data after a POST
    - [BUILD] proto_http: eliminate some build warnings with gcc-2.95
    - [MEDIUM] make it possible to combine http-pretend-keepalived with httpclose
    - [MEDIUM] tcp-request : don't wait for inspect-delay to expire when the buffer is full
    - [MEDIUM] checks: add support for HTTP contents lookup
    - [TESTS] add test-check-expect to test various http-check methods
    - [MINOR] global: add "tune.chksize" to change the default check buffer size
    - [MINOR] cookie: add options "maxidle" and "maxlife"
    - [MEDIUM] cookie: support client cookies with some contents appended to their value
    - [MINOR] http: make some room in the transaction flags to extend cookies
    - [MINOR] cookie: add the expired (E) and old (O) flags for request cookies
    - [MEDIUM] cookie: reassign set-cookie status flags to store more states
    - [MINOR] add encode/decode function for 30-bit integers from/to base64
    - [MEDIUM] cookie: check for maxidle and maxlife for incoming dated cookies
    - [MEDIUM] cookie: set the date in the cookie if needed
    - [DOC] document the cookie maxidle and maxlife parameters
    - [BUG] checks: don't log backend down for all zero-weight servers
    - [MEDIUM] checks: set server state to one state from failure when leaving maintenance
    - [BUG] config: report correct keywords for "observe"
    - [MINOR] checks: ensure that we can inherit binary checks from the defaults section
    - [MINOR] acl: add the http_req_first match
    - [DOC] fix typos about bind-process syntax
    - [BUG] cookie: correctly unset default cookie parameters
    - [MINOR] cookie: add support for the "preserve" option
    - [BUG] ebtree: fix duplicate strings insertion
    - [CONTRIB] halog: report per-url counts, errors and times
    - [CONTRIB] halog: minor speed improvement in timer parser
    - [MINOR] buffers: add a new request analyser flag for PROXY mode
    - [MINOR] listener: add the "accept-proxy" option to the "bind" keyword
    - [MINOR] standard: add read_uint() to parse a delimited unsigned integer
    - [MINOR] standard: change arg type from const char* to char*
    - [MINOR] frontend: add a new analyser to parse a proxied connection
    - [MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections
    - [DOC] add the proxy protocol's specifications
    - [DOC] document the 'accept-proxy' bind option
    - [MINOR] cfgparse: report support of <path> for the 'bind' statements
    - [DOC] add references to unix socket handling
    - [MINOR] move MAXPATHLEN definition to compat.h
    - [MEDIUM] unix sockets: cleanup the error reporting path
    - [BUG] session: don't stop forwarding of data upon last packet
    - [CLEANUP] accept: replace some inappropriate Alert() calls with send_log()
    - [BUILD] peers: shut a printf format warning (key_size is a size_t)
    - [BUG] accept: don't close twice upon error
    - [OPTIM] session: don't recheck analysers when buffer flags have not changed
    - [OPTIM] stream_sock: don't clear FDs that are already cleared
    - [BUG] proto_tcp: potential bug on pattern fetch dst and dport

14 years ago[OPTIM] stream_sock: don't clear FDs that are already cleared
Willy Tarreau [Thu, 11 Nov 2010 22:08:17 +0000 (23:08 +0100)] 
[OPTIM] stream_sock: don't clear FDs that are already cleared

We can on average two calls to __fd_clr() per session by avoiding to
call it unnecessarily.

14 years ago[OPTIM] session: don't recheck analysers when buffer flags have not changed
Willy Tarreau [Thu, 11 Nov 2010 13:28:47 +0000 (14:28 +0100)] 
[OPTIM] session: don't recheck analysers when buffer flags have not changed

Analysers were re-evaluated when some flags were still present in the
buffers, even if they had not changed since previous pass, resulting
in a waste of CPU cycles.

Ensuring that the flags have changed has saved some useless calls :

  function            min calls per session (before -> after)

  http_request_forward_body       5 -> 4
  http_response_forward_body      3 -> 2
  http_sync_req_state            10 -> 8
  http_sync_res_state             8 -> 6
  http_resync_states              8 -> 6

14 years ago[BUG] accept: don't close twice upon error
Willy Tarreau [Thu, 11 Nov 2010 09:56:04 +0000 (10:56 +0100)] 
[BUG] accept: don't close twice upon error

The stream_sock's accept() used to close the FD upon error, but this
was also sometimes performed by the frontend's accept() called via the
session's accept(). Those interlaced calls were also responsible for the
spaghetti-looking error unrolling code in session.c and stream_sock.c.

Now the frontend must not close the FD anymore, the session is responsible
for that. It also takes care of just closing the FD or also removing from
the FD lists, depending on its state. The socket-level accept() does not
have to care about that anymore.

14 years ago[BUILD] peers: shut a printf format warning (key_size is a size_t)
Willy Tarreau [Thu, 11 Nov 2010 09:55:09 +0000 (10:55 +0100)] 
[BUILD] peers: shut a printf format warning (key_size is a size_t)

Also fix a few misleading comments.

14 years ago[CLEANUP] accept: replace some inappropriate Alert() calls with send_log()
Willy Tarreau [Thu, 11 Nov 2010 08:48:16 +0000 (09:48 +0100)] 
[CLEANUP] accept: replace some inappropriate Alert() calls with send_log()

Some Alert() messages were remaining in the accept() path, which they
would have no chance to be detected. Remove some of them (the impossible
ones) and replace the relevant ones with send_log() so that the admin
has a chance to catch them.

14 years ago[DOC] add documentation for peers section
Emeric Brun [Mon, 27 Sep 2010 10:05:28 +0000 (12:05 +0200)] 
[DOC] add documentation for peers section

14 years ago[MEDIUM] Manage soft stop on peers proxy
Emeric Brun [Thu, 23 Sep 2010 16:44:36 +0000 (18:44 +0200)] 
[MEDIUM] Manage soft stop on peers proxy

14 years ago[MEDIUM] Manage peers section parsing and stick table registration on peers.
Emeric Brun [Thu, 23 Sep 2010 16:39:19 +0000 (18:39 +0200)] 
[MEDIUM] Manage peers section parsing and stick table registration on peers.

14 years ago[MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h...
Emeric Brun [Thu, 23 Sep 2010 16:30:22 +0000 (18:30 +0200)] 
[MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h for sync stick table management

Add cmdline option -L to configure local peer name

14 years ago[MEDIUM] Create updates tree on stick table to manage sync.
Emeric Brun [Thu, 23 Sep 2010 16:16:52 +0000 (18:16 +0200)] 
[MEDIUM] Create updates tree on stick table to manage sync.

14 years ago[MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command
Emeric Brun [Thu, 23 Sep 2010 16:12:53 +0000 (18:12 +0200)] 
[MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command

14 years ago[DOC] stick store-response and new patterns payload and payload_lv
Emeric Brun [Fri, 24 Sep 2010 16:15:17 +0000 (18:15 +0200)] 
[DOC] stick store-response and new patterns payload and payload_lv

14 years ago[MINOR] Add pattern's fetchs payload and payload_lv
Emeric [Fri, 5 Nov 2010 17:13:50 +0000 (18:13 +0100)] 
[MINOR] Add pattern's fetchs payload and payload_lv

14 years ago[DOC] new type binary in stick-table
Emeric Brun [Fri, 24 Sep 2010 14:34:28 +0000 (16:34 +0200)] 
[DOC] new type binary in stick-table

14 years ago[MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy...
Emeric Brun [Thu, 23 Sep 2010 16:02:19 +0000 (18:02 +0200)] 
[MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy if data from protected areas need to be manipulated.

Enhance pattern convs and fetch argument parsing, now fetchs and convs callbacks used typed args.
Add more details on error messages on parsing pattern expression function.
Update existing pattern convs and fetchs to new proto.
Create stick table key type "binary".
Manage Truncation and padding if pattern's fetch-converted result don't match table key size.

14 years ago[DOC] acls rep_ssl_hello and req_ssl_hello
Emeric Brun [Fri, 24 Sep 2010 13:45:16 +0000 (15:45 +0200)] 
[DOC] acls rep_ssl_hello and req_ssl_hello

14 years ago[MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type
Emeric Brun [Thu, 23 Sep 2010 15:59:18 +0000 (17:59 +0200)] 
[MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type

14 years ago[DOC] tcp-response content and inspect
Emeric Brun [Fri, 24 Sep 2010 13:34:53 +0000 (15:34 +0200)] 
[DOC] tcp-response content and inspect

14 years ago[MEDIUM] Implement tcp inspect response rules
Emeric Brun [Thu, 23 Sep 2010 15:56:44 +0000 (17:56 +0200)] 
[MEDIUM] Implement tcp inspect response rules

14 years ago[BUG] stick table entries expire on counters updates/read or show table, even if...
Emeric Brun [Thu, 23 Sep 2010 16:11:05 +0000 (18:11 +0200)] 
[BUG] stick table entries expire on counters updates/read or show table, even if there is no "expire" parameter

14 years ago[BUG] stick table purge failure if size less than 255
Emeric Brun [Thu, 23 Sep 2010 16:10:00 +0000 (18:10 +0200)] 
[BUG] stick table purge failure if size less than 255

If table size is lower than 256, we can't force to purge old entries.
This patch should be backported to 1.4.

14 years ago[BUG] session: don't stop forwarding of data upon last packet
Willy Tarreau [Sun, 7 Nov 2010 19:26:56 +0000 (20:26 +0100)] 
[BUG] session: don't stop forwarding of data upon last packet

If a read shutdown is encountered on the first packet of a connection
right after the data and the last analyser is unplugged at the same
time, then that last data chunk may never be forwarded. In practice,
right now it cannot happen on requests due to the way they're scheduled,
nor can it happen on responses due to the way their analysers work.

But this behaviour has been observed with new response analysers being
developped.

The reason is that when the read shutdown is encountered and an analyser
is present, data cannot be forwarded but the BF_SHUTW_NOW flag is set.
After that, the analyser gets called and unplugs itself, hoping that
process_session() will automatically forward the data. This does not
happen due to BF_SHUTW_NOW.

Simply removing the test on this flag is not enough because then aborted
requests still get forwarded, due to the forwarding code undoing the
abort.

The solution here consists in checking BF_SHUTR_NOW instead of BF_SHUTW_NOW.
BF_SHUTR_NOW is only set on aborts and remains set until ->shutr() is called.
This is enough to catch recent aborts but not prevent forwarding in other
cases. Maybe a new special buffer flag "BF_ABORT" might be desirable in the
future.

This patch does not need to be backported because older versions don't
have the analyser which make the problem appear.

14 years ago[MINOR] config: detect options not supported due to compilation options
Cyril Bonté [Mon, 1 Nov 2010 18:26:00 +0000 (19:26 +0100)] 
[MINOR] config: detect options not supported due to compilation options

Some options depends on the target architecture or compilation options.
When such an option is used on a compiled version that doesn't support it,
it's probably better to identify it as an unsupported option due to
compilation options instead of an unknown option.

Edit: better check on the empty capability than on the option bits. -Willy

14 years ago[CLEANUP] Remove unneeded chars allocation
Cyril Bonté [Mon, 1 Nov 2010 18:26:02 +0000 (19:26 +0100)] 
[CLEANUP] Remove unneeded chars allocation

Some arrays used to log addresses add some more bytes for ports but this space
is never used.

14 years ago[MEDIUM] unix sockets: cleanup the error reporting path
Willy Tarreau [Sun, 7 Nov 2010 11:10:51 +0000 (12:10 +0100)] 
[MEDIUM] unix sockets: cleanup the error reporting path

There were a lot of snprintf() everywhere in the UNIX bind code. Now we
proceed as for tcp and indicate the socket path at the end between square
brackets. The code is smaller and more readable.

14 years ago[MINOR] startup: print the proxy socket which caused an error
Cyril Bonté [Mon, 1 Nov 2010 18:26:01 +0000 (19:26 +0100)] 
[MINOR] startup: print the proxy socket which caused an error

Add the address and port to the error message of the proxy socket that caused
the error. This can be helpful when several listening addresses are used in a
proxy.

Edit: since we now also support unix sockets (which already report their
      path), better move the address reporting to proto_tcp.c by analogy.
      -Willy

14 years ago[MINOR] move MAXPATHLEN definition to compat.h
Willy Tarreau [Sun, 7 Nov 2010 10:44:13 +0000 (11:44 +0100)] 
[MINOR] move MAXPATHLEN definition to compat.h

MAXPATHLEN may be used at other places, it's unconvenient to have it
redefined in a few files. Also, since checking it requires including
sys/param.h, some versions of it cause a macro declaration conflict
with MIN/MAX which are defined in tools.h. The solution consists in
including sys/param.h in both files so that we ensure it's loaded
before the macros are defined and MAXPATHLEN is checked.

14 years ago[DOC] add references to unix socket handling
Willy Tarreau [Tue, 9 Nov 2010 11:46:41 +0000 (12:46 +0100)] 
[DOC] add references to unix socket handling

UNIX listening sockets have some additional options and may log slightly
differently.

14 years ago[MINOR] cfgparse: report support of <path> for the 'bind' statements
Willy Tarreau [Tue, 9 Nov 2010 08:50:37 +0000 (09:50 +0100)] 
[MINOR] cfgparse: report support of <path> for the 'bind' statements

"bind" now supports unix sockets, so report that in the error message.

14 years ago[MEDIUM] Add supports of bind on unix sockets.
Emeric Brun [Fri, 22 Oct 2010 15:59:25 +0000 (17:59 +0200)] 
[MEDIUM] Add supports of bind on unix sockets.

14 years ago[MINOR] Support listener's sockets unix on http logs.
Emeric Brun [Fri, 22 Oct 2010 15:23:04 +0000 (17:23 +0200)] 
[MINOR] Support listener's sockets unix on http logs.

Enhance controls of sockets family on X-Forwarded-For and X-Original-To insert

14 years ago[MINOR] Enhance controls of socket's family on acls and pattern fetch
Emeric Brun [Fri, 22 Oct 2010 15:14:01 +0000 (17:14 +0200)] 
[MINOR] Enhance controls of socket's family on acls and pattern fetch

14 years ago[MINOR] Manage socket type unix for some logs
Emeric Brun [Fri, 22 Oct 2010 15:42:55 +0000 (17:42 +0200)] 
[MINOR] Manage socket type unix for some logs

14 years ago[MINOR] Add some tests on sockets family for port remapping and mode transparent.
Emeric Brun [Fri, 22 Oct 2010 14:36:33 +0000 (16:36 +0200)] 
[MINOR] Add some tests on sockets family for port remapping and mode transparent.

14 years ago[MINOR] Support of unix listener sockets for debug and log event messages on frontend.c
Emeric Brun [Fri, 22 Oct 2010 14:33:18 +0000 (16:33 +0200)] 
[MINOR] Support of unix listener sockets for debug and log event messages on frontend.c

14 years ago[MINOR] Manage unix socket source field on session dump on sock stats
Emeric Brun [Fri, 22 Oct 2010 14:19:01 +0000 (16:19 +0200)] 
[MINOR] Manage unix socket source field on session dump on sock stats

14 years ago[MINOR] Manage unix socket source field on logs
Emeric Brun [Fri, 22 Oct 2010 14:14:31 +0000 (16:14 +0200)] 
[MINOR] Manage unix socket source field on logs

14 years ago[MEDIUM] Enhance message errors management on binds
Emeric Brun [Fri, 22 Oct 2010 14:06:11 +0000 (16:06 +0200)] 
[MEDIUM] Enhance message errors management on binds

14 years ago[DOC] document the 'accept-proxy' bind option
Willy Tarreau [Fri, 29 Oct 2010 19:56:16 +0000 (21:56 +0200)] 
[DOC] document the 'accept-proxy' bind option

This option enables the PROXY protocol over incoming connections.

14 years ago[DOC] add the proxy protocol's specifications
Willy Tarreau [Fri, 29 Oct 2010 19:46:16 +0000 (21:46 +0200)] 
[DOC] add the proxy protocol's specifications

14 years ago[MINOR] frontend: add tcpv6 support on accept-proxy bind
Emeric Brun [Fri, 29 Oct 2010 10:03:03 +0000 (12:03 +0200)] 
[MINOR] frontend: add tcpv6 support on accept-proxy bind

14 years ago[MINOR] frontend: improve accept-proxy header parsing
Emeric Brun [Fri, 29 Oct 2010 13:16:55 +0000 (15:16 +0200)] 
[MINOR] frontend: improve accept-proxy header parsing

The accept-proxy now automatically fails as soon as a character does not
match the expected syntax.

14 years ago[MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections
Willy Tarreau [Fri, 15 Oct 2010 21:25:20 +0000 (23:25 +0200)] 
[MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections

This analyser must absolutely be the earliest one to process contents, given
the nature of the protocol.

14 years ago[MINOR] frontend: add a new analyser to parse a proxied connection
Willy Tarreau [Fri, 15 Oct 2010 21:23:19 +0000 (23:23 +0200)] 
[MINOR] frontend: add a new analyser to parse a proxied connection

The introduction of a new PROXY protocol for proxied connections requires
an early analyser to decode the incoming connection and set the session
flags accordingly.

Some more work is needed, among which setting a flag on the session to
indicate it's proxied, and copying the original parameters for later
comparisons with new ACLs (eg: real_src, ...).

14 years ago[MINOR] standard: change arg type from const char* to char*
Willy Tarreau [Fri, 15 Oct 2010 21:21:42 +0000 (23:21 +0200)] 
[MINOR] standard: change arg type from const char* to char*

inetaddr_host_lim_ret() used to make use of const char** for some
args, but that make it impossible ot use char** due to the way
controls are made by gcc. So let's change that.

14 years ago[MINOR] standard: add read_uint() to parse a delimited unsigned integer
Willy Tarreau [Fri, 15 Oct 2010 21:19:55 +0000 (23:19 +0200)] 
[MINOR] standard: add read_uint() to parse a delimited unsigned integer

This function parses an integer and returns it along with the pointer to the
next char not part of the number.

14 years ago[MINOR] listener: add the "accept-proxy" option to the "bind" keyword
Willy Tarreau [Fri, 15 Oct 2010 12:27:08 +0000 (14:27 +0200)] 
[MINOR] listener: add the "accept-proxy" option to the "bind" keyword

This option will enable the AN_REQ_DECODE_PROXY analyser on the requests
that come from those listeners.

14 years ago[MINOR] buffers: add a new request analyser flag for PROXY mode
Willy Tarreau [Fri, 15 Oct 2010 12:12:12 +0000 (14:12 +0200)] 
[MINOR] buffers: add a new request analyser flag for PROXY mode

Since it must be the first analyser, the other flags have been renumbered.

14 years ago[CONTRIB] halog: minor speed improvement in timer parser
Willy Tarreau [Thu, 28 Oct 2010 18:39:50 +0000 (20:39 +0200)] 
[CONTRIB] halog: minor speed improvement in timer parser

The timer parser looks for the next slash after the last timer, which is
very far away. Those 4 occurrences have been fixed to match the way it's
done in URL sorting, which is faster. Average speed gain is 5-6% on -srv
and -pct.
(cherry picked from commit 3555671c93695f48c02ef05c8bb228523f17ca20)

14 years ago[CONTRIB] halog: report per-url counts, errors and times
Willy Tarreau [Thu, 28 Oct 2010 18:33:46 +0000 (20:33 +0200)] 
[CONTRIB] halog: report per-url counts, errors and times

Using -u{,c,e,t,a,to,ao} it is possible to get per-URL statistics, sorted by
URL, request count, error count, total time, avg time, total time on OK requests,
avg time on OK requests.

Since it has to parse URLs and store a number of fields, it's quite slower
than other methods, but still correct for production usage (typically 800000
lines or 270 MB per second on a 2 GHz system).

Results are sorted in reverse order so that it's easy to catch them by piping
the output to the "head" command.
(cherry picked from commit 15ce7f56d15f839ce824279b84ffe14c58e41fda)

14 years ago[BUG] ebtree: fix duplicate strings insertion
Willy Tarreau [Thu, 28 Oct 2010 20:48:29 +0000 (22:48 +0200)] 
[BUG] ebtree: fix duplicate strings insertion

(update to ebtree 6.0.4)

Recent fix fd301cc1370cd4977fe175dfa4544c7dc0e7ce6b was not OK because it
was returning one excess byte, causing some duplicates not to be detected.
The reason is that we added 8 bits to count the trailing zero but they
were implied by the pre-incrementation of the pointer.

Fixing this was still not enough, as the problem appeared when
string_equal_bits() was applied on two identical strings, and it returned
a number of bits covering the trailing zero. Subsequent calls were applied
to the first byte after this trailing zero. It was often zero when doing
insertion from raw files, explaining why the issue was not discovered
earlier. But when the data is from a reused area, duplicate strings are not
correctly detected when inserting into the tree.

Several solutions were tested, and the only efficient one consists in making
string_equal_bits() notify the caller that the end of the string was reached.
It now returns zero and the callers just have to ensure that when they get a
zero, they stop using that bit until a dup tree or a leaf is encountered.

This fix brought the unexpected bonus of simplifying the insertion code a bit
and making it slightly faster to process duplicates.

The impact for haproxy was that if many similar string patterns were loaded
from a file, there was a potential risk that their insertion or matching could
have been slower. The bigger impact was with the URL sorting feature of halog,
which is not yet merged and is how this bug was discovered.
(cherry picked from commit 518d59ec9ba43705f930f9ece3749c450fd005df)

14 years ago[CONTRIB] Update Cacti Tempates
Krzysztof Piotr Oledzki [Mon, 25 Oct 2010 12:59:22 +0000 (14:59 +0200)] 
[CONTRIB] Update Cacti Tempates

This patch adds new haproxy_socket.xml template and updates
haproxy_backend.xml and haproxy_frontend.xml templates.
(cherry picked from commit 67cd1d55b5513e4186f021a7014e9442fd7a710f)

14 years ago[CONTRIB] Update haproxy.pl
Krzysztof Piotr Oledzki [Mon, 25 Oct 2010 14:04:17 +0000 (16:04 +0200)] 
[CONTRIB] Update haproxy.pl

This patch adds support for Sockets and several
new variables available in the 1.4 branch.
(cherry picked from commit d049c84fdc9e35472a3db87e45069afd92bee01d)

14 years ago[MINOR] cookie: add support for the "preserve" option
Willy Tarreau [Sat, 23 Oct 2010 10:46:42 +0000 (12:46 +0200)] 
[MINOR] cookie: add support for the "preserve" option

This option makes haproxy preserve any persistence cookie emitted by
the server, which allows the server to change it or to unset it, for
instance, after a logout request.
(cherry picked from commit 52e6d75374c7900c1fe691c5633b4ae029cae8d5)

14 years ago[BUG] cookie: correctly unset default cookie parameters
Willy Tarreau [Sat, 23 Oct 2010 09:37:27 +0000 (11:37 +0200)] 
[BUG] cookie: correctly unset default cookie parameters

When a backend defines a new cookie, it forgot to unset any params
that could have been set in a defaults section, resulting in configs
that would sometimes refuse to load or not work as expected.
(cherry picked from commit f80bf174ed905a29a3ed8ee91fcd528da6df174f)

14 years ago[DOC] fix typos about bind-process syntax
Willy Tarreau [Sat, 23 Oct 2010 09:22:08 +0000 (11:22 +0200)] 
[DOC] fix typos about bind-process syntax

Reported by Tijn Lambrechtsen.
(cherry picked from commit 365cddc61dec824c7edcfca7cf974222a42f4896)

14 years ago[MINOR] acl: add the http_req_first match
Willy Tarreau [Fri, 22 Oct 2010 18:04:13 +0000 (20:04 +0200)] 
[MINOR] acl: add the http_req_first match

This match returns true when the request calling it is the first one of
a connection.
(cherry picked from commit 922ca979c50653c415852531f36fe409190ad76b)

14 years ago[BUG] proto_tcp: potential bug on pattern fetch dst and dport
emeric [Fri, 22 Oct 2010 15:06:26 +0000 (17:06 +0200)] 
[BUG] proto_tcp: potential bug on pattern fetch dst and dport

Pattern fetches relying on destination address must first fetch
the address if it has not been done yet.

(cherry picked from commit 21abf441feb318b2ccd7df590fd89e9e824627f6)

14 years ago[CONTRIB] add templates for Cacti.
Mathieu Trudel [Fri, 22 Oct 2010 15:08:48 +0000 (17:08 +0200)] 
[CONTRIB] add templates for Cacti.

Hi,

I've attached the templates I've built for monitoring backends and
frontends of haproxy.

To install these, you will need to copy the XML files from the contrib/
directory of the haproxy distribution into a directory that Cacti can
reach, and edit the Data Queries "HaProxy Backends" and "HAProxy
Frontends" accordingly (the "XML Path" field. It's also dependant on
having a version of net-snmp that supports embedded Perl, and including
the "perl do 'path_to_haproxy.pl';" directive in your snmpd.conf file.

As for what is created:

- For the devices, you have two new data queries to choose from, they
can be added from the Devices page for each device, at the very end in
the drop-down box, then click "Add". The data queries are called
"HaProxy Backends" and "HAProxy Frontends".

- From "HaProxy Backends": in the new graphs page, you can choose which
backend to graph, and create one of two graphs:
- Haproxy backend traffic:  ingress and egress bytes.
- Haproxy backend sessions:  total sessions with _reponse_ errors.

- From "HAProxy Frontends": in the new graphs page again, you can choose
which frontend to graph, which will include aggregated data for the
backends behind it, obviously. You can create one of two graphs:
- Haproxy frontend traffic:  ingress and egress bytes.
- Haproxy frontend sessions:  total sessions with _request_ errors.

In the graphs and data sources, limits are set to reasonably high values
to support up to nearly 10G traffic, and up to 10000 concurrent
connections.

/ Matt
(cherry picked from commit f63090f2e85cdb7448071cdceb2eb5fabd2b9320)

14 years ago[MINOR] add better support to "mysql-check"
Hervé COMMOWICK [Mon, 18 Oct 2010 13:58:36 +0000 (15:58 +0200)] 
[MINOR] add better support to "mysql-check"

The MySQL check has been revamped to be able to send real MySQL data,
and to avoid Aborted connects on MySQL side.
It is however backward compatible with older version, but it is highly
recommended to use the new mode, by adding "user <username>" on the
"mysql-check" line.

The new check consists in sending two MySQL packet, one Client
Authentication packet, with "haproxy" username (by default), and one
QUIT packet, to correctly close MySQL session. We then parse the Mysql
Handshake Initialisation packet and/or Error packet. It is a basic but
useful test which does not produce error nor aborted connect on the
server.
(cherry picked from commit a1e4dcfe5718311b7653d7dabfad65c005d0439b)

14 years ago[MINOR] checks: ensure that we can inherit binary checks from the defaults section
Willy Tarreau [Fri, 22 Oct 2010 14:15:31 +0000 (16:15 +0200)] 
[MINOR] checks: ensure that we can inherit binary checks from the defaults section

Health checks were all pure ASCII, but we're going to have to support some
binary checks (eg: SQL). When they're inherited from the default section,
they will be truncated to the first \0 due to strdup(). Let's fix that with
a simple malloc.
(cherry picked from commit 98fc04a766bcff80f57db2b1cd865c91761b131b)