]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
15 years ago[BUILD] fix build for systems without SOL_TCP
Willy Tarreau [Sun, 16 Aug 2009 12:13:47 +0000 (14:13 +0200)] 
[BUILD] fix build for systems without SOL_TCP

Andrew Azarov reported that haproxy-1.4-dev1 does not build
under FreeBSD 7.2 because SOL_TCP is not defined. So add a
check for its definition before using it. This only impacts
network optimisations anyway.

15 years ago[MEDIUM] remove old experimental tcpsplice option
Willy Tarreau [Sun, 16 Aug 2009 11:20:32 +0000 (13:20 +0200)] 
[MEDIUM] remove old experimental tcpsplice option

This Linux-specific option was never really used in production and
has since been superseded by new splicing options brought by recent
Linux kernels.

It caused several particular cases in the code because the kernel
would take care of the session without haproxy being able to do
anything on it, which became hard to handle in the new architecture.

Let's simply get rid of it now that there is a replacement available.

15 years ago[MINOR] stats: add a new node-name setting
Willy Tarreau [Sun, 16 Aug 2009 08:29:18 +0000 (10:29 +0200)] 
[MINOR] stats: add a new node-name setting

The new "node-name" stats setting enables reporting of a node ID on
the stats page. It is possible to return the system's host name as
well as a specific name.

15 years ago[MINOR] export the hostname variable so that all the code can access it
Willy Tarreau [Sun, 16 Aug 2009 08:08:02 +0000 (10:08 +0200)] 
[MINOR] export the hostname variable so that all the code can access it

The hostname variable will be used later, export it.

15 years ago[RELEASE] Released version 1.4-dev2 v1.4-dev2
Willy Tarreau [Sun, 9 Aug 2009 20:57:09 +0000 (22:57 +0200)] 
[RELEASE] Released version 1.4-dev2

Released version 1.4-dev2 with the following main changes :
    - [BUG] task: fix possible crash when some timeouts are not configured
    - [BUG] log: option tcplog would log to global if no logger was defined

15 years ago[BUG] log: option tcplog would log to global if no logger was defined
Willy Tarreau [Sun, 9 Aug 2009 08:11:45 +0000 (10:11 +0200)] 
[BUG] log: option tcplog would log to global if no logger was defined

Romuald du Song reported a strange bug causing "option tcplog" to
unexpectedly use global log parameters if no log server was declared.

Eventhough it can be useful in some circumstances, it only hides
configuration bugs and can even cause traffic logs to be sent to
the wrong logger, since global settings are just for the process.

This has been fixed and a warning has been added for configurations
where tcplog or httplog are set without any logger. This fix must
be backported to 1.3.20, but not to 1.3.15.X in order not to risk
any regression on old configurations.

15 years ago[BUG] task: fix possible crash when some timeouts are not configured
Willy Tarreau [Sun, 9 Aug 2009 07:09:54 +0000 (09:09 +0200)] 
[BUG] task: fix possible crash when some timeouts are not configured

Cristian Ditoiu reported a major regression when testing 1.3.19 at
transfer.ro. It would crash within a few minutes while 1.3.15.10
was OK. He offered to help so we could run gdb and debug the crash
live. We finally found that the crash was the result of a regression
introduced by recent fix 814c978fb67782ceeaf1db74abfe7083938bedff
(task: fix possible timer drift after update) which makes it possible
for a tree walk to start from a detached task if this task has got
its timeout disabled due to a missing timeout.

The trivial fix below has been extensively tested and confirmed not
to crash anymore.

Special thanks to Cristian who spontaneously provided a lot of help
and trust to debug this issue which at first glance looked impossible
after reading the code and traces, but took less than an hour to spot
and fix when caught live in gdb ! That's really appreciated !

15 years ago[RELEASE] Released version 1.4-dev1 v1.4-dev1
Willy Tarreau [Wed, 29 Jul 2009 20:38:32 +0000 (22:38 +0200)] 
[RELEASE] Released version 1.4-dev1

Released version 1.4-dev1 with the following main changes :
    - [MINOR] acl: add support for matching of RDP cookies
    - [MEDIUM] add support for RDP cookie load-balancing
    - [MEDIUM] add support for RDP cookie persistence
    - [MINOR] add a new CLF log format
    - [MINOR] startup: don't imply -q with -D
    - [BUG] ensure that we correctly re-start old process in case of error
    - [MEDIUM] add support for binding to source port ranges during connect
    - [MINOR] config: track "no option"/"option" changes
    - [MINOR] config: support resetting options do default values
    - [MEDIUM] implement option tcp-smart-accept at the frontend
    - [MEDIUM] stream_sock: implement tcp-cork for use during shutdowns on Linux
    - [MEDIUM] implement tcp-smart-connect option at the backend
    - [MEDIUM] add support for TCP MSS adjustment for listeners
    - [MEDIUM] support setting a server weight to zero
    - [MINOR] make DEFAULT_MAXCONN user-configurable at build time
    - [MAJOR] session: don't clear buffer status flags anymore
    - [MAJOR] session: only check for timeouts when they have just occurred.
    - [MAJOR] session: simplify buffer error handling
    - [MEDIUM] config: split parser and checker in two functions
    - [MEDIUM] config: support loading multiple configuration files
    - [MEDIUM] stream_sock: don't close prematurely when nolinger is set
    - [MEDIUM] session: rework buffer analysis to permit permanent analysers
    - [MEDIUM] splice: set the capability on each stream_interface
    - [BUG] http: redirect rules were processed too early
    - [CLEANUP] remove unused DEBUG_PARSE_NO_SPEEDUP define
    - [MEDIUM] http: split request waiter from request processor
    - [MEDIUM] session: tell analysers what bit they were called for
    - [MAJOR] http: complete splitting of the remaining stages
    - [MINOR] report in the proxies the requirements for ACLs
    - [MINOR] http: rely on proxy->acl_requires to allocate hdr_idx
    - [MINOR] acl: add HTTP protocol detection (req_proto_http)
    - [MINOR] prepare callers of session_set_backend to handle errors
    - [BUG] default ACLs did not properly set the ->requires flag
    - [MEDIUM] allow a TCP frontend to switch to an HTTP backend
    - [MINOR] ensure we can jump from swiching rules to http without data
    - [MINOR] http: take http request timeout from the backend
    - [MINOR] allow TCP inspection rules to make use of HTTP ACLs
    - [BUILD] report commit date and not author's date as build date
    - [MINOR] acl: don't complain anymore when using L7 acls in TCP
    - [BUG] stream_sock: always shutdown(SHUT_WR) before closing
    - [BUG] stream_sock: don't stop reading when the poller reports an error
    - [BUG] config: tcp-request content only accepts "if" or "unless"
    - [BUG] task: fix possible timer drift after update
    - [MINOR] apply tcp-smart-connect option for the checks too
    - [MINOR] stats: better displaying in MSIE
    - [MINOR] config: improve error reporting in global section
    - [MINOR] config: improve error reporting in listen sections
    - [MINOR] config: the "capture" keyword is not allowed in backends
    - [MINOR] config: improve error reporting when checking configuration
    - [BUILD] fix a minor build warning on AIX
    - [BUILD] use "git cmd" instead of "git-cmd"
    - [CLEANUP] report 2009 not 2008 in the copyright banner.
    - [MINOR] print usage on the stats sockets upon invalid commands
    - [MINOR] acl: detect and report potential mistakes in ACLs
    - [BUILD] fix incorrect printf arg count with tcp_splice
    - [BUG] fix random pauses on last segment of a series
    - [BUILD] add support for build under Cygwin

15 years ago[BUG] fix random pauses on last segment of a series
Willy Tarreau [Mon, 27 Jul 2009 18:08:06 +0000 (20:08 +0200)] 
[BUG] fix random pauses on last segment of a series

During a direct data transfer from the server to the client, if the
system did not have enough buffers anymore, haproxy would not enable
write polling again if it could write at least one data chunk. Under
normal conditions, this would remain undetected because the remaining
data would be pushed by next data chunks.

However, when this happens on the last chunk of a session, or the last
in a series in an interactive bidirectional TCP transfer, haproxy would
only start sending again when the read timeout was reached on the side
it stopped writing, causing long pauses on some protocols such as SQL.

This bug was reported by an Exceliance customer who generously offered
to help us by sending large amounts of traces and running various tests
on production systems.

It is quite hard to trigger it but it becomes easier with a ping-pong
TCP service which transfers random data sizes, with a modified version
of send() able to send packets smaller than the average transfer size.

A cleaner fix would imply only updating the write timeout when data
transfers are *attempted*, not succeeded, but that requires more
sensible code changes without fixing the result. It is a candidate
for a later patch though.

16 years ago[BUILD] fix incorrect printf arg count with tcp_splice
Willy Tarreau [Sun, 26 Jul 2009 18:40:05 +0000 (20:40 +0200)] 
[BUILD] fix incorrect printf arg count with tcp_splice

remove an extra arg.

16 years ago[MINOR] acl: detect and report potential mistakes in ACLs
Willy Tarreau [Sun, 26 Jul 2009 17:40:40 +0000 (19:40 +0200)] 
[MINOR] acl: detect and report potential mistakes in ACLs

I've discovered a configuration with lots of occurrences of the
following :

    acl xxx hdr_beg (host) xxx

The problem is that hdr_beg will match every header against patterns
(host) and xxx due to the space between both, which certainly is not
what the user wanted. Now we detect such ACLs and report a warning
with a suggestion to add "--" between "hdr_beg" and "(host)" if this
is definitely what is wanted.

16 years ago[MINOR] print usage on the stats sockets upon invalid commands
Willy Tarreau [Sun, 26 Jul 2009 16:16:43 +0000 (18:16 +0200)] 
[MINOR] print usage on the stats sockets upon invalid commands

When issuing commands on the unix socket, there's no way to
know if the result is empty or if the command is wrong. This
patch makes invalid command return a help message.

16 years ago[CLEANUP] report 2009 not 2008 in the copyright banner.
Willy Tarreau [Thu, 23 Jul 2009 11:45:47 +0000 (13:45 +0200)] 
[CLEANUP] report 2009 not 2008 in the copyright banner.

16 years ago[BUILD] use "git cmd" instead of "git-cmd"
Willy Tarreau [Thu, 23 Jul 2009 11:43:33 +0000 (13:43 +0200)] 
[BUILD] use "git cmd" instead of "git-cmd"

Newer GIT versions do not support "git-cmd" anymore, so date and version
can be wrong during development builds. Use "git cmd" now. Also fix
git-tar to use "git archive" instead of "git-tar-tree".

16 years ago[BUILD] fix a minor build warning on AIX
Willy Tarreau [Thu, 23 Jul 2009 11:40:20 +0000 (13:40 +0200)] 
[BUILD] fix a minor build warning on AIX

AIX wants string.h in signal.c (and is right to do so) :

gcc -Iinclude -Wall  -O2 -g       -DTPROXY -DENABLE_POLL  -DCONFIG_HAPROXY_VERSION=\"1.3.18\" -DCONFIG_HAPROXY_DATE=\"2009/05/10\" -c -o src/signal.o src/signal.c
src/signal.c: In function 'signal_init':
src/signal.c:32: warning: implicit declaration of function 'memset'
src/signal.c:32: warning: incompatible implicit declaration of built-in function 'memset'

16 years ago[MINOR] config: improve error reporting when checking configuration
Willy Tarreau [Thu, 23 Jul 2009 11:36:36 +0000 (13:36 +0200)] 
[MINOR] config: improve error reporting when checking configuration

Do not exit early at the first error found while checking configuration
validity. This particularly helps spotting multiple wrong tracked server
names at once.

16 years ago[MINOR] config: the "capture" keyword is not allowed in backends
Willy Tarreau [Thu, 23 Jul 2009 11:24:23 +0000 (13:24 +0200)] 
[MINOR] config: the "capture" keyword is not allowed in backends

The "capture" keyword is only supported by frontends, fix the check.

16 years ago[MINOR] config: improve error reporting in listen sections
Willy Tarreau [Thu, 23 Jul 2009 11:19:11 +0000 (13:19 +0200)] 
[MINOR] config: improve error reporting in listen sections

Try not to immediately exit on non-fatal errors while parsing a
listen section, so that the user has a chance to get most of the
errors at once, which is quite convenient especially during config
checks with the -c argument.

16 years ago[MINOR] config: improve error reporting in global section
Willy Tarreau [Mon, 20 Jul 2009 07:30:05 +0000 (09:30 +0200)] 
[MINOR] config: improve error reporting in global section

Try not to immediately exit on non-fatal errors while parsing the
global section, so that the user has a chance to get most of the
errors at once, which is quite convenient especially during config
checks with the -c argument. Some other errors such as unresolved
server names also don't make the parser exit too early.

16 years ago[MINOR] stats: better displaying in MSIE
Willy Tarreau [Wed, 15 Jul 2009 08:07:05 +0000 (10:07 +0200)] 
[MINOR] stats: better displaying in MSIE

MSIE does not correctly display spaced digits. It requires a margin of
at least one pixel. Also, it does not correctly hide empty cells, so we
work around this by setting the background white. Last, the H1 font was
too large, so we reduce it by one size, which is still OK in other
browsers.

16 years ago[MINOR] apply tcp-smart-connect option for the checks too
Willy Tarreau [Wed, 15 Jul 2009 05:16:31 +0000 (07:16 +0200)] 
[MINOR] apply tcp-smart-connect option for the checks too

We should respect tcp-smart-connect for checks too. First it reduces
the traffic, and second it ensures that the checks see the same thing
as the production traffic, which is better for debugging.

16 years ago[BUG] task: fix possible timer drift after update
Willy Tarreau [Tue, 14 Jul 2009 21:48:55 +0000 (23:48 +0200)] 
[BUG] task: fix possible timer drift after update

When the scheduler detected that a task was misplaced in the timer
queue, it used to place it right again. Unfortunately, it did not
check whether it would still call the new task from its new place.
This resulted in some tasks not getting called on timeout once in
a while, causing a minor drift for repetitive timers. This effect
was only observable with slow health checks and without any activity
because no other task would cause the scheduler to be immediately
called again.

In practice, it does not affect any real-world configuration, but
it's still better to fix it.

16 years ago[BUG] config: tcp-request content only accepts "if" or "unless"
Willy Tarreau [Tue, 14 Jul 2009 19:17:05 +0000 (21:17 +0200)] 
[BUG] config: tcp-request content only accepts "if" or "unless"

As reported by Maik Broemme, if something different from "if" or
"unless" was specified after "tcp-request content accept", the
condition would silently remain void. The parser must obviously
complain since this typically corresponds to a forgotten "if".

16 years ago[BUG] stream_sock: don't stop reading when the poller reports an error
Willy Tarreau [Tue, 14 Jul 2009 17:55:05 +0000 (19:55 +0200)] 
[BUG] stream_sock: don't stop reading when the poller reports an error

As reported by Jean-Baptiste Quenot and Robbie Aelter, sometimes a
backend server error is converted to a 502 error if the backend stops
before reading all the request. The reason is that the remote system
sends a TCP RST packet because there are still unread data pending in
the socket buffer. This RST is translated as a socket error on the
local system, and this error is reported by the poller.

However, most of the time, it's a write error, but the system is
still able to read the remaining pending data, such as in the trace
below :

send(7, "GET /aaa HTTP/1.0\r\nUser-Agent: Mo"..., 1123, MSG_DONTWAIT|MSG_NOSIGNAL) = 1123
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN, {u32=7, u64=7}}) = 0
epoll_wait(3, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=7, u64=7}}}, 8, 1000) = 1
gettimeofday({1247593958, 643572}, NULL) = 0
recv(7, "HTTP/1.0 400 Bad request\r\nCache-C"..., 7000, MSG_NOSIGNAL) = 187
setsockopt(6, SOL_TCP, TCP_NODELAY, [0], 4) = 0
setsockopt(6, SOL_TCP, TCP_CORK, [1], 4) = 0
send(6, "HTTP/1.0 400 Bad request\r\nCache-C"..., 187, MSG_DONTWAIT|MSG_NOSIGNAL) = 187
shutdown(6, 1 /* send */)               = 0

The recv succeeded while epoll_wait() reported an error.

Note: This case is very hard to reproduce and requires that the backend
server is reached via the loopback in order to minimise latency and
reduce the risk of sent data being ACKed.

16 years ago[BUG] stream_sock: always shutdown(SHUT_WR) before closing
Willy Tarreau [Tue, 14 Jul 2009 17:21:50 +0000 (19:21 +0200)] 
[BUG] stream_sock: always shutdown(SHUT_WR) before closing

When we close a socket with unread data in the buffer, or when the
nolinger option is set, we regularly lose the last fragment, which
often contains the error message. This typically occurs when sending
too large a request. Only the RST is seen due to the close() (since
not all data were read) and the output message never reaches the
network.

Doing a shutdown() before the close() solves this annoying issue
because the data are really pushed before the system sends the RST.

16 years ago[MINOR] acl: don't complain anymore when using L7 acls in TCP
Willy Tarreau [Tue, 14 Jul 2009 11:53:17 +0000 (13:53 +0200)] 
[MINOR] acl: don't complain anymore when using L7 acls in TCP

Since TCP can now check contents using L7 acls, we must not
complain anymore.

16 years ago[BUILD] report commit date and not author's date as build date
Willy Tarreau [Tue, 14 Jul 2009 11:24:16 +0000 (13:24 +0200)] 
[BUILD] report commit date and not author's date as build date

By default, when building from a git tree, haproxy's release date is
set to the last commit's date. But it was the wrong date which was
used, the initial patch's date, which can cause time jumps in the
past when an old patch gets merged. What we want is the commit date,
which reflects the correct code history.

16 years ago[MINOR] add a new CLF log format
Emeric Brun [Tue, 30 Jun 2009 16:26:00 +0000 (18:26 +0200)] 
[MINOR] add a new CLF log format

Appending the "clf" word after "option httplog" turns the HTTP log
format into a CLF format, more suited for certain tools.

16 years ago[MEDIUM] add support for RDP cookie persistence
Emeric Brun [Tue, 30 Jun 2009 15:57:00 +0000 (17:57 +0200)] 
[MEDIUM] add support for RDP cookie persistence

The new statement "persist rdp-cookie" enables RDP cookie
persistence. The RDP cookie is then extracted from the RDP
protocol, and compared against available servers. If a server
matches the RDP cookie, then it gets the connection.

16 years ago[MEDIUM] add support for RDP cookie load-balancing
Emeric Brun [Tue, 30 Jun 2009 15:56:00 +0000 (17:56 +0200)] 
[MEDIUM] add support for RDP cookie load-balancing

This patch adds support for hashing RDP cookies in order to
use them as a load-balancing key. The new "rdp-cookie(name)"
load-balancing metric has to be used for this. It is still
mandatory to wait for an RDP cookie in the frontend, otherwise
it will randomly work.

16 years ago[MINOR] acl: add support for matching of RDP cookies
Emeric Brun [Tue, 30 Jun 2009 15:54:00 +0000 (17:54 +0200)] 
[MINOR] acl: add support for matching of RDP cookies

The RDP protocol is quite simple and documented, which permits
an easy detection and extraction of cookies. It can be useful
to match the MSTS cookie which can contain the username specified
by the client.

16 years ago[MINOR] allow TCP inspection rules to make use of HTTP ACLs
Willy Tarreau [Sun, 12 Jul 2009 08:10:05 +0000 (10:10 +0200)] 
[MINOR] allow TCP inspection rules to make use of HTTP ACLs

Since we can call the HTTP parser from TCP inspection rules, it makes
sense to be able to use the HTTP ACLs with it. That way, we can decide
from a TCP frontend to take a switching decision based on full layer7
decoding. This might be useful to perform layer7 content switching from
a layer4 frontend in fact. For instance, we might want to be able to
detect http/https on a frontend, but still switch to backend X or Y
depending on the Host header. Note that it is mandatory to wait for
an HTTP request otherwise the ACLs will randomly match.

16 years ago[MINOR] http: take http request timeout from the backend
Willy Tarreau [Sun, 12 Jul 2009 08:03:17 +0000 (10:03 +0200)] 
[MINOR] http: take http request timeout from the backend

Since we can now switch from TCP to HTTP, we need to be able to apply
the HTTP request timeout after switching. That means we need to take
it from the backend and not from the frontend. Since the backend points
to the frontend before switching, that changes nothing for the normal
case.

16 years ago[MINOR] ensure we can jump from swiching rules to http without data
Willy Tarreau [Sun, 12 Jul 2009 07:55:41 +0000 (09:55 +0200)] 
[MINOR] ensure we can jump from swiching rules to http without data

In case of switching from TCP to HTTP, we want the HTTP request timeout
to be properly initialized. For this, we have to jump to the analyser
without breaking out of the loop nor waiting for incoming data. The way
it is done right now is not particularly clean but it works.

A cleaner method might involve pushing function pointers into a circular
list.

16 years ago[MEDIUM] allow a TCP frontend to switch to an HTTP backend
Willy Tarreau [Sun, 12 Jul 2009 07:47:04 +0000 (09:47 +0200)] 
[MEDIUM] allow a TCP frontend to switch to an HTTP backend

This patch allows a TCP frontend to switch to an HTTP backend.
During the switch, missing structures are automatically allocated.
The HTTP parser is enabled so that the backend first waits for a
full HTTP request.

16 years ago[BUG] default ACLs did not properly set the ->requires flag
Willy Tarreau [Sun, 12 Jul 2009 07:21:30 +0000 (09:21 +0200)] 
[BUG] default ACLs did not properly set the ->requires flag

This bug caused session initialization not to always allocate
the hdr_idx struct for default ACLs involving HTTP content.

16 years ago[MINOR] prepare callers of session_set_backend to handle errors
Willy Tarreau [Sun, 12 Jul 2009 06:27:39 +0000 (08:27 +0200)] 
[MINOR] prepare callers of session_set_backend to handle errors

session_set_backend will soon have to allocate areas for HTTP
headers. We must ensure that the callers can handle an allocation
error.

16 years ago[MINOR] acl: add HTTP protocol detection (req_proto_http)
Willy Tarreau [Fri, 10 Jul 2009 22:06:00 +0000 (00:06 +0200)] 
[MINOR] acl: add HTTP protocol detection (req_proto_http)

Now that we can perform TCP-based content switching, it makes sense
to be able to detect HTTP traffic and act accordingly. We already
have an HTTP decoder, we just have to call it in order to detect HTTP
protocol. Note that since the decoder will automatically fill in the
interesting fields of the HTTP transaction, it would make sense to
use this parsing to extend HTTP matching to TCP.

16 years ago[MINOR] http: rely on proxy->acl_requires to allocate hdr_idx
Willy Tarreau [Fri, 10 Jul 2009 21:52:51 +0000 (23:52 +0200)] 
[MINOR] http: rely on proxy->acl_requires to allocate hdr_idx

Right now only HTTP proxies may use HTTP headers in ACLs, but
when this evolves, we'll need to be able to allocate the hdr_idx
on demand. The solution consists in allocating it only when it is
certain that at least one ACL requires HTTP parsing, regardless
of the mode the proxy is in. This is what is achieved by this
patch.

16 years ago[MINOR] report in the proxies the requirements for ACLs
Willy Tarreau [Fri, 10 Jul 2009 18:53:53 +0000 (20:53 +0200)] 
[MINOR] report in the proxies the requirements for ACLs

This patch propagates the ACL conditions' "requires" bitfield
to the proxies. This makes it possible to know exactly what a
proxy might have to support for any request, which helps knowing
whether we have to allocate some space for certain types of
structures or not (eg: the hdr_idx struct).

The concept might be extended to a lot more types of information,
such as detecting whether we need to allocate some space for some
request ACLs which need a result in the response, etc...

16 years ago[MAJOR] http: complete splitting of the remaining stages
Willy Tarreau [Tue, 7 Jul 2009 13:10:31 +0000 (15:10 +0200)] 
[MAJOR] http: complete splitting of the remaining stages

The HTTP processing has been splitted into 7 steps, one of which
is not anymore HTTP-specific (content-switching). That way, it
becomes possible to use "use_backend" rules in TCP mode. A new
"use_server" directive should follow soon.

16 years ago[MEDIUM] session: tell analysers what bit they were called for
Willy Tarreau [Tue, 7 Jul 2009 08:55:49 +0000 (10:55 +0200)] 
[MEDIUM] session: tell analysers what bit they were called for

Some stream analysers might become generic enough to be called
for several bits. So we cannot have the analyser bit hard coded
into the analyser itself. Let's make the caller inform the callee.

16 years ago[MEDIUM] http: split request waiter from request processor
Willy Tarreau [Tue, 7 Jul 2009 08:14:51 +0000 (10:14 +0200)] 
[MEDIUM] http: split request waiter from request processor

We want to split several steps in HTTP processing so that
we can call individual analysers depending on what processing
we want to perform. The first step consists in splitting the
part that waits for a request from the rest.

16 years ago[CLEANUP] remove unused DEBUG_PARSE_NO_SPEEDUP define
Willy Tarreau [Tue, 7 Jul 2009 06:56:15 +0000 (08:56 +0200)] 
[CLEANUP] remove unused DEBUG_PARSE_NO_SPEEDUP define

This one has become useless with the new HTTP parser.

16 years ago[BUG] http: redirect rules were processed too early
Willy Tarreau [Mon, 6 Jul 2009 14:34:52 +0000 (16:34 +0200)] 
[BUG] http: redirect rules were processed too early

redirect rules are documented as being processed last before
use_backend but were mistakenly processed before block rules.
Fortunately very few people use a mix of block and redirect
rules, so this bug has never been reported yet.

16 years ago[MEDIUM] splice: set the capability on each stream_interface
Willy Tarreau [Sun, 28 Jun 2009 21:10:19 +0000 (23:10 +0200)] 
[MEDIUM] splice: set the capability on each stream_interface

The splice code did not consider compatibility between both ends
of the connection. Now we set different capabilities on each
stream interface, depending on what the protocol can splice to/from.
Right now, only TCP is supported. Thanks to this, we're now able to
automatically detect when splice() is not implemented and automatically
disable it on one end instead of reporting errors to the upper layer.

16 years ago[MEDIUM] session: rework buffer analysis to permit permanent analysers
Willy Tarreau [Sun, 28 Jun 2009 17:37:53 +0000 (19:37 +0200)] 
[MEDIUM] session: rework buffer analysis to permit permanent analysers

It will soon be necessary to support permanent analysers (eg: HTTP in
keep-alive mode). We first have to slightly rework the call to the
request analysers so that we don't force ->analysers to be 0 before
forwarding data.

16 years ago[MEDIUM] stream_sock: don't close prematurely when nolinger is set
Willy Tarreau [Sun, 28 Jun 2009 09:09:07 +0000 (11:09 +0200)] 
[MEDIUM] stream_sock: don't close prematurely when nolinger is set

When the nolinger option is used, we must not close too fast because
some data might be left unsent. Instead we must proceed with a normal
shutdown first, then a close. Also, we want to avoid merging FIN with
the last segment if nolinger is set, because if that one gets lost,
there is no chance for it to be retransmitted.

16 years ago[MEDIUM] config: support loading multiple configuration files
Willy Tarreau [Mon, 22 Jun 2009 14:02:30 +0000 (16:02 +0200)] 
[MEDIUM] config: support loading multiple configuration files

We now support up to 10 distinct configuration files. They are
all loaded in the order defined by -f <file1> -f <file2> ...

This can be useful in order to store global, private, public,
etc... configurations in distinct files.

16 years ago[MEDIUM] config: split parser and checker in two functions
Willy Tarreau [Mon, 22 Jun 2009 13:48:36 +0000 (15:48 +0200)] 
[MEDIUM] config: split parser and checker in two functions

This is a first step towards support of multiple configuration files.
Now readcfgfile() only reads a file in memory and performs very minimal
parsing. The checks are performed afterwards.

16 years ago[MAJOR] session: simplify buffer error handling
Willy Tarreau [Sun, 21 Jun 2009 20:43:05 +0000 (22:43 +0200)] 
[MAJOR] session: simplify buffer error handling

Buffer errors (timeouts and I/O errors) were handled at two places,
just after the analysers and after again.

Now that the timeout detection has moved, it has become easier to
handle those errors.

This has also made it possible for the request and response analysers
to be processed together as a down-up event, and all the up-down I/O
updates to be processed afterwards, which is exactly what we're looking
for. Interestingly this has reduced the number of iterations of
(stream_int, req_resp) from (5,6,5) to (5,5,4).

Several tests have been run without any issue found.

16 years ago[MAJOR] session: only check for timeouts when they have just occurred.
Willy Tarreau [Sun, 21 Jun 2009 20:03:51 +0000 (22:03 +0200)] 
[MAJOR] session: only check for timeouts when they have just occurred.

It's useless to check for buffer timeouts every time we call
process_session() because we already control when we set the flag. So
let's check them at the precise moment where the flag is set.

16 years ago[MAJOR] session: don't clear buffer status flags anymore
Willy Tarreau [Sun, 21 Jun 2009 19:45:58 +0000 (21:45 +0200)] 
[MAJOR] session: don't clear buffer status flags anymore

We want to be able to keep information about errors and timeouts
as long as possible in the buffer. Let's not clear these flags
anymore and keep them static. This does not seem to cause any
trouble, though a finer review might be wise.

16 years ago[MINOR] make DEFAULT_MAXCONN user-configurable at build time
Willy Tarreau [Mon, 15 Jun 2009 14:33:36 +0000 (16:33 +0200)] 
[MINOR] make DEFAULT_MAXCONN user-configurable at build time

The only way to set this previously was to set SYSTEM_MAXCONN
which serves a different purpose.

16 years ago[MEDIUM] support setting a server weight to zero
Willy Tarreau [Mon, 15 Jun 2009 08:56:05 +0000 (10:56 +0200)] 
[MEDIUM] support setting a server weight to zero

Sometimes it is useful to be able to set a server's weight to zero.
It allows the server to receive only persistent traffic but never
normal traffic.

16 years ago[MEDIUM] add support for TCP MSS adjustment for listeners
Willy Tarreau [Sun, 14 Jun 2009 16:48:19 +0000 (18:48 +0200)] 
[MEDIUM] add support for TCP MSS adjustment for listeners

Sometimes it can be useful to limit the advertised TCP MSS on
incoming connections, for instance when requests come through
a VPN or when the system is running with jumbo frames enabled.

Passing the "mss <value>" arguments to a "bind" line will set
the value. This works under Linux >= 2.6.28, and maybe a few
earlier ones, though due to an old kernel bug most of earlier
versions will probably ignore it. It is also possible that some
other OSes will support this.

16 years ago[BUILD] add support for build under Cygwin
Yitzhak Sapir [Sun, 14 Jun 2009 16:27:54 +0000 (18:27 +0200)] 
[BUILD] add support for build under Cygwin

After considering various possibilities, we compiled haproxy under cygwin.
Attached is an updated full diff that also has the TARGET=cygwin documented.
The whole thing compiles and installs with this diff only.

In cygwin 1.7 (now in beta), there is apparently support for ipv6.  Cygwin
1.5 (later versions, anyway) already includes some support in the form of a
define USE_IPV6.  When defined, it declares the sockaddr_in6 struct and
possibly other things.  The above definition AF_INET6=23 is taken from
their /usr/include/socket.h file (where it is #if 0'd out).

We are running into a socket limit.  It appears that Cygwin (running on
Windows 2003 Server) will only allow us to set ulimit -n (maximum open
files) to 3200, which means we're a little short of 1600 connections.

The limit of 3200 is an internal Cygwin limit.  Perhaps they can raise it in
the future.  Using the nbproc option, I was able to bring up 10 servers.  It
seems to me that they were able to handle over 2000 connections (even though
each had maxconn 1500 set, and the hard Cygwin fd limit).

16 years ago[MEDIUM] implement tcp-smart-connect option at the backend
Willy Tarreau [Sun, 14 Jun 2009 13:48:17 +0000 (15:48 +0200)] 
[MEDIUM] implement tcp-smart-connect option at the backend

This new option enables combining of request buffer data with
the initial ACK of an outgoing TCP connection. Doing so saves
one packet per connection which is quite noticeable on workloads
mostly consisting in small objects. The option is not enabled by
default.

16 years ago[MEDIUM] stream_sock: implement tcp-cork for use during shutdowns on Linux
Willy Tarreau [Sun, 14 Jun 2009 13:24:37 +0000 (15:24 +0200)] 
[MEDIUM] stream_sock: implement tcp-cork for use during shutdowns on Linux

Setting TCP_CORK on a socket before sending the last segment enables
automatic merging of this segment with the FIN from the shutdown()
call. Playing with TCP_CORK is not easy though as we have to track
the status of the TCP_NODELAY flag since both are mutually exclusive.
Doing so saves one more packet per session and offers about 5% more
performance.

There is no reason not to do it, so there is no associated option.

16 years ago[MEDIUM] implement option tcp-smart-accept at the frontend
Willy Tarreau [Sun, 14 Jun 2009 10:07:01 +0000 (12:07 +0200)] 
[MEDIUM] implement option tcp-smart-accept at the frontend

This option disables TCP quick ack upon accept. It is also
automatically enabled in HTTP mode, unless the option is
explicitly disabled with "no option tcp-smart-accept".

This saves one packet per connection which can bring reasonable
amounts of bandwidth for servers processing small requests.

16 years ago[MINOR] config: support resetting options do default values
Willy Tarreau [Sun, 14 Jun 2009 09:39:52 +0000 (11:39 +0200)] 
[MINOR] config: support resetting options do default values

A new keyword prefix "default" has been introduced in order to
reset some options to their default values. This can be needed
for instance when an option is forced disabled or enabled in a
defaults section and when later sections want to use automatic
settings regardless of what was specified there. Right now it
is only supported by options, just like the "no" prefix.

16 years ago[MINOR] config: track "no option"/"option" changes
Willy Tarreau [Sun, 14 Jun 2009 09:10:45 +0000 (11:10 +0200)] 
[MINOR] config: track "no option"/"option" changes

Sometimes we would want to implement implicit default options,
but for this we need to be able to disable them, which requires
to keep track of "no option" settings. With this change, an option
explicitly disabled in a defaults section will still be seen as
explicitly disabled. There should be no regression as nothing makes
use of this yet.

16 years ago[MEDIUM] add support for binding to source port ranges during connect
Willy Tarreau [Wed, 10 Jun 2009 09:09:37 +0000 (11:09 +0200)] 
[MEDIUM] add support for binding to source port ranges during connect

Some users are already hitting the 64k source port limit when
connecting to servers. The system usually maintains a list of
unused source ports, regardless of the source IP they're bound
to. So in order to go beyond the 64k concurrent connections, we
have to manage the source ip:port lists ourselves.

The solution consists in assigning a source port range to each
server and use a free port in that range when connecting to that
server, either for a proxied connection or for a health check.
The port must then be put back into the server's range when the
connection is closed.

This mechanism is used only when a port range is specified on
a server. It makes it possible to reach 64k connections per
server, possibly all from the same IP address. Right now it
should be more than enough even for huge deployments.

16 years ago[BUG] ensure that we correctly re-start old process in case of error
Willy Tarreau [Tue, 9 Jun 2009 12:36:00 +0000 (14:36 +0200)] 
[BUG] ensure that we correctly re-start old process in case of error

When a new process fails to grab some ports, it sends a signal to
the old process in order to release them. Then it tries to bind
again. If it still fails (eg: one of the ports is bound to a
completely different process), it must send the continue signal
to the old process so that this one re-binds to the ports. This
is correctly done, but the newly bound ports are not released
first, which sometimes causes the old process to remain running
with no port bound. The fix simply consists in unbinding all
ports before sending the signal to the old process.

16 years ago[MINOR] startup: don't imply -q with -D
Willy Tarreau [Mon, 18 May 2009 14:29:51 +0000 (16:29 +0200)] 
[MINOR] startup: don't imply -q with -D

It is recommended to have -D in init scripts, but -D also implies
quiet mode, which hides warning messages, and both options are now
completely unrelated. Remove the implication to get warnings with
-D.

16 years ago[DEV] open new 1.4 development branch v1.4-dev0
Willy Tarreau [Tue, 9 Jun 2009 09:59:08 +0000 (11:59 +0200)] 
[DEV] open new 1.4 development branch

This new branch is based on 1.3.18, which 1.4-dev0 is 100% equivalent to.

16 years ago[RELEASE] Released version 1.3.18 v1.3.18
Willy Tarreau [Sun, 10 May 2009 18:27:47 +0000 (20:27 +0200)] 
[RELEASE] Released version 1.3.18

Released version 1.3.18 with the following main changes :
    - [MEDIUM] add support for "balance hdr(name)"
    - [CLEANUP] give a little bit more information in error message
    - [MINOR] add X-Original-To: header
    - [BUG] x-original-to: fix missing initialization to default value
    - [BUILD] spec file: fix broken pipe during rpmbuild and add man file
    - [MINOR] improve reporting of misplaced acl/reqxxx rules
    - [MEDIUM] http: add options to ignore invalid header names
    - [MEDIUM] http: capture invalid requests/responses even if accepted
    - [BUILD] add format(printf) to printf-like functions
    - [MINOR] fix several printf formats and missing arguments
    - [BUG] stats: total and lbtot are unsigned
    - [MINOR] fix a few remaining printf-like formats on 64-bit platforms
    - [CLEANUP] remove unused make option from haproxy.spec
    - [BUILD] make it possible to pass alternative arch at build time
    - [MINOR] switch all stat counters to 64-bit
    - [MEDIUM] ensure we don't recursively call pool_gc2()
    - [CRITICAL] uninitialized response field can sometimes cause crashes
    - [BUG] fix wrong pointer arithmetics in HTTP message captures
    - [MINOR] rhel init script : support the reload operation
    - [MINOR] add basic signal handling functions
    - [BUILD] add signal.o to all makefiles
    - [MEDIUM] call signal_process_queue from run_poll_loop
    - [MEDIUM] pollers: don't wait if a signal is pending
    - [MEDIUM] convert all signals to asynchronous signals
    - [BUG] O(1) pollers should check their FD before closing it
    - [MINOR] don't close stdio fds twice
    - [MINOR] add options dontlog-normal and log-separate-errors
    - [DOC] minor fixes and rearrangements
    - [BUG] fix parser crash on unconditional tcp content rules
    - [DOC] rearrange the configuration manual and add a summary
    - [MINOR] standard: provide a new 'my_strndup' function
    - [MINOR] implement per-logger log level limitation
    - [MINOR] compute the max of sessions/s on fe/be/srv
    - [MINOR] stats: report max sessions/s and limit in CSV export
    - [MINOR] stats: report max sessions/s and limit in HTML stats
    - [MINOR] stats/html: use the arial font before helvetica

16 years ago[MINOR] stats/html: use the arial font before helvetica
Willy Tarreau [Sun, 10 May 2009 18:08:10 +0000 (20:08 +0200)] 
[MINOR] stats/html: use the arial font before helvetica

The stats HTML output were barely readable on some browsers such as
firefox on Linux, due to the selected helvetica font which is too
small. Specifying "arial" first fixes the issue without changing the
table size. Also, the default size of 0.8em choosen to get 10px out
of 12px is wrong because it gets 9px when rounded down.

16 years ago[MINOR] stats: report max sessions/s and limit in HTML stats
Willy Tarreau [Sun, 10 May 2009 17:19:41 +0000 (19:19 +0200)] 
[MINOR] stats: report max sessions/s and limit in HTML stats

16 years ago[MINOR] stats: report max sessions/s and limit in CSV export
Willy Tarreau [Sun, 10 May 2009 17:01:49 +0000 (19:01 +0200)] 
[MINOR] stats: report max sessions/s and limit in CSV export

16 years ago[MINOR] compute the max of sessions/s on fe/be/srv
Willy Tarreau [Sun, 10 May 2009 16:52:49 +0000 (18:52 +0200)] 
[MINOR] compute the max of sessions/s on fe/be/srv

Some users want to keep the max sessions/s seen on servers, frontends
and backends for capacity planning. It's easy to grab it while the
session count is updated, so let's keep it.

16 years ago[MINOR] implement per-logger log level limitation
Willy Tarreau [Sun, 10 May 2009 15:20:05 +0000 (17:20 +0200)] 
[MINOR] implement per-logger log level limitation

Some people are using haproxy in a shared environment where the
system logger by default sends alert and emerg messages to all
consoles, which happens when all servers go down on a backend for
instance. These people can not always change the system configuration
and would like to limit the outgoing messages level in order not to
disturb the local users.

The addition of an optional 4th field on the "log" line permits
exactly this. The minimal log level ensures that all outgoing logs
will have at least this level. So the logs are not filtered out,
just set to this level.

16 years ago[MEDIUM] add support for "balance hdr(name)"
Benoit [Wed, 25 Mar 2009 12:02:10 +0000 (13:02 +0100)] 
[MEDIUM] add support for "balance hdr(name)"

There is a patch made by me that allow for balancing on any http header
field.

[WT:
  made minor changes:
  - turned 'balance header name' into 'balance hdr(name)' to match more
    closely the ACL syntax for easier future convergence
  - renamed the proxy structure fields header_* => hh_*
  - made it possible to use the domain name reduction to any header, not
    only "host" since it makes sense to do it with other ones.
  Otherwise patch looks good.
/WT]

16 years ago[MINOR] standard: provide a new 'my_strndup' function
Willy Tarreau [Sun, 10 May 2009 13:41:18 +0000 (15:41 +0200)] 
[MINOR] standard: provide a new 'my_strndup' function

This function is only offered by GNU extensions and is sometimes
useful during configuration parsing.

16 years ago[DOC] rearrange the configuration manual and add a summary
Willy Tarreau [Sun, 10 May 2009 11:12:33 +0000 (13:12 +0200)] 
[DOC] rearrange the configuration manual and add a summary

Several people have asked for a summary in order to ease finding
of sections in the configuration manual. It was the opportunity to
tidy it up a bit and rearrange some sections.

16 years ago[BUG] fix parser crash on unconditional tcp content rules
Willy Tarreau [Sun, 10 May 2009 10:05:46 +0000 (12:05 +0200)] 
[BUG] fix parser crash on unconditional tcp content rules

Since 1.3.17, a config containing one of the following lines would
crash the parser :

    tcp content reject
    tcp content accept

This is because a check is performed on the condition which is not
specified. The obvious fix consists in checkinf for a condition
first.

16 years ago[DOC] minor fixes and rearrangements
Willy Tarreau [Sun, 10 May 2009 10:02:55 +0000 (12:02 +0200)] 
[DOC] minor fixes and rearrangements

Rearranged a few misplaced keywords, fixed a few typos and truncated
some long lines.

16 years ago[MINOR] add options dontlog-normal and log-separate-errors
Willy Tarreau [Sun, 10 May 2009 09:57:02 +0000 (11:57 +0200)] 
[MINOR] add options dontlog-normal and log-separate-errors

Some big traffic sites have trouble dealing with logs and tend to
disable them. Here are two new options to help cope with massive
logs.

  - dontlog-normal only disables logging for 100% successful
    connections, other ones will still be logged

  - log-separate-errors will cause non-100% successful connections
    to be logged at level "err" instead of level "info" so that a
    properly configured syslog daemon can send them to a different
    file for longer conservation.

16 years ago[MINOR] don't close stdio fds twice
Willy Tarreau [Sun, 10 May 2009 08:33:29 +0000 (10:33 +0200)] 
[MINOR] don't close stdio fds twice

This minor harmless bug dates back to v1.1. When fclose() was added,
the close() calls were not removed, so the fds 0,1,2 are closed twice.

16 years ago[BUG] O(1) pollers should check their FD before closing it
Willy Tarreau [Sun, 10 May 2009 08:18:54 +0000 (10:18 +0200)] 
[BUG] O(1) pollers should check their FD before closing it

epoll, sepoll and kqueue pollers should check that their fd is not
closed before attempting to close it, otherwise we can end up with
multiple closes of fd #0 upon exit, which is harmless but dirty.

16 years ago[MEDIUM] convert all signals to asynchronous signals
Willy Tarreau [Sun, 10 May 2009 07:59:50 +0000 (09:59 +0200)] 
[MEDIUM] convert all signals to asynchronous signals

The small list of signals currently handled by haproxy were processed
as soon as they were received. This has caused trouble with calls to
pool_gc2() occuring in the middle of libc's memory management functions
seldom causing deadlocks preventing the old process from leaving.

Now these signals use the new async signal framework and are called
asynchronously, when there is no risk of recursion. This ensures more
reliable operation, especially for sensible processing such as memory
management.

16 years ago[MEDIUM] pollers: don't wait if a signal is pending
Willy Tarreau [Sun, 10 May 2009 07:57:21 +0000 (09:57 +0200)] 
[MEDIUM] pollers: don't wait if a signal is pending

If an asynchronous signal is received outside of the poller, we don't
want the poller to wait for a timeout to occur before processing it,
so we set its timeout to zero, just like we do with pending tasks in
the run queue.

16 years ago[MEDIUM] call signal_process_queue from run_poll_loop
Willy Tarreau [Sun, 10 May 2009 07:01:21 +0000 (09:01 +0200)] 
[MEDIUM] call signal_process_queue from run_poll_loop

Now we check for asynchronous pending signals. There's no user yet
so this cannot cause any trouble.

16 years ago[BUILD] add signal.o to all makefiles
Willy Tarreau [Sun, 10 May 2009 07:00:20 +0000 (09:00 +0200)] 
[BUILD] add signal.o to all makefiles

16 years ago[MINOR] add basic signal handling functions
Willy Tarreau [Sun, 10 May 2009 06:53:33 +0000 (08:53 +0200)] 
[MINOR] add basic signal handling functions

These functions will be used to deliver asynchronous signals in order
to make the signal handling functions more robust. The goal is to keep
the same interface to signal handlers.

16 years ago[BUG] x-original-to: fix missing initialization to default value
Maik Broemme [Fri, 8 May 2009 15:02:07 +0000 (17:02 +0200)] 
[BUG] x-original-to: fix missing initialization to default value

16 years ago[MINOR] add X-Original-To: header
Maik Broemme [Fri, 17 Apr 2009 16:53:21 +0000 (18:53 +0200)] 
[MINOR] add X-Original-To: header

I have attached a patch which will add on every http request a new
header 'X-Original-To'. If you have HAProxy running in transparent mode
with a big number of SQUID servers behind it, it is very nice to have
the original destination ip as a common header to make decisions based
on it.

The whole thing is configurable with a new option 'originalto'. I have
updated the sourcecode as well as the documentation. The 'haproxy-en.txt'
and 'haproxy-fr.txt' files are untouched, due to lack of my french
language knowledge. ;)

Also the patch adds this header for IPv4 only. I haven't any IPv6 test
environment running here and don't know if getsockopt() with SO_ORIGINAL_DST
will work on IPv6. If someone knows it and wants to test it I can modify
the diff. Feel free to ask me questions or things which should be changed. :)

--Maik

16 years ago[MINOR] rhel init script : support the reload operation
Willy Tarreau [Fri, 1 May 2009 13:49:56 +0000 (15:49 +0200)] 
[MINOR] rhel init script : support the reload operation

The reload operation in the Red Hat init script caused a restart
which is not always the best thing to do. Implement the reload.

16 years ago[BUG] fix wrong pointer arithmetics in HTTP message captures
Willy Tarreau [Fri, 1 May 2009 09:33:17 +0000 (11:33 +0200)] 
[BUG] fix wrong pointer arithmetics in HTTP message captures

The pointer arithmetics was wrong in http_capture_bad_message().
This has no impact right now because the error only msg->som was
affected and right now it's always 0. But this was a bug waiting
for keepalive support to strike.

16 years ago[CRITICAL] uninitialized response field can sometimes cause crashes
Willy Tarreau [Mon, 27 Apr 2009 06:11:33 +0000 (08:11 +0200)] 
[CRITICAL] uninitialized response field can sometimes cause crashes

The response message in the transaction structure was not properly
initialised at session initialisation. In theory it cannot cause any
trouble since the affected field os expected to always remain NULL.
However, in some circumstances, such as building on 64-bit platforms
with certain options, the struct session can be exactly 1024 bytes,
the same size of the requri field, so the pools are merged and the
uninitialised field may contain non-null data, causing crashes if
an invalid response is encountered and archived.

The fix simply consists in correctly initialising the missing fields.
This bug cannot affect architectures where the session pool is not
shared (32-bit architectures), but this is only by pure luck.

16 years ago[MEDIUM] ensure we don't recursively call pool_gc2()
Willy Tarreau [Tue, 21 Apr 2009 00:17:45 +0000 (02:17 +0200)] 
[MEDIUM] ensure we don't recursively call pool_gc2()

A race condition exists in the hot reconfiguration code. It is
theorically possible that the second signal is sent during a free()
in the first list, which can cause crashes or freezes (the later
have been observed). Just set up a counter to ensure we do not
recurse.

16 years ago[MINOR] switch all stat counters to 64-bit
Willy Tarreau [Sat, 11 Apr 2009 18:44:08 +0000 (20:44 +0200)] 
[MINOR] switch all stat counters to 64-bit

The byte counters have long been 64-bit to avoid overflows. But with
several sites nowadays, we see session counters wrap around every 10-days
or so. So it was the moment to switch counters to 64-bit, including
error and warning counters which can theorically rise as fast as session
counters even if in practice there is very low risk.

The performance impact should not be noticeable since those counters are
only updated once per session. The stats output have been carefully checked
for proper types on both 32- and 64-bit platforms.

16 years ago[BUILD] make it possible to pass alternative arch at build time
Willy Tarreau [Sat, 11 Apr 2009 17:45:50 +0000 (19:45 +0200)] 
[BUILD] make it possible to pass alternative arch at build time

When trying to build a 32-bit binary on a 64-bit platform, we generally
need to pass "-m32" to gcc, which is not convenient with current makefile.
Note that this option requires gcc >= 3.

In order to ease parameter passing, a new ARCH= makefile option has been
added. If it receives a target architecture, according "-m32"/"-m64" and
"-march=xxxx" will be passed to gcc. Only the generic makefile has been
changed to support this option right now as the need only appeared on Linux.

The spec file now makes use of this option so that rpmbuild can automatically
build with the proper architecture.

16 years ago[CLEANUP] remove unused make option from haproxy.spec
Willy Tarreau [Sat, 11 Apr 2009 17:44:17 +0000 (19:44 +0200)] 
[CLEANUP] remove unused make option from haproxy.spec

16 years ago[MINOR] fix a few remaining printf-like formats on 64-bit platforms
Willy Tarreau [Sat, 11 Apr 2009 17:42:49 +0000 (19:42 +0200)] 
[MINOR] fix a few remaining printf-like formats on 64-bit platforms

Mainly two sizeof() returning size_t which is not the size of an int
on 64-bit platforms.

16 years ago[BUG] stats: total and lbtot are unsigned
Willy Tarreau [Tue, 7 Apr 2009 11:27:40 +0000 (13:27 +0200)] 
[BUG] stats: total and lbtot are unsigned

Some big users are seeing negative numbers in the CSV stats. This patch
needs to be backported to 1.3.15 and extended to the HTML part.

16 years ago[BUILD] spec file: fix broken pipe during rpmbuild and add man file
Sébastien Barrier [Thu, 2 Apr 2009 13:09:35 +0000 (15:09 +0200)] 
[BUILD] spec file: fix broken pipe during rpmbuild and add man file

16 years ago[CLEANUP] give a little bit more information in error message
Jeffrey 'jf' Lim [Thu, 2 Apr 2009 13:53:56 +0000 (21:53 +0800)] 
[CLEANUP] give a little bit more information in error message

Indicate the error is about redirection.

16 years ago[MINOR] fix several printf formats and missing arguments
Willy Tarreau [Fri, 3 Apr 2009 12:49:12 +0000 (14:49 +0200)] 
[MINOR] fix several printf formats and missing arguments

Last patch revealed a number of mistakes in printf-like calls, mostly int/long
mismatches, and a few missing arguments.

16 years ago[BUILD] add format(printf) to printf-like functions
Willy Tarreau [Fri, 3 Apr 2009 10:01:47 +0000 (12:01 +0200)] 
[BUILD] add format(printf) to printf-like functions

Doing this helps catching warnings about wrong output formats.