haproxy/include/types
Willy Tarreau a4312fa28e MAJOR: sample: maintain a per-proxy list of the fetch args to resolve
While ACL args were resolved after all the config was parsed, it was not the
case with sample fetch args because they're almost everywhere now.

The issue is that ACLs now solely rely on sample fetches, so their args
resolving doesn't work anymore. And many fetches involving a server, a
proxy or a userlist don't work at all.

The real issue is that at the bottom layers we have no information about
proxies, line numbers, even ACLs in order to report understandable errors,
and that at the top layers we have no visibility over the locations where
fetches are referenced (think log node).

After failing multiple unsatisfying solutions attempts, we now have a new
concept of args list. The principle is that every proxy has a list head
which contains a number of indications such as the config keyword, the
context where it's used, the file and line number, etc... and a list of
arguments. This list head is of the same type as the elements, so it
serves as a template for adding new elements. This way, it is filled from
top to bottom by the callers with the information they have (eg: line
numbers, ACL name, ...) and the lower layers just have to duplicate it and
add an element when they face an argument they cannot resolve yet.

Then at the end of the configuration parsing, a loop passes over each
proxy's list and resolves all the args in sequence. And this way there is
all necessary information to report verbose errors.

The first immediate benefit is that for the first time we got very precise
location of issues (arg number in a keyword in its context, ...). Second,
in order to do this we had to parse log-format and unique-id-format a bit
earlier, so that was a great opportunity for doing so when the directives
are encountered (unless it's a default section). This way, the recorded
line numbers for these args are the ones of the place where the log format
is declared, not the end of the file.

Userlists report slightly more information now. They're the only remaining
ones in the ACL resolving function.
2013-04-03 02:13:02 +02:00
..
acl.h MEDIUM: acl: have a pointer to the keyword name in acl_expr 2013-04-03 02:13:01 +02:00
arg.h MAJOR: sample: maintain a per-proxy list of the fetch args to resolve 2013-04-03 02:13:02 +02:00
auth.h [REORG] http: move the http-request rules to proto_http 2011-03-13 22:00:24 +01:00
backend.h BUG/MAJOR: checks: don't call set_server_status_* when no LB algo is set 2012-05-19 19:09:46 +02:00
capture.h [MAJOR] last bunch of capture changes for mempool v2 2007-05-13 22:46:04 +02:00
channel.h CLEANUP: channel: remove any reference of the hijackers 2012-11-11 23:05:39 +01:00
checks.h MINOR: checks: add on-marked-up option 2012-06-03 23:48:42 +02:00
compression.h MEDIUM: compression: use pool for comp_ctx 2012-11-21 01:56:47 +01:00
connection.h MEDIUM: connection: introduce "struct conn_src" for servers and proxies 2012-12-09 10:04:39 +01:00
counters.h MINOR: stats: report the total number of compressed responses per front/back 2012-11-24 14:54:13 +01:00
fd.h MAJOR: polling: remove unused callbacks from the poller struct 2012-11-11 21:02:34 +01:00
freq_ctr.h [MINOR] freq_ctr: add new types and functions for periods different from 1s 2010-08-10 14:01:09 +02:00
global.h MINOR: ssl: add a global tunable for the max SSL/TLS record size 2013-02-21 07:53:13 +01:00
hdr_idx.h [BUG] files were missing for hdr_idx in previous commit 2006-12-04 02:20:02 +01:00
lb_chash.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fwrr.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_map.h [CLEANUP] proxy: move last lb-specific bits to their respective files 2009-10-03 18:41:18 +02:00
listener.h DOC: tfo: bump required kernel to linux-3.7 2013-02-14 00:03:04 +01:00
log.h BUG/MINOR: log: make log-format, unique-id-format and add-header more independant 2012-12-28 09:51:00 +01:00
obj_type.h MAJOR: connection: replace struct target with a pointer to an enum 2012-11-12 00:42:33 +01:00
peers.h MEDIUM: checks: Add agent health check 2013-02-13 11:03:28 +01:00
pipe.h [MEDIUM] introduce pipe pools 2009-01-25 13:49:53 +01:00
port_range.h [MEDIUM] add support for binding to source port ranges during connect 2009-06-10 12:23:32 +02:00
proto_http.h MEDIUM: http: add support for "http-request tarpit" rule 2012-12-28 14:47:19 +01:00
proto_tcp.h [MINOR] session-counters: use "track-sc{1,2}" instead of "track-{fe,be}-counters" 2010-08-10 18:04:15 +02:00
protocol.h MEDIUM: tcp: add explicit support for delayed ACK in connect() 2012-11-24 10:24:27 +01:00
proxy.h MAJOR: sample: maintain a per-proxy list of the fetch args to resolve 2013-04-03 02:13:02 +02:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
sample.h MINOR: sample: provide a function to report the name of a sample check point 2013-04-03 02:13:00 +02:00
server.h MEDIUM: connection: introduce "struct conn_src" for servers and proxies 2012-12-09 10:04:39 +01:00
session.h CLEANUP: session: use an array for the stick counters 2012-12-09 15:57:16 +01:00
signal.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
ssl_sock.h MEDIUM: ssl: add support for SNI and wildcard certificates 2012-09-10 09:27:02 +02:00
stick_table.h MEDIUM: stick-table: allocate the table key of size buffer size 2012-10-29 21:56:59 +01:00
stream_interface.h MAJOR: connection: replace struct target with a pointer to an enum 2012-11-12 00:42:33 +01:00
task.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00