]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
8 years agoMINOR: http/conf: store the use_backend configuration file and line for logs
Thierry FOURNIER / OZON.IO [Thu, 24 Nov 2016 22:57:54 +0000 (23:57 +0100)] 
MINOR: http/conf: store the use_backend configuration file and line for logs

The error log of the directive use_backend doesn't provide the
file and line containing the declaration. This patch stores
theses informations.

8 years agoBUG/MINOR: conf: calloc untested
Thierry FOURNIER / OZON.IO [Thu, 24 Nov 2016 22:58:32 +0000 (23:58 +0100)] 
BUG/MINOR: conf: calloc untested

A calloc is executed without check of its returns code.

8 years agoMINOR: lua: Add tokenize function.
Thierry FOURNIER / OZON.IO [Thu, 24 Nov 2016 19:48:38 +0000 (20:48 +0100)] 
MINOR: lua: Add tokenize function.

For tokenizing a string, standard Lua recommends to use regexes.
The followinf example splits words:

   for i in string.gmatch(example, "%S+") do
      print(i)
   end

This is a little bit overkill for simply split words. This patch
adds a tokenize function which quick and do not use regexes.

8 years agoMINOR: lua: add utility function for check boolean argument
Thierry FOURNIER / OZON.IO [Thu, 24 Nov 2016 19:37:38 +0000 (20:37 +0100)] 
MINOR: lua: add utility function for check boolean argument

Strangely, the Lua API doesn't provides a function like
luaL_checkboolean(). This little function add this one.

8 years agoBUILD: vars: remove a build warning on vars.c
Willy Tarreau [Thu, 24 Nov 2016 20:23:28 +0000 (21:23 +0100)] 
BUILD: vars: remove a build warning on vars.c

gcc 3.4.6 noticed a possibly unitialized variable in vars.c, and while it
cannot happen the way the function is used, it's surprizing that newer
versions did not report it.

This fix may be backported to 1.6.

8 years agoBUILD: ssl: make the SSL layer build again with openssl 0.9.8
Willy Tarreau [Thu, 24 Nov 2016 19:07:11 +0000 (20:07 +0100)] 
BUILD: ssl: make the SSL layer build again with openssl 0.9.8

Commit 1866d6d ("MEDIUM: ssl: Add support for OpenSSL 1.1.0")
introduced support for openssl 1.1.0 and temporarily broke 0.9.8.
In the end the port was not very hard given that the only cause of
build failures were functions supposedly absent from 0.9.8 that in
fact did exist.

Thus, adding a new #if to move these functions for versions older
than 0.9.8 was enough to fix the trouble. It received very light
testing, basically only an SSL bridge decrypting and re-encrypting
traffic, and checking that everything looks right. That said, the
functions specific to 0.9.8 here compared to 1.0.x are only
SSL_SESSION_set1_id_context(), EVP_PKEY_base_id(), and
X509_PUBKEY_get0_param().

8 years agoMEDIUM: log-format/conf: take into account the parse_logformat_string() return code
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 22:50:02 +0000 (23:50 +0100)] 
MEDIUM: log-format/conf: take into account the parse_logformat_string() return code

This patch takes into account the return code of the parse_logformat_string()
function. Now the configuration parser will fail if the log_format is not
strict.

8 years agoMEDIUM: log-format: strict parsing and enable fail
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 22:11:21 +0000 (23:11 +0100)] 
MEDIUM: log-format: strict parsing and enable fail

Until now, the function parse_logformat_string() never fails. It
send warnings when it parses bad format, and returns expression in
best effort.

This patch replaces warnings by alert and returns a fail code.

Maybe the warning mode is designed for a compatibility with old
configuration versions. If it is the case, now this compatibility
is broken.

[wt: no, the reason is that an alert must cause a startup failure,
 but this will be OK with next patch]

8 years agoCLEANUP: log-format: remove unused arguments
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 21:33:24 +0000 (22:33 +0100)] 
CLEANUP: log-format: remove unused arguments

The log-format function parse_logformat_string() takes file and line
for building parsing logs. These two parameters are embedded in the
struct proxy curproxy, which is the current parsing context.

This patch removes these two unused arguments.

8 years agoCLEANUP: log-format: fix return code of function parse_logformat_var_args()
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 22:13:04 +0000 (23:13 +0100)] 
CLEANUP: log-format: fix return code of function parse_logformat_var_args()

This patch replace the successful return code from 0 to 1. The
error code is replaced from 1 to 0.

The return code of this function is actually unused, so this
patch cannot modify the behaviour.

8 years agoCLEANUP: log-format: fix return code of the function parse_logformat_var()
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 21:06:04 +0000 (22:06 +0100)] 
CLEANUP: log-format: fix return code of the function parse_logformat_var()

This patch replaces the successful return code from 0 to 1. The
error code is replaced from -1 to 0.

The return code of this function is actually unused, so this
patch cannot modify the behaviour.

8 years agoCLEANUP/MINOR: log-format: unexport functions parse_logformat_var_args() and parse_lo...
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 22:17:19 +0000 (23:17 +0100)] 
CLEANUP/MINOR: log-format: unexport functions parse_logformat_var_args() and parse_logformat_var()

Remove export of the fucntion parse_logformat_var_args() and
parse_logformat_var(). These functions are a part of the
logformat parser, and this export is useless.

8 years agoCLEANUP: log-format: useless file and line in json converter
Thierry FOURNIER / OZON.IO [Wed, 23 Nov 2016 00:13:57 +0000 (01:13 +0100)] 
CLEANUP: log-format: useless file and line in json converter

The caller must log location information, so this information is
provided two times in the log line. The error log is like this:

   [ALERT] 327/011513 (14291) : parsing [o3.conf:38]: 'http-response
   set-header': Sample fetch <method,json(rrr)> failed with : invalid
   args in conv method 'json' : Unexpected input code type at file
   'o3.conf', line 38. Allowed value are 'ascii', 'utf8', 'utf8s',
   'utf8p' and 'utf8ps'.

This patch removes the second location indication, the the same error
becomes:

   [ALERT] 327/011637 (14367) : parsing [o3.conf:38]: 'http-response
   set-header': Sample fetch <method,json(rrr)> failed with : invalid
   args in conv method 'json' : Unexpected input code type. Allowed
   value are 'ascii', 'utf8', 'utf8s', 'utf8p' and 'utf8ps'.

8 years agoBUG/MINOR: log-format: uncatched memory allocation functions
Thierry FOURNIER / OZON.IO [Tue, 22 Nov 2016 22:24:10 +0000 (23:24 +0100)] 
BUG/MINOR: log-format: uncatched memory allocation functions

Some return code of memory allocation functions are not tested.
This patch fix theses checks.

8 years agoBUILD: server: remove a build warning introduced by latest series
Willy Tarreau [Thu, 24 Nov 2016 16:32:01 +0000 (17:32 +0100)] 
BUILD: server: remove a build warning introduced by latest series

We get this when Lua is disabled, just a missing include.

In file included from src/queue.c:18:0:
include/proto/server.h:51:39: warning: 'struct appctx' declared inside parameter list [enabled by default]

8 years agoCLEANUP: cli: remove assignments to st0 and st2 in keyword parsers
Willy Tarreau [Thu, 24 Nov 2016 15:45:53 +0000 (16:45 +0100)] 
CLEANUP: cli: remove assignments to st0 and st2 in keyword parsers

Now it's not needed anymore to set STAT_ST_INIT nor CLI_ST_CALLBACK
in the parsers, remove it in the various places.

8 years agoCLEANUP: cli: simplify the request parser a little bit
Willy Tarreau [Thu, 24 Nov 2016 15:23:38 +0000 (16:23 +0100)] 
CLEANUP: cli: simplify the request parser a little bit

stats_sock_parse_request() was renamed cli_parse_request(). It now takes
an appctx instead of a stream interface, and presets ->st2 to 0 so that
most handlers will not have to set it anymore. The io_handler is set by
default to the keyword's IO handler so that the parser can simply change
it without having to rewrite the new state.

8 years agoCLEANUP: cli: rename STAT_CLI_* to CLI_ST_*
Willy Tarreau [Thu, 24 Nov 2016 14:53:53 +0000 (15:53 +0100)] 
CLEANUP: cli: rename STAT_CLI_* to CLI_ST_*

These are in CLI states, not stats states anymore. STAT_CLI_O_CUSTOM
was more appropriately renamed CLI_ST_CALLBACK.

8 years agoREORG: cli: move the "set rate-limit" functions to their own parser
Willy Tarreau [Thu, 24 Nov 2016 13:51:17 +0000 (14:51 +0100)] 
REORG: cli: move the "set rate-limit" functions to their own parser

All 4 rate-limit settings were handled at once given that exactly the
same checks are performed on them. In case of missing or incorrect
argument, the detailed supported options are printed with their use
case.

This was the last specific entry in the CLI parser, some additional
cleanup may still be done.

8 years agoREORG: cli: move "{enable|disable} agent" to server.c
Willy Tarreau [Thu, 24 Nov 2016 11:56:01 +0000 (12:56 +0100)] 
REORG: cli: move "{enable|disable} agent" to server.c

Also mention that "set server" is preferred now. Note that these
were the last enable/disable commands in cli.c. Also remove the
now unused expect_server_admin() function.

8 years agoREORG: cli: move "{enable|disable} health" to server.c
Willy Tarreau [Thu, 24 Nov 2016 11:51:04 +0000 (12:51 +0100)] 
REORG: cli: move "{enable|disable} health" to server.c

Also mention that "set server" is preferred now.

8 years agoREORG: cli: move "{enable|disable} server" to server.c
Willy Tarreau [Thu, 24 Nov 2016 11:47:00 +0000 (12:47 +0100)] 
REORG: cli: move "{enable|disable} server" to server.c

Also mention that "set server" is preferred now.

8 years agoREORG: cli: move "{enable|disable} frontend" to proxy.c
Willy Tarreau [Thu, 24 Nov 2016 10:55:28 +0000 (11:55 +0100)] 
REORG: cli: move "{enable|disable} frontend" to proxy.c

These are the last frontend-specific actions on the CLI. The function
expect_frontend_admin() which is not used anymore was removed.

8 years agoREORG: cli: move "shutdown frontend" to proxy.c
Willy Tarreau [Thu, 24 Nov 2016 10:13:06 +0000 (11:13 +0100)] 
REORG: cli: move "shutdown frontend" to proxy.c

Now we don't have any "shutdown" commands left in cli.c.

8 years agoREORG: cli: move "shutdown session" to stream.c
Willy Tarreau [Thu, 24 Nov 2016 10:09:25 +0000 (11:09 +0100)] 
REORG: cli: move "shutdown session" to stream.c

It really kills streams in fact, but we can't change the name now.

8 years agoREORG: cli: move "shutdown sessions server" to stream.c
Willy Tarreau [Wed, 23 Nov 2016 15:50:48 +0000 (16:50 +0100)] 
REORG: cli: move "shutdown sessions server" to stream.c

It could be argued that it's between server, stream and session but
at least due to the fact that it operates on streams, its best place
is in stream.c.

8 years agoREORG: cli: move "set maxconn frontend" to proxy.c
Willy Tarreau [Wed, 23 Nov 2016 15:22:04 +0000 (16:22 +0100)] 
REORG: cli: move "set maxconn frontend" to proxy.c

And get rid of the last specific "set maxconn" case.

8 years agoREORG: cli: move "set maxconn server" to server.c
Willy Tarreau [Wed, 23 Nov 2016 10:26:56 +0000 (11:26 +0100)] 
REORG: cli: move "set maxconn server" to server.c

It's used to manipulate the server's maxconn setting.

8 years agoREORG: cli: move "set maxconn global" to its own handler
Willy Tarreau [Wed, 23 Nov 2016 10:10:59 +0000 (11:10 +0100)] 
REORG: cli: move "set maxconn global" to its own handler

The code remained in the same file, it just simplifies the parser
and makes use of cli_has_level().

8 years agoREORG: cli: move "clear counters" to stats.c
Willy Tarreau [Wed, 23 Nov 2016 10:02:40 +0000 (11:02 +0100)] 
REORG: cli: move "clear counters" to stats.c

This command is only used to clear stats. It now relies on cli_has_level()
to validate the permissions.

8 years agoREORG: cli: move "set timeout" to its own handler
Willy Tarreau [Tue, 22 Nov 2016 19:33:32 +0000 (20:33 +0100)] 
REORG: cli: move "set timeout" to its own handler

The code remained in the same file, it just simplifies the parser.

8 years agoREORG: cli: make "show env" also use the generic keyword registration
Willy Tarreau [Tue, 22 Nov 2016 19:21:23 +0000 (20:21 +0100)] 
REORG: cli: make "show env" also use the generic keyword registration

This way we don't have any more state specific to a given yieldable
command. The other commands should be easier to move as they only
involve a parser.

8 years agoREORG: cli: move "show errors" out of cli.c
Willy Tarreau [Tue, 22 Nov 2016 18:48:51 +0000 (19:48 +0100)] 
REORG: cli: move "show errors" out of cli.c

It really belongs to proto_http.c since it's a dump for HTTP request
and response errors. Note that it's possible that some parts do not
need to be exported anymore since it really is the only place where
errors are manipulated.

8 years agoREORG: cli: move table dump/clear/set to stick_table.c
Willy Tarreau [Tue, 22 Nov 2016 17:00:53 +0000 (18:00 +0100)] 
REORG: cli: move table dump/clear/set to stick_table.c

The table dump code was a horrible mess, with common parts interleaved
all the way to deal with the various actions (set/clear/show). A few
error messages were still incorrect, as the "set" operation did not
update them so they would still report "unknown action" (now fixed).

The action was now passed as a private argument to the CLI keyword
which itself is copied into the appctx private field. It's just an
int cast to a pointer.

Some minor issues were noticed while doing this, for example when dumping
an entry by key, if the key doesn't exist, nothing is printed, not even
the table's header. It's unclear whether this was intentional but it
doesn't really match what is done for data-based dumps. It was left
unchanged for now so that a later fix can be backported if needed.

Enum entries STAT_CLI_O_TAB, STAT_CLI_O_CLR and STAT_CLI_O_SET were
removed.

8 years agoREORG: cli: move dump_text(), dump_text_line(), and dump_binary() to standard.c
Willy Tarreau [Tue, 22 Nov 2016 17:00:20 +0000 (18:00 +0100)] 
REORG: cli: move dump_text(), dump_text_line(), and dump_binary() to standard.c

These are general purpose functions, move them away.

8 years agoREORG: cli: move "show info" to stats.c
Willy Tarreau [Tue, 22 Nov 2016 15:36:53 +0000 (16:36 +0100)] 
REORG: cli: move "show info" to stats.c

Move the "show info" command to stats.c using the CLI keyword API
to register it on the CLI. The stats_dump_info_to_buffer() function
is now static again. Note, we don't need proto_ssl anymore in cli.c.

8 years agoREORG: cli: move "show stat" to stats.c
Willy Tarreau [Tue, 22 Nov 2016 15:18:05 +0000 (16:18 +0100)] 
REORG: cli: move "show stat" to stats.c

Move the "show stat" command to stats.c using the CLI keyword API
to register it on the CLI. The stats_dump_stat_to_buffer() function
is now static again.

8 years agoREORG: cli: move get/set weight to server.c
William Lallemand [Tue, 22 Nov 2016 11:34:35 +0000 (12:34 +0100)] 
REORG: cli: move get/set weight to server.c

Move get/set weight CLI functions to server.c and use the cli keyword API
to register it on the CLI.

8 years agoREORG: cli: move 'show backend' to proxy.c
William Lallemand [Tue, 22 Nov 2016 11:34:16 +0000 (12:34 +0100)] 
REORG: cli: move 'show backend' to proxy.c

Move 'show backend' CLI functions to proxy.c and use the cli keyword API
to register it on the CLI.

8 years agoREORG: cli: move 'show sess' to stream.c
William Lallemand [Mon, 21 Nov 2016 07:51:11 +0000 (08:51 +0100)] 
REORG: cli: move 'show sess' to stream.c

Move 'show sess' CLI functions to stream.c and use the cli keyword API
to register it on the CLI.

[wt: the choice of stream vs session makes sense because since 1.6 these
 really are streams that we're dumping and not sessions anymore]

8 years agoREORG: cli: move 'show servers' to proxy.c
William Lallemand [Sat, 19 Nov 2016 01:25:36 +0000 (02:25 +0100)] 
REORG: cli: move 'show servers' to proxy.c

Move 'show servers' CLI functions to proxy.c and use the cli keyword
API to register it on the CLI.

8 years agoREORG: cli: move 'show pools' to memory.c
William Lallemand [Sat, 19 Nov 2016 01:25:36 +0000 (02:25 +0100)] 
REORG: cli: move 'show pools' to memory.c

Move 'show pools' CLI functions to memory.c and use the cli keyword
API to register it on the CLI.

8 years agoREORG: cli: move 'set server' to server.c
William Lallemand [Sat, 19 Nov 2016 01:00:33 +0000 (02:00 +0100)] 
REORG: cli: move 'set server' to server.c

Move 'set server' CLI functions to server.c and use the cli keyword API
to register it on the CLI.

8 years agoMINOR: proxy: create new function cli_find_frontend() to find a frontend
Willy Tarreau [Thu, 24 Nov 2016 11:02:29 +0000 (12:02 +0100)] 
MINOR: proxy: create new function cli_find_frontend() to find a frontend

Several CLI commands require a frontend, so let's have a function to
look this one up and prepare the appropriate error message and the
appctx's state in case of failure.

8 years agoMINOR: server: create new function cli_find_server() to find a server
Willy Tarreau [Wed, 23 Nov 2016 16:15:08 +0000 (17:15 +0100)] 
MINOR: server: create new function cli_find_server() to find a server

Several CLI commands require a server, so let's have a function to
look this one up and prepare the appropriate error message and the
appctx's state in case of failure.

8 years agoMINOR: cli: create new function cli_has_level() to validate permissions
Willy Tarreau [Wed, 23 Nov 2016 16:01:39 +0000 (17:01 +0100)] 
MINOR: cli: create new function cli_has_level() to validate permissions

This function is used to check that the CLI features the appropriate
level of permissions or to prepare the adequate error message.

8 years agoREORG: cli: move show stat resolvers to dns.c
William Lallemand [Fri, 18 Nov 2016 23:58:54 +0000 (00:58 +0100)] 
REORG: cli: move show stat resolvers to dns.c

Move dns CLI functions to dns.c and use the cli keyword API to register
actions on the CLI.

8 years agoREORG: cli: move map and acl code to map.c
William Lallemand [Fri, 18 Nov 2016 18:26:17 +0000 (19:26 +0100)] 
REORG: cli: move map and acl code to map.c

Move map and acl CLI functions to map.c and use the cli keyword API to
register actions on the CLI. Then remove the now unused individual
"add" and "del" keywords.

8 years agoREORG: cli: move ssl CLI functions to ssl_sock.c
William Lallemand [Sat, 29 Oct 2016 16:09:35 +0000 (18:09 +0200)] 
REORG: cli: move ssl CLI functions to ssl_sock.c

Move ssl CLI functions to ssl_sock.c and use the cli keyword API to
register ssl actions on the CLI.

8 years agoREORG: cli: split dumpstats.h in stats.h and cli.h
William Lallemand [Mon, 21 Nov 2016 16:49:11 +0000 (17:49 +0100)] 
REORG: cli: split dumpstats.h in stats.h and cli.h

proto/dumpstats.h has been split in 4 files:

  * proto/cli.h  contains protypes for the CLI
  * proto/stats.h contains prototypes for the stats
  * types/cli.h contains definition for the CLI
  * types/stats.h contains definition for the stats

8 years agoREORG: cli: split dumpstats.c in src/cli.c and src/stats.c
William Lallemand [Mon, 21 Nov 2016 16:18:36 +0000 (17:18 +0100)] 
REORG: cli: split dumpstats.c in src/cli.c and src/stats.c

dumpstats.c was containing either the stats code and the CLI code.
The cli code has been moved to cli.c and the stats code to stats.c

8 years agoMINOR: connection: add names for transport and data layers
Willy Tarreau [Thu, 24 Nov 2016 15:58:12 +0000 (16:58 +0100)] 
MINOR: connection: add names for transport and data layers

This makes debugging easier and avoids having to put ugly checks
against certain well-known internal struct pointers.

8 years agoMINOR: connection: add a few functions to report the data and xprt layers' names
Willy Tarreau [Wed, 23 Nov 2016 17:00:08 +0000 (18:00 +0100)] 
MINOR: connection: add a few functions to report the data and xprt layers' names

These functions will be needed by "show sess" on the CLI, let's make them
globally available. It's important to note that due to the fact that we
still do not set the data and transport layers' names in the structures,
we still have to rely on some exports just to match the pointers. This is
ugly but is preferable to adding many includes since the short-term goal
is to get rid of these tests by having proper names in place.

8 years agoBUG/MINOR: cli: wake up the CLI's task after a timeout update
Willy Tarreau [Thu, 24 Nov 2016 14:35:16 +0000 (15:35 +0100)] 
BUG/MINOR: cli: wake up the CLI's task after a timeout update

When the CLI's timeout is reduced, nothing was done to take the task
up to update it. In the past it used to run inside process_stream()
so it used to be refreshed. This is not the case anymore since we have
the appctx so the task needs to be woken up in order to recompute the
new expiration date.

This fix needs to be backported to 1.6.

8 years agoBUG/MINOR: cli: dequeue from the proxy when changing a maxconn
Willy Tarreau [Thu, 24 Nov 2016 14:25:39 +0000 (15:25 +0100)] 
BUG/MINOR: cli: dequeue from the proxy when changing a maxconn

The "set maxconn frontend" statement on the CLI tries to dequeue possibly
pending requests, but due to a copy-paste error, they're dequeued on the
CLI's frontend instead of the one being changed.

The impact is very minor as it only means that possibly pending connections
will still have to wait for a previous one to complete before being accepted
when a limit is raised.

This fix has to be backported to 1.6 and 1.5.

8 years agoBUG/MINOR: cli: fix pointer size when reporting data/transport layer name
Willy Tarreau [Thu, 24 Nov 2016 14:21:26 +0000 (15:21 +0100)] 
BUG/MINOR: cli: fix pointer size when reporting data/transport layer name

In dumpstats.c we have get_conn_xprt_name() and get_conn_data_name() to
report the name of the data and transport layers used on a connection.
But when the name is not known, its pointer is reported instead. But the
static char used to report the pointer is too small as it doesn't leave
room for '0x'. Fortunately all subsystems are known so we never trigger
this case.

This fix needs to be backported to 1.6 and 1.5.

8 years agoBUILD: fix build on Solaris 10/11
David Carlier [Sun, 20 Nov 2016 10:42:38 +0000 (10:42 +0000)] 
BUILD: fix build on Solaris 10/11

uint16_t instead of u_int16_t
None ISO fields of struct tm are not present, but
by zeroyfing it, on GNU and BSD systems tm_gmtoff
field will be set.

[wt: moved the memset into each of the date functions]

8 years agoBUILD: contrib: fix ip6range build on Centos 7
Willy Tarreau [Tue, 22 Nov 2016 10:50:51 +0000 (11:50 +0100)] 
BUILD: contrib: fix ip6range build on Centos 7

Jarno Huuskonen reported that ip6range doesn't build anymore on
Centos 7 (and possibly other distros) due to "in6_u" not being known.
Using s6_addr32 instead of in6_u.u6_addr32 apparently works fine, and
it's also what the Lua code uses so it should be OK.

This patch may be backported to 1.6.

8 years agoMINOR: stats: correct documentation of process ID for typed output
Simon Horman [Mon, 21 Nov 2016 16:00:24 +0000 (17:00 +0100)] 
MINOR: stats: correct documentation of process ID for typed output

The process ID appears at the end of the first column rather than
the line.

8 years agoMINOR: spoe: Add "option set-on-error" statement
Christopher Faulet [Wed, 16 Nov 2016 14:36:19 +0000 (15:36 +0100)] 
MINOR: spoe: Add "option set-on-error" statement

It defines the variable to set when an error occurred during an event
processing. It will only be set when an error occurred in the scope of the
transaction. As for all other variables define by the SPOE, it will be
prefixed. So, if your variable name is "error" and your prefix is "my_spoe_pfx",
the variable will be "txn.my_spoe_pfx.error".

When set, the variable is the boolean "true". Note that if "option
continue-on-error" is set, the variable is not automatically removed between
events processing.

8 years agoMINOR: spoe: Add "maxconnrate" and "maxerrrate" statements
Christopher Faulet [Wed, 16 Nov 2016 14:01:12 +0000 (15:01 +0100)] 
MINOR: spoe: Add "maxconnrate" and "maxerrrate" statements

"maxconnrate" is the maximum number of connections per second. The SPOE will
stop to open new connections if the maximum is reached and will wait to acquire
an existing one.

"maxerrrate" is the maximum number of errors per second. The SPOE will stop its
processing if the maximum is reached.

These options replace hardcoded macros MAX_NEW_SPOE_APPLETS and
MAX_NEW_SPOE_APPLET_ERRS. We use it to limit SPOE activity, especially when
servers are down..

8 years agoMINOR: spoe: Add 'option continue-on-error' statement in spoe-agent section
Christopher Faulet [Mon, 14 Nov 2016 09:54:21 +0000 (10:54 +0100)] 
MINOR: spoe: Add 'option continue-on-error' statement in spoe-agent section

By default, for a specific stream, when an abnormal/unexpected error occurs, the
SPOE is disabled for all the transaction. So if you have several events
configured, such error on an event will disabled all followings. For TCP
streams, this will disable the SPOE for the whole session. For HTTP streams,
this will disable it for the transaction (request and response).

To bypass this behaviour, you can set 'continue-on-error' option in 'spoe-agent'
section. With this option, only the current event will be ignored.

8 years agoMINOR: spoe: Remove useless 'timeout ack' option
Christopher Faulet [Sat, 19 Nov 2016 15:47:56 +0000 (16:47 +0100)] 
MINOR: spoe: Remove useless 'timeout ack' option

To limit the time to process an event, you should set 'timeout processing'
option. So 'timeout ack' option is redundant and useless.

8 years agoMINOR: spoe: Add 'timeout processing' option to limit time to process an event
Christopher Faulet [Thu, 10 Nov 2016 14:04:51 +0000 (15:04 +0100)] 
MINOR: spoe: Add 'timeout processing' option to limit time to process an event

It is a way to set the maximum time to wait for a stream to process an event,
i.e to acquire a stream to talk with an agent, to encode all messages, to send
the NOTIFY frame, to receive the corrsponding acknowledgement and to process all
actions. It is applied on the stream that handle the client and the server
sessions.

8 years agoMINOR: filters: Add check_timeouts callback to handle timers expiration on streams
Christopher Faulet [Thu, 10 Nov 2016 13:58:05 +0000 (14:58 +0100)] 
MINOR: filters: Add check_timeouts callback to handle timers expiration on streams

A filter can now be notified when a stream is woken up because of an expired
timer.

The documentation and the TRACE filter have been updated.

8 years agoBUG/MEDIUM: lua: In some case, the return of sample-fetche is ignored
Thierry FOURNIER / OZON.IO [Fri, 18 Nov 2016 18:06:21 +0000 (19:06 +0100)] 
BUG/MEDIUM: lua: In some case, the return of sample-fetche is ignored

When:

 - A Lua action return data and close the channel. The request status
   is set to HTTP_MSG_CLOSED for the request and HTTP_MSG_DONE for the
   response.

 - HAProxy sets the state HTTP_MSG_ERROR. I don't known why, because
   there are many line which sets this state.

 - A Lua sample-fetch is executed, typically for building the log
   line.

 - When the Lua sample fetch exits, a control of the data is
   executed. If HAProxy is currently parsing the request, the request
   is aborted in order to prevent a segfault or sending corrupted
   data.

This ast control is executed comparing the state HTTP_MSG_BODY. When
this state is reached, the request is parsed and no error are
possible. When the state is < than HTTP_MSG_BODY, the parser is
running.

Unfortunately, the code HTTP_MSG_ERROR is just < HTTP_MSG_BODY. When
we are in error, we want to terminate the execution of Lua without
error.

This patch changes the comparaison level.

This patch must be backported in 1.6

8 years agoBUG/MINOR: cli: properly decrement ref count on tables during failed dumps
Willy Tarreau [Fri, 18 Nov 2016 18:17:40 +0000 (19:17 +0100)] 
BUG/MINOR: cli: properly decrement ref count on tables during failed dumps

Gernot Pörner reported some constant leak of ref counts for stick tables
entries. It happens that this leak was not at all in the regular traffic
path but on the "show table" path. An extra ref count was taken during
the dump if the output had to be paused, and it was released upon clean
termination or an error detected in the I/O handler. But the release
handler didn't do it, while it used to properly do it for the sessions
dump.

This fix needs to be backported to 1.6.

8 years agoBUG/MEDIUM: stick-table: fix regression caused by recent fix for out-of-memory
Willy Tarreau [Fri, 18 Nov 2016 17:21:39 +0000 (18:21 +0100)] 
BUG/MEDIUM: stick-table: fix regression caused by recent fix for out-of-memory

Commit ef8f4fe ("BUG/MINOR: stick-table: handle out-of-memory condition
gracefully") unfortunately got trapped by a pointer operation. Replacing

    ts = poll_alloc() + size;

with :

    ts = poll_alloc();
    ts += size;

Doesn't give the same result because pool_alloc() is void while ts is a
struct stksess*. So now we don't access the same places, which is visible
in certain stick-table scenarios causing a crash.

This must be backported to 1.6 and 1.5.

8 years agoDEBUG: connection: mark the closed FDs with a value that is easier to detect
Willy Tarreau [Thu, 17 Nov 2016 13:22:52 +0000 (14:22 +0100)] 
DEBUG: connection: mark the closed FDs with a value that is easier to detect

Setting an FD to -1 when closed isn't the most easily noticeable thing
to do when we're chasing accidental reuse of a stale file descriptor.
Instead set it to that large a negative value that it will overflow the
fdtab and provide an analysable core at the moment the issue happens.
Care was taken to ensure it doesn't overflow nor change sign on 32-bit
machines when multiplied by fdtab, and that it also remains negative for
the various checks that exist. The value equals 0xFDDEADFD which happens
to be easily spotted in a debugger.

8 years agoBUG/MEDIUM: connection: check the control layer before stopping polling
Willy Tarreau [Thu, 17 Nov 2016 11:05:13 +0000 (12:05 +0100)] 
BUG/MEDIUM: connection: check the control layer before stopping polling

The bug described in commit 568743a ("BUG/MEDIUM: stream-int: completely
detach connection on connect error") was not a stream-interface layer bug
but a connection layer bug. There was exactly one place in the code where
we could change a file descriptor's status without first checking whether
it is valid or not, it was in conn_stop_polling(). This one is called when
the polling status is changed after an update, and calls fd_stop_both even
if we had already closed the file descriptor :

1479388298.484240 ->->->->->   conn_fd_handler > conn_cond_update_polling
1479388298.484240 ->->->->->->   conn_cond_update_polling > conn_stop_polling
1479388298.484241 ->->->->->->->   conn_stop_polling > conn_ctrl_ready
1479388298.484241                  conn_stop_polling < conn_ctrl_ready
1479388298.484241 ->->->->->->->   conn_stop_polling > fd_stop_both
1479388298.484242 ->->->->->->->->   fd_stop_both > fd_update_cache
1479388298.484242 ->->->->->->->->->   fd_update_cache > fd_release_cache_entry
1479388298.484242                      fd_update_cache < fd_release_cache_entry
1479388298.484243                    fd_stop_both < fd_update_cache
1479388298.484243                  conn_stop_polling < fd_stop_both
1479388298.484243                conn_cond_update_polling < conn_stop_polling
1479388298.484243              conn_fd_handler < conn_cond_update_polling

The problem with the previous fix above is that it break the http_proxy mode
and possibly even some Lua parts and peers to a certain extent ; all outgoing
connections where the target address is initially copied into the outgoing
connection which experience a retry would use a random outgoing address after
the retry because closing and detaching the connection causes the target
address to be lost. This was attempted to be addressed by commit 0857d7a
("BUG/MAJOR: stream: properly mark the server address as unset on connect
retry") but it used to only solve the most visible effect and not the root
cause.

Prior to this fix, it was possible to cause this config to keep CLOSE_WAIT
for as long as it takes to expire a client or server timeout (note the
missing client timeout) :

   listen test
        mode http
        bind :8002
        server s1 127.0.0.1:8001

   $ tcploop 8001 L0 W N20 A R P100 S:"HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n" &
   $ tcploop 8002 N200 C T W S:"GET / HTTP/1.0\r\n\r\n" O P10000 K

With this patch, these CLOSE_WAIT properly vanish when both processes leave.

This commit reverts the two fixes above and replaces them with the proper
fix in connection.h. It must be backported to 1.6 and 1.5. Thanks to
Robson Roberto Souza Peixoto for providing very detailed traces showing
some obvious inconsistencies leading to finding this bug.

8 years agoMEDIUM: lua: Add cli handler for Lua
Thierry FOURNIER / OZON.IO [Sun, 13 Nov 2016 12:19:20 +0000 (13:19 +0100)] 
MEDIUM: lua: Add cli handler for Lua

Now, HAProxy allows to register some keys in the "cli". This patch allows
to handle these keys with Lua code.

8 years agoMINOR: cli: add private pointer and release function
Thierry FOURNIER / OZON.IO [Sat, 12 Nov 2016 09:51:33 +0000 (10:51 +0100)] 
MINOR: cli: add private pointer and release function

This pointer will be used for storing private context. With this,
the same executed function can handle more than one keyword. This
will be very useful for creation Lua cli bindings.

The release function is called when the command is terminated (give
back the hand to the prompt) or when the session is broken (timeout
or client closed).

8 years agoBUG/MINOR: stick-table: handle out-of-memory condition gracefully
Vincent Bernat [Thu, 17 Nov 2016 14:42:40 +0000 (15:42 +0100)] 
BUG/MINOR: stick-table: handle out-of-memory condition gracefully

In case `pool_alloc2()` returns NULL, propagate the condition to the
caller. This could happen when limiting the amount of memory available
for HAProxy with `-m`.

[wt: backport to 1.6 and 1.5 needed]

8 years agoCLEANUP: lua: avoid directly calling getsockname/getpeername()
Willy Tarreau [Wed, 16 Nov 2016 16:00:14 +0000 (17:00 +0100)] 
CLEANUP: lua: avoid directly calling getsockname/getpeername()

We already have per-protocol functions for this, and they already
take care of properly setting the CO_FL_ADDR_*_SET flags.

8 years agoDOC: ssl: Use correct wording for ca-sign-pass
Bertrand Jacquin [Sun, 13 Nov 2016 16:37:12 +0000 (16:37 +0000)] 
DOC: ssl: Use correct wording for ca-sign-pass

Doc references ca-sign-passphrase but the source code is referring
ca-sign-pass. Align doc to reality.

8 years agoCLEANUP: ssl: Fix bind keywords name in comments
Bertrand Jacquin [Sun, 13 Nov 2016 16:37:11 +0000 (16:37 +0000)] 
CLEANUP: ssl: Fix bind keywords name in comments

Along with a whitespace cleanup and a grammar typo

8 years agoCLEANUP: ssl: Remove goto after return dead code
Bertrand Jacquin [Sun, 13 Nov 2016 16:37:10 +0000 (16:37 +0000)] 
CLEANUP: ssl: Remove goto after return dead code

This code can never be reached.

8 years agoBUG/MINOR: ssl: Print correct filename when error occurs reading OCSP
Bertrand Jacquin [Sun, 13 Nov 2016 16:37:14 +0000 (16:37 +0000)] 
BUG/MINOR: ssl: Print correct filename when error occurs reading OCSP

When Multi-Cert bundle are used, error is throwned regarding certificate
filename without including certifcate type extension.

8 years agoBUG/MEDIUM: ssl: Store certificate filename in a variable
Bertrand Jacquin [Sun, 13 Nov 2016 16:37:13 +0000 (16:37 +0000)] 
BUG/MEDIUM: ssl: Store certificate filename in a variable

Before this change, trash is being used to create certificate filename
to read in care Mutli-Cert are in used. But then ssl_sock_load_ocsp()
modify trash leading to potential wrong information given in later error
message.

This also blocks any further use of certificate filename for other
usage, like ongoing patch to support Certificate Transparency handling
in Multi-Cert bundle.

8 years agoCLEANUP: lua: control executed twice
Thierry FOURNIER / OZON.IO [Sat, 12 Nov 2016 12:11:47 +0000 (13:11 +0100)] 
CLEANUP: lua: control executed twice

The availaible size in the stack is check two times. This patch removes
this double check.

Must be backported in 1.6

8 years agoCLEANUP: lua: move comment
Thierry FOURNIER / OZON.IO [Sat, 12 Nov 2016 10:07:05 +0000 (11:07 +0100)] 
CLEANUP: lua: move comment

Old comment is misplaced. Certainly due to a bad copy/paste

Must be backported in 1.6

8 years agoBUG/MEDIUM: channel: bad unlikely macro
Thierry FOURNIER / OZON.IO [Sat, 12 Nov 2016 16:39:58 +0000 (17:39 +0100)] 
BUG/MEDIUM: channel: bad unlikely macro

The unlikely macro doesn't take in acount the condition, but only one
variable.

Must be backported in 1.6

[wt: with gcc 3.x, unlikely(x) is defined as __builtin_expect((x) != 0, 0)
 so the condition is wrong for negative numbers, which correspond to the
 case where bi_getblk_nc() has reached the end of the buffer and the
 channel is already closed. With gcc 4.x, the output is cast to unsigned long
 so the <=0 will not match negative values either. This is only used in Lua
 for now so that may explain why it hasn't hit yet]

8 years agoCONTRIB: tcploop: add basic loops via a jump instruction
Willy Tarreau [Sat, 12 Nov 2016 17:54:20 +0000 (18:54 +0100)] 
CONTRIB: tcploop: add basic loops via a jump instruction

This one jumps back to the oldest post-fork and post-accept action,
so it allows to recv(), pause() and send() in loops after a fork()
and an accept() for example. This is handy for bugs that reproduce
once in a while or to keep idle connections working.

8 years agoCONTRIB: tcploop: don't report failed send() or recv()
Willy Tarreau [Sat, 12 Nov 2016 17:45:42 +0000 (18:45 +0100)] 
CONTRIB: tcploop: don't report failed send() or recv()

Many clients close with an RST on the last response or when they get
their response, so let's not report an error.

8 years agoCONTRIB: tcploop: support sending plain strings
Willy Tarreau [Sat, 12 Nov 2016 17:25:45 +0000 (18:25 +0100)] 
CONTRIB: tcploop: support sending plain strings

By passing "S:<string>" instead of S<size> it's possible to send
a pre-defined string, which is convenient to write HTTP requests or
responses.

Example : produce two responses, one in keep-alive, one not for ab :

  ./tcploop 8001 L W N2 A R S:"HTTP/1.0 200 OK\r\nConnection: keep-alive\r\nContent-length: 50\r\n\r\n0123456789.123456789.123456789.123456789.123456789" R S:"HTTP/1.0 200 OK\r\nContent-length: 50\r\n\r\n0123456789.123456789.123456789.123456789.123456789"

With 20 such keep-alive responses and 10 parallel processes, ab achieves
350kreq/s, so it should be possible to get precise timings.

8 years agoCONTRIB: tcploop: update the usage output
Willy Tarreau [Sat, 12 Nov 2016 16:53:16 +0000 (17:53 +0100)] 
CONTRIB: tcploop: update the usage output

Otherwise we have no other help.

8 years agoCONTRIB: tcploop: implement logging when called with -v
Willy Tarreau [Sat, 12 Nov 2016 16:50:57 +0000 (17:50 +0100)] 
CONTRIB: tcploop: implement logging when called with -v

This is helpful to show what state we're dealing with. The pid is
written, optionally followed by the time in 3 different formats
(relative/absolute) depending on the command line option (-t, -tt, -ttt).

8 years agoCONTRIB: tcploop: implement fork()
Willy Tarreau [Sat, 12 Nov 2016 12:25:53 +0000 (13:25 +0100)] 
CONTRIB: tcploop: implement fork()

Fork is a very convenient way to deal with independant yet properly
timed connections. It's particularly useful here for accept(), and
ensures that any accepted FD will automatically be released. The
principle is that when we hit a fork command, the parent restarts
evaluating the actions from the beginning and the child continues
to evaluate the next actions. Listen and connect are skipped if the
connection is already established. Fork() is amazingly cheap on
Linux, 21k forked connections per second are handled on a single
core, and 38k on two cores.

For now it's not possible to have two different code paths so in order
to have both a listener and a connector, two distinct commands are
still needed.

8 years agoCONTRIB: tcploop: scriptable TCP I/O for debugging purposes
Willy Tarreau [Sat, 12 Nov 2016 10:29:46 +0000 (11:29 +0100)] 
CONTRIB: tcploop: scriptable TCP I/O for debugging purposes

netcat, nc6 and socat are only partially convenient as reproducers for
state machine bugs, but when it comes to adding delays, forcing resets,
waiting for data to be acked, they become useless.

The purpose of this utility is to be able to easily script some TCP
operations such as connect, accept, send, receive, shutdown and of
course pauses.

8 years agoMINOR: lua: add ip addresses and network manipulation function
Thierry FOURNIER / OZON.IO [Thu, 10 Nov 2016 19:38:11 +0000 (20:38 +0100)] 
MINOR: lua: add ip addresses and network manipulation function

Add two functions core.parse_addr() and core.match_addr() where are used
for matching networks.

8 years agoMINOR: lua: add function which return true if the channel is full.
Thierry FOURNIER / OZON.IO [Mon, 7 Nov 2016 14:28:40 +0000 (15:28 +0100)] 
MINOR: lua: add function which return true if the channel is full.

Add function which return true if the channel is full. It is
useful for triggering some process when the buffer is full.

8 years agoCONTRIB: debug/flags: add check for SF_ERR_CHK_PORT
Willy Tarreau [Fri, 11 Nov 2016 07:05:34 +0000 (08:05 +0100)] 
CONTRIB: debug/flags: add check for SF_ERR_CHK_PORT

This flag was added by commit 95db2bc ("MAJOR: check: find out which
port to use for health check at run time"), let's check for it.

8 years agoBUILD: debug/flags: remove test for SF_COMP_READY
Willy Tarreau [Fri, 11 Nov 2016 07:04:44 +0000 (08:04 +0100)] 
BUILD: debug/flags: remove test for SF_COMP_READY

It doesn't exist anymore.

8 years agoBUILD: http: include types/sample.h in proto_http.h
Willy Tarreau [Fri, 11 Nov 2016 06:56:48 +0000 (07:56 +0100)] 
BUILD: http: include types/sample.h in proto_http.h

Commit d7c9196 ("MAJOR: filters: Add filters support") removed sample.h
from proto_http.h, but it has become necessary as of commit fd7edd3
("MINOR: Move http method enum from proto_http to sample") in order
to have HTTP_METH_*. Due to this, the "debug/flags" utility doesn't
build anymore.

8 years agoSCRIPTS: make publish-release also copy the new SPOE doc
Willy Tarreau [Wed, 9 Nov 2016 22:21:47 +0000 (23:21 +0100)] 
SCRIPTS: make publish-release also copy the new SPOE doc

It may be useful for developers who want to experiment with the protocol.

8 years ago[RELEASE] Released version 1.7-dev6 v1.7-dev6
Willy Tarreau [Wed, 9 Nov 2016 22:18:17 +0000 (23:18 +0100)] 
[RELEASE] Released version 1.7-dev6

Released version 1.7-dev6 with the following main changes :
    - DOC: fix the entry for hash-balance-factor config option
    - DOC: Fix typo in description of `-st` parameter in man page
    - CLEANUP: cfgparse: Very minor spelling correction
    - MINOR: examples: Update haproxy.spec URLs to haproxy.org
    - BUG/MEDIUM: peers: on shutdown, wake up the appctx, not the stream
    - BUG/MEDIUM: peers: fix use after free in peer_session_create()
    - MINOR: peers: make peer_session_forceshutdown() use the appctx and not the stream
    - MINOR: peers: remove the pointer to the stream
    - BUG/MEDIUM: systemd-wrapper: return correct exit codes
    - DOC: stats: provide state details for show servers state
    - MEDIUM: tools: make str2ip2() preserve existing ports
    - CLEANUP: tools: make ipcpy() preserve the original port
    - OPTIM: http: move all http character classs tables into a single one
    - OPTIM: http: improve parsing performance of long header lines
    - OPTIM: http: improve parsing performance of long URIs
    - OPTIM: http: optimize lookup of comma and quote in header values
    - BUG/MEDIUM: srv-state: properly restore the DRAIN state
    - BUG/MINOR: srv-state: allow to have both CMAINT and FDRAIN flags
    - MINOR: server: do not emit warnings/logs/alerts on server state changes at boot
    - BUG/MEDIUM: servers: properly propagate the maintenance states during startup
    - MEDIUM: wurfl: add Scientiamobile WURFL device detection module
    - DOC: move the device detection modules documentation to their own files
    - CLEANUP: wurfl: reduce exposure in the rest of the code
    - MEDIUM: ssl: Add support for OpenSSL 1.1.0
    - MINOR: stream: make option contstats usable again
    - MEDIUM: tools: make str2sa_range() return the FQDN even when not resolving
    - MINOR: init: move apply_server_state in haproxy.c before MODE_CHECK
    - MAJOR: server: postpone address resolution
    - MINOR: new srv_admin flag: SRV_ADMF_RMAINT
    - MINOR: server: indicate in the logs when RMAINT is cleared
    - MINOR: stats: indicate it when a server is down due to resolution
    - MINOR: server: make srv_set_admin_state() capable of telling why this happens
    - MINOR: dns: implement extra 'hold' timers.
    - MAJOR: dns: runtime resolution can change server admin state
    - MEDIUM: cli: leave the RMAINT state when setting an IP address on the CLI
    - MEDIUM: server: add a new init-addr server line setting
    - MEDIUM: server: make use of init-addr
    - MINOR: server: implement init-addr none
    - MEDIUM: server: make libc resolution failure non-fatal
    - MINOR: server: add support for explicit numeric address in init-addr
    - DOC: add some documentation for the "init-addr" server keyword
    - MINOR: init: add -dr to ignore server address resolution failures
    - MEDIUM: server: do not restrict anymore usage of IP address from the state file
    - BUG: vars: Fix 'set-var' converter because of a typo
    - CLEANUP: remove last references to 'ruleset' section
    - MEDIUM: filters: Add attch/detach and stream_set_backend callbacks
    - MINOR: filters: Update filters documentation accordingly to recent changes
    - MINOR: filters: Call stream_set_backend callbacks before updating backend stats
    - MINOR: filters: Remove backend filters attached to a stream only for HTTP streams
    - MINOR: flt_trace: Add hexdump option to dump forwarded data
    - MINOR: cfgparse: Add functions to backup and restore registered sections
    - MINOR: cfgparse: Parse scope lines and save the last one parsed
    - REORG: sample: move code to release a sample expression in sample.c
    - MINOR: vars: Allow '.' in variable names
    - MINOR: vars: Add vars_set_by_name_ifexist function
    - MEDIUM: vars: Add a per-process scope for variables
    - MINOR: vars: Add 'unset-var' action/converter
    - MAJOR: spoe: Add an experimental Stream Processing Offload Engine
    - MINOR: spoe: add random ip-reputation service as SPOA example
    - MINOR: spoe/checks: Add support for SPOP health checks
    - DOC: update ROADMAP file

8 years agoDOC: update ROADMAP file
Willy Tarreau [Wed, 9 Nov 2016 22:17:05 +0000 (23:17 +0100)] 
DOC: update ROADMAP file

tcp-request session is OK now.

8 years agoMINOR: spoe/checks: Add support for SPOP health checks
Christopher Faulet [Mon, 7 Nov 2016 20:07:38 +0000 (21:07 +0100)] 
MINOR: spoe/checks: Add support for SPOP health checks

A new "option spop-check" statement has been added to enable server health
checks based on SPOP HELLO handshake. SPOP is the protocol used by SPOE filters
to talk to servers.

8 years agoMINOR: spoe: add random ip-reputation service as SPOA example
Christopher Faulet [Thu, 3 Nov 2016 21:49:37 +0000 (22:49 +0100)] 
MINOR: spoe: add random ip-reputation service as SPOA example

This is a very simple service that implement a "random" ip reputation
service. It will return random scores for all checked IP addresses. It only
shows you how to implement a ip reputation service or such kind of services
using the SPOE.

8 years agoMAJOR: spoe: Add an experimental Stream Processing Offload Engine
Christopher Faulet [Thu, 27 Oct 2016 20:29:49 +0000 (22:29 +0200)] 
MAJOR: spoe: Add an experimental Stream Processing Offload Engine

SPOE makes possible the communication with external components to retrieve some
info using an in-house binary protocol, the Stream Processing Offload Protocol
(SPOP). In the long term, its aim is to allow any kind of offloading on the
streams. This first version, besides being experimental, won't do lot of
things. The most important today is to validate the protocol design and lay the
foundations of what will, one day, be a full offload engine for the stream
processing.

So, for now, the SPOE can offload the stream processing before "tcp-request
content", "tcp-response content", "http-request" and "http-response" rules. And
it only supports variables creation/suppression. But, in spite of these limited
features, we can easily imagine to implement a SSO solution, an ip reputation
service or an ip geolocation service.

Internally, the SPOE is implemented as a filter. So, to use it, you must use
following line in a proxy proxy section:

  frontend my-front
      ...
      filter spoe [engine <name>] config <file>
      ...

It uses its own configuration file to keep the HAProxy configuration clean. It
is also a easy way to disable it by commenting out the filter line.

See "doc/SPOE.txt" for all details about the SPOE configuration.