Willy Tarreau [Thu, 22 Nov 2018 17:07:59 +0000 (18:07 +0100)]
MINOR: polling: add an option to support busy polling
In some situations, especially when dealing with low latency on processors
supporting a variable frequency or when running inside virtual machines,
each time the process waits for an I/O using the poller, the processor
goes back to sleep or is offered to another VM for a long time, and it
causes excessively high latencies.
A solution to this provided by this patch is to enable busy polling using
a global option. When busy polling is enabled, the pollers never sleep and
loop over themselves waiting for an I/O event to happen or for a timeout
to occur. On multi-processor machines it can significantly overheat the
processor but it usually results in much lower latencies.
A typical test consisting in injecting traffic over a single connection at
a time over the loopback shows a bump from 4640 to 8540 connections per
second on forwarded connections, indicating a latency reduction of 98
microseconds for each connection, and a bump from 12500 to 21250 for
locally terminated connections (redirects), indicating a reduction of
33 microseconds.
It is only usable with epoll and kqueue because select() and poll()'s
API is not convenient for such usages, and the level of performance they
are used in doesn't benefit from this anyway.
The option, which obviously remains disabled by default, can be turned
on using "busy-polling" in the global section, and turned off later
using "no busy-polling". Its status is reported in "show info" to help
troubleshooting suspicious CPU spikes.
BUG/MINOR: mworker: fix FD leak and memory leak in error path
Fix some memory leak and a FD leak in the error path of the master proxy
initialisation. It's a really minor issue since the process is exiting
when taking those error paths.
Tim Duesterhus [Thu, 22 Nov 2018 15:46:50 +0000 (16:46 +0100)]
BUG/MINOR: cli: Fix memory leak
Valgrind's memcheck reports memory leaks in cli.c, because
the out parameter of memprintf is not properly freed:
==31035== 11 bytes in 1 blocks are definitely lost in loss record 16 of 101
==31035== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31035== by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31035== by 0x4A3C72: my_realloc2 (standard.h:1364)
==31035== by 0x4A3C72: memvprintf (standard.c:3459)
==31035== by 0x4A3D93: memprintf (standard.c:3482)
==31035== by 0x4AF77E: mworker_cli_sockpair_new (cli.c:2324)
==31035== by 0x48E826: init (haproxy.c:1749)
==31035== by 0x408BBC: main (haproxy.c:2725)
==31035==
==31035== 11 bytes in 1 blocks are definitely lost in loss record 17 of 101
==31035== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31035== by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31035== by 0x4A3C72: my_realloc2 (standard.h:1364)
==31035== by 0x4A3C72: memvprintf (standard.c:3459)
==31035== by 0x4A3D93: memprintf (standard.c:3482)
==31035== by 0x4AF071: mworker_cli_proxy_create (cli.c:2172)
==31035== by 0x48EC89: init (haproxy.c:1760)
==31035== by 0x408BBC: main (haproxy.c:2725)
Willy Tarreau [Thu, 22 Nov 2018 15:13:17 +0000 (16:13 +0100)]
MINOR: cli/activity: rename the stolen CPU time fields to mention milliseconds
The "cpust_{tot,1s,15s}" fields used to report milliseconds but nothing
in the value's title made this explicit. Let's rename the field to report
"cpust_ms_{tot,1s,15s}" to more easily remind that the unit represents
milliseconds.
These sample fetch keywords report performance metrics about the task calling
them. They are useful to report in logs which requests consume too much CPU
time and what negative performane impact it has on other requests. Typically
logging cpu_ns_avg and lat_ns_avg will show culprits and victims.
Willy Tarreau [Thu, 31 May 2018 12:48:54 +0000 (14:48 +0200)]
MEDIUM: tasks: collect per-task CPU time and latency
Right now we measure for each task the cumulated time spent waiting for
the CPU and using it. The timestamp uses a 64-bit integer to report a
nanosecond-level date. This is only enabled when "profiling.tasks" is
enabled, and consumes less than 1% extra CPU on x86_64 when enabled.
The cumulated processing time and wait time are reported in "show sess".
The task's counters are also reset when an HTTP transaction is reset
since the HTTP part pretends to restart on a fresh new stream. This
will make sure we always report correct numbers for each request in
the logs.
Willy Tarreau [Thu, 22 Nov 2018 10:02:09 +0000 (11:02 +0100)]
MINOR: activity: add configuration and CLI support for "profiling.tasks"
This is a new global setting which enables or disables CPU profiling
per task. For now it only sets/resets the variable based on the global
option "profiling.tasks" and supports showing it as well as setting it
from the CLI using "show profiling" and "set profiling". The option will
be used by a future commit. It was done in a way which should ease future
addition of profiling options.
Willy Tarreau [Thu, 22 Nov 2018 07:42:42 +0000 (08:42 +0100)]
MINOR: activity: report the average loop time in "show activity"
Since we know the time it takes to process everything between two poll()
calls, we can use this as the max latency measurement any task will
experience and average it.
This code does this, and reports in "show activity" the average of this
loop time over the last 1024 poll() loops, for each thread. It will vary
quickly at high loads and slowly under low to moderate loads, depending
on the rate at which poll() is called. The latency a task experiences
is expected to be half of this on average.
Willy Tarreau [Thu, 22 Nov 2018 07:31:09 +0000 (08:31 +0100)]
REORG: time/activity: move activity measurements to activity.{c,h}
At the moment the situation with activity measurement is quite tricky
because the struct activity is defined in global.h and declared in
haproxy.c, with operations made in time.h and relying on freq_ctr
which are defined in freq_ctr.h which itself includes time.h. It's
barely possible to touch any of these files without breaking all the
circular dependency.
Let's move all this stuff to activity.{c,h} and be done with it. The
measurement of active and stolen time is now done in a dedicated
function called just after tv_before_poll() instead of mixing the two,
which used to be a lazy (but convenient) decision.
Willy Tarreau [Thu, 22 Nov 2018 10:45:04 +0000 (11:45 +0100)]
MINOR: cli: add a few missing includes in proto/cli.h
Just found that proto/cli.h doesn't build if types/cli.h is not also
included by the caller, as it uses cli_kw_list is used in arguments.
But it's also true for a few other ones like mworker_proc, stream,
and channel, so let's fix this.
BUG/MEDIUM: mworker: unregister the signals of main()
The signal_register_fct() does not remove the handlers assigned to a
signal, but add a new handler to a list.
We accidentality inherited the handlers of the main() function in the
master process which is a problem because they act on the proxies.
The side effect was to stop the MASTER proxy which handle the master CLI
on a SIGUSR1, and to display some debug info when doing a SIGHUP and a
SIGQUIT.
MEDIUM: signal: signal_unregister() removes every handlers
The new function signal_unregister() removes every handlers assigned to
a signal. Once the handler list of the signal is empty, the signal is
ignored with SIG_IGN.
MINOR: cli: add mworker_accept_wrapper to 'show fd'
In the output of 'show fd', the worker CLI's socketpair was still
handled by an "unknown" function. That can be really confusing during
debug. Fixed it by showing "mworker_accept_wrapper" instead.
MEDIUM: mworker: wait mode use standard init code path
The mworker waitpid mode (which is used when a reload failed to apply
the new configuration) was still using a specific initialisation path.
That's a problem since we use a polling loop in the master now, the
master proxy is not initialized and the master CLI is not activated.
This patch removes the initialisation code of the wait mode and
introduce the MODE_MWORKER_WAIT in order to use the same init path as
the MODE_MWORKER with some exceptions. It allows to use the master proxy
and the master CLI during the waitpid mode.
BUG/MINOR: config: Be aware of the HTX during the check of mux protocols
Because the HTX is still experimental, we must add special cases during the
configuration check to be sure it is not enabled on a proxy with incompatible
options. Here, for HTX proxies, when a mux protocol is specified on a bind line
or a server line, we must force the HTX mode (PROTO_MODE_HTX).
Concretely, H2 is the only mux protocol that can be forced. And it doesn't yet
support the HTX. So forcing the H2 on an HTX proxy will always fail.
MINOR: stream-int: remove useless checks on CS and conn flags in si_cs_send()
In si_cs_send(), some checks are done the CS flags en the connection flags
before calling snd_buf(). But these checks are useless because they have already
been done earlier in the function. The harder to figure out is the flag
CO_FL_SOCK_WR_SH. So it is now tested with CF_SHUTW at the beginning.
BUG/MINOR: stream-int: Don't call snd_buf() if there are still data in the pipe
In si_cs_send, as said in comments, snd_buf() should only be called if there is
no data in the pipe anymore. But actually, this condition was not respected.
MINOR: stream-int: Notify caller when an error is reported after a rcv_buf()
For the same reason than for the commit b46784b1c ("MINOR: stream-int: Notify
caller when an error is reported after a rcv_pipe()"), we return 1 after the
call to rcv_buf() in si_cs_send() to notify the caller some processing may be
triggered.
This patch is not flagged as a bug because no strange behaviour was yet observed
without it. It is just a proactive fix to be consistent.
MINOR: stream-int: Notify caller when an error is reported after a rcv_pipe()
In si_cs_send(), when an error is found on the CS or the connection at the
beginning of the function, we return 1 to notify the caller some processing may
be triggered. So, it seems logical to do the same after the call to rcv_pipe().
This patch is not flagged as a bug because no strange behaviour was yet observed
without it. It is just a proactive fix to be consistent.
BUG/MINOR: stats/htx: Remove channel's output when the request is eaten
The request is eaten when the stats applet have finished to send its
response. It was removed from the channel's buffer, removing all HTX blocks till
the EOM. But the channel's output was not reset, leaving the request channel in
an undefined state.
BUG/MEDIUM: mux-h1: Don't set the flag CS_FL_RCV_MORE when nothing was parsed
When we start to parse a new message, if all headers have not been received,
nothing is copied in the channel's buffer. In this situation, we must not set
the flag CS_FL_RCV_MORE on the conn-stream. If we do so, the connection freezes
because there is no data to send that can reenable the reads
BUG/MEDIUM: mux-h1: Fix freeze when the kernel splicing is used
First of all, we need to be sure to keep the flag H1S_F_BUF_FLUSH on the H1S
reading data until all data was flushed from the buffer. Then we need to know
when the kernel splicing is in use and when it ends. This is handled with the
new flag H1S_F_SPLICED_DATA.
Then, we must subscribe to send when some data remain in the pipe after a
snd_pipe(). It is mandatory to wakeup the stream and avoid a freeze.
Finally, we must be sure to update the message state when we restart to use the
channel's buffer. Among other things, it is mandatory to swith the message from
DATA to DONE state when all data were sent using the kernel splicing.
BUG/MINOR: mux-h1: Enable keep-alive on server side
Don't force the close on server side anymore. Since commit 7c6f8b146 ("MAJOR:
connections: Detach connections from streams"), it is possible to release a
stream without the underlying connection.
Because of this change, we must be sure to create a new stream to handle the
next HTTP transaction only on the client side. And we must be sure to correctly
handle the read0 event in h1_recv, to be sure to call h1_process().
MAJOR: mux-h1: Remove the rxbuf and decode HTTP messages in channel's buffer
It avoids a copy between the rxbuf and the channel's buffer. It means the
parsing is done in h1_rcv_buf(). So we need to have a stream to start the
parsing. This change should improve the overall performances. It also implies a
better split between the connection layer and the applicative layer. Now, on the
connection layer, only raw data are manipulated. Raw data received from the
socket are stored in ibuf and those sent are get from obuf. On the applicative
layer, data in ibuf are parsed and copied into the channel's buffer. And on the
other side, those structured data are formatted and copied into obuf.
Willy Tarreau [Tue, 20 Nov 2018 03:47:38 +0000 (04:47 +0100)]
BUG/MEDIUM: hpack: fix encoding of "accept-ranges" field
James Brown reported that when an "accept-ranges" header field is sent
through haproxy and converted from HTTP/1.1 to H2, it's mis-encoded as
"accept-language". It happens that it's one of the few very common header
fields encoded using its index value and that this index value was misread
in the spec as 17 instead of 18, resulting in the wrong name being sent.
Thanks to Lukas for spotting the issue in the HPACK encoder itself.
Willy Tarreau [Mon, 19 Nov 2018 07:15:54 +0000 (08:15 +0100)]
BUILD: Makefile: switch to quiet mode by default for CC/LD/AR
These commands are now replaced with a prefix and the target name only
in quiet mode, which is much more readable and allows better detection
of build warnings than the default verbose mode. Using V=1 switches back
to the detailed output.
Willy Tarreau [Mon, 19 Nov 2018 06:51:04 +0000 (07:51 +0100)]
BUILD: Makefile: add the quiet mode to a few more targets
The various install-* and *-tar targets are now launched with $(Q). The
install argument "-v" was added to install commands to see what is copied
where.
Willy Tarreau [Mon, 19 Nov 2018 06:10:59 +0000 (07:10 +0100)]
BUILD: reorder the objects in the makefile
This is the annual reordering of the make file consisting in sorting
the files by reverse build time. This has sped up the parallel build
at -O2 from 10.5 sec down to 7.9.
Willy Tarreau [Mon, 19 Nov 2018 07:11:40 +0000 (08:11 +0100)]
BUILD: update the list of supported targets and compilers in makefile and readme
The list of suggested targets reported in the default make command was not
up to date. The equivalent versions were updated in the README as well as
the supported compiler versions.
Willy Tarreau [Sun, 11 Nov 2018 14:40:36 +0000 (15:40 +0100)]
REORG: config: extract the proxy parser into cfgparse-listen.c
This was the largest function of the whole file, taking a rough second
to build alone. Let's move it to a distinct file along with a few
dependencies. Doing so saved about 2 seconds on the total build time.
Willy Tarreau [Sun, 11 Nov 2018 14:19:52 +0000 (15:19 +0100)]
REORG: config: extract the global section parser into cfgparse-global
The config parser is the largest file to build and its build dominates
the total project's build time. Let's start to split it into multiple
smaller pieces by extracting the "global" section parser into a new
file called "cfgparse-global.c". This removes 1/4th of the file's build
time.
Willy Tarreau [Sun, 18 Nov 2018 21:33:00 +0000 (22:33 +0100)]
[RELEASE] Released version 1.9-dev7
Released version 1.9-dev7 with the following main changes :
- BUILD: cache: fix a build warning regarding too large an integer for the age
- CLEANUP: fix typos in the comments of the Makefile
- CLEANUP: fix a typo in a comment for the contrib/halog subsystem
- CLEANUP: fix typos in comments for the contrib/modsecurity subsystem
- CLEANUP: fix typos in comments for contrib/spoa_example
- CLEANUP: fix typos in comments for contrib/wireshark-dissectors
- DOC: Fix typos in README and CONTRIBUTING
- MINOR: log: slightly improve error message syntax on log failure
- DOC: logs: the format directive was missing from the second log part
- MINOR: log: report the number of dropped logs in the stats
- MEDIUM: log: add support for logging to existing file descriptors
- MEDIUM: log: support a new "short" format
- MEDIUM: log: add a new "raw" format
- BUG/MEDIUM: stream-int: change the way buffer room is requested by a stream-int
- BUG/MEDIUM: stream-int: convert some co_data() checks to channel_is_empty()
- MINOR: namespaces: don't build namespace.c if disabled
- BUILD/MEDIUM: threads/affinity: DragonFly build fix
- MINOR: http: Add new "early-hint" http-request action.
- MINOR: http: Make new "early-hint" http-request action really be parsed.
- MINOR: http: Implement "early-hint" http request rules.
- MINOR: doc: Add information about "early-hint" http-request action.
- DOC: early-hints: fix truncated line.
- MINOR: mworker: only close std{in,out,err} in daemon mode
- BUG/MEDIUM: log: don't CLOEXEC the inherited FDs
- BUG/MEDIUM: Make sure stksess is properly aligned.
- BUG/MEDIUM: stream-int: make failed splice_in always subscribe to recv
- BUG/MEDIUM: stream-int: clear CO_FL_WAIT_ROOM after splicing data in
- BUG/MINOR: stream-int: make sure not to go through the rcv_buf path after splice()
- CONTRIB: debug: fix build related to conn_stream flags change
- REGTEST: fix scripts 1 and 3 to accept development version
- BUG/MINOR: http_fetch: Remove the version part when capturing the request uri
- MINOR: http: Regroup return statements of http_req_get_intercept_rule at the end
- MINOR: http: Regroup return statements of http_res_get_intercept_rule at the end
- BUG/MINOR: http: Be sure to sent fully formed HTTP 103 responses
- MEDIUM: jobs: support unstoppable jobs for soft stop
- MEDIUM: listeners: support unstoppable listener
- MEDIUM: cli: worker socketpair is unstoppable
- BUG/MINOR: stream-int: set SI_FL_WANT_PUT in sess_establish()
- MINOR: stream: move the conn_stream specific calls to the stream-int
- BUG/MINOR: config: Copy default error messages when parsing of a backend starts
- CLEANUP: h2: minimum documentation for recent API changes
- MINOR: mux: implement a get_first_cs() method
- MINOR: stream-int: make conn_si_send_proxy() use cs_get_first()
- MINOR: stream-int: relax the forwarding rules in stream_int_notify()
- MINOR: stream-int: expand the flags to 32-bit
- MINOR: stream-int: rename SI_FL_WAIT_ROOM to SI_FL_RXBLK_ROOM
- MINOR: stream-int: introduce new SI_FL_RXBLK flags
- MINOR: stream-int: add new functions si_{rx,tx}_{blocked,endp_ready}()
- MINOR: stream-int: replace SI_FL_WANT_PUT with !SI_FL_RX_WAIT_EP
- MINOR: stream-int: use si_rx_blocked()/si_tx_blocked() to check readiness
- MEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness
- MINOR: stream-int: replace si_{want,stop}_put() with si_rx_endp_{more,done}()
- MEDIUM: stream-int: update the endp polling status only at the end of si_cs_recv()
- MINOR: stream-int: make si_sync_recv() simply check ENDP before si_cs_recv()
- MINOR: stream-int: automatically mark applets as ready if they block on the channel
- MEDIUM: stream-int: fix the si_cant_put() calls used for end point readiness
- MEDIUM: stream-int: fix the si_cant_put() calls used for buffer readiness
- MEDIUM: stream-int: use si_rx_shut_blk() to indicate the SI is closed
- MEDIUM: stream-int: unconditionally call si_chk_rcv() in update and notify
- MEDIUM: stream-int: make use of si_rx_chan_{rdy,blk} to control the stream-int from the channel
- MINOR: stream-int: replace si_cant_put() with si_rx_room_{blk,rdy}()
- MEDIUM: connections: Wait until the connection is established to try to recv.
- MEDIUM: mux: Teach the mux_pt how to deal with idle connections.
- MINOR: mux: Add a new "avail_streams" method.
- MINOR: mux: Add a destroy() method.
- MINOR: sessions: Start to store the outgoing connection in sessions.
- MAJOR: connections: Detach connections from streams.
- MINOR: conn_stream: Add a flag to notify the mux it should flush its buffers
- MINOR: htx: Add proto_htx.c file
- MINOR: conn_stream: Add a flag to notify the mux it must respect the reserve
- MINOR: http: Add standalone functions to parse a start-line or a header
- MINOR: http: Call http_send_name_header with the stream instead of the txn
- MINOR: conn_stream: Add a flag to notify the SI some data were received
- MINOR: http: Add macros to check if a stream uses the HTX representation
- MEDIUM: proto_htx: Add HTX analyzers and use it when the mux H1 is used
- MEDIUM: mux-h1: Add dummy mux to handle HTTP/1.1 connections
- MEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages
- MAJOR: mux-h1/proto_htx: Handle keep-alive connections in the mux
- MEDIUM: mux-h1: Add support of the kernel TCP splicing to forward data
- MEDIUM: htx: Add API to deal with the internal representation of HTTP messages
- MINOR: http_htx: Add functions to manipulate HTX messages in http_htx.c
- MINOR: proto_htx: Add some functions to handle HTX messages
- MAJOR: mux-h1/proto_htx: Switch mux-h1 and HTX analyzers on the HTX representation
- MINOR: http_htx: Add functions to replace part of the start-line
- MINOR: http_htx: Add functions to retrieve a specific occurrence of a header
- MINOR: proto_htx: Rewrite htx_apply_redirect_rule to handle HTX messages
- MINOR: proto_htx: Add the internal function htx_del_hdr_value
- MINOR: proto_htx: Add the internal function htx_fmt_res_line
- MINOR: proto_htx: Add functions htx_transform_header and htx_transform_header_str
- MINOR: proto_htx: Add functions htx_req_replace_stline and htx_res_set_status
- MINOR: proto_htx: Add function to build and send HTTP 103 responses
- MINOR: proto_htx: Add functions htx_req_get_intercept_rule and htx_res_get_intercept_rule
- MINOR: proto_htx: Add functions to apply req* and rsp* rules on HTX messages
- MINOR: proto_htx: Add functions to manage cookies on HTX messages
- MINOR: proto_htx: Add functions to check the cacheability of HTX messages
- MINOR: proto_htx: Add functions htx_send_name_header
- MINOR: proto_htx: Add functions htx_perform_server_redirect
- MINOR: proto_htx: Add functions to handle the stats applet
- MEDIUM: proto_htx: Adapt htx_process_req_common to handle HTX messages
- MEDIUM: proto_htx: Adapt htx_process_request to handle HTX messages
- MINOR: proto_htx: Adapt htx_process_tarpit to handle HTX messages
- MEDIUM: proto_htx: Adapt htx_wait_for_request_body to handle HTX messages
- MEDIUM: proto_htx: Adapt htx_process_res_common to handle HTX messages
- MINOR: http_fetch: Add smp_prefetch_htx
- MEDIUM: http_fetch: Adapt all fetches to handle HTX messages
- MEDIUM: mux-h1: Wait for connection establishment before consuming channel's data
- MINOR: stats/htx: Adapt the stats applet to handle HTX messages
- MINOR: stream: Don't reset sov value with HTX messages
- MEDIUM: mux-h1: Handle errors and timeouts in the stream
- MINOR: filters/htx: Forbid filters when the HTX is enabled on a proxy
- MINOR: lua/htx: Forbid lua usage when the HTX is enabled on a proxy
- CLEANUP: Fix some typos in the haproxy subsystem
- CLEANUP: Fix typos in the dns subsystem
- CLEANUP: Fix typos in the pattern subsystem
- CLEANUP: fix 2 typos in the xxhash subsystem
- CLEANUP: fix a few typos in the comments of the server subsystem
- CLEANUP: fix a misspell in tests/filltab25.c
- CLEANUP: fix a typo found in the stream subsystem
- CLEANUP: fix typos in comments in ebtree
- CLEANUP: fix typos in reg-tests
- CLEANUP: fix typos in the comments of the vars subsystem
- CLEANUP: fix typos in the hlua_fcn subsystem
- CLEANUP: fix typos in the proto_http subsystem
- CLEANUP: fix typos in the proxy subsystem
- CLEANUP: fix typos in the ssl_sock subsystem
- DOC: Fix typos in different subsections of the documentation
- DOC: fix a few typos in the documentation
- MINOR: Fix an error message thrown when we run out of memory
- MINOR: Fix typos in error messages in the proxy subsystem
- MINOR: fix typos in the examples files
- CLEANUP: Fix a typo in the stats subsystem
- CLEANUP: Fix typos in the acl subsystem
- CLEANUP: Fix typos in the cache subsystem
- CLEANUP: Fix typos in the cfgparse subsystem
- CLEANUP: Fix typos in the filters subsystem
- CLEANUP: Fix typos in the http subsystem
- CLEANUP: Fix typos in the log subsystem
- CLEANUP: Fix typos in the peers subsystem
- CLEANUP: Fix typos in the regex subsystem
- CLEANUP: Fix typos in the sample subsystem
- CLEANUP: Fix typos in the spoe subsystem
- CLEANUP: Fix typos in the standard subsystem
- CLEANUP: Fix typos in the stick_table subsystem
- CLEANUP: Fix typos in the task subsystem
- MINOR: Fix typo in error message in the standard subsystem
- CLEANUP: fix typos in the comments of hlua
- MINOR: Fix typo in the error 500 output of hlua
- MINOR: Fix a typo in a warning message in the spoe subsystem
Joseph Herlant [Wed, 14 Nov 2018 04:01:24 +0000 (20:01 -0800)]
MINOR: fix typos in the examples files
To be more specific the error 500 example page and the
transparent_proxy.cfg page. For the later, it is all in the comments but
still user-visible as those are examples.
Joseph Herlant [Wed, 14 Nov 2018 04:15:49 +0000 (20:15 -0800)]
CLEANUP: fix typos in reg-tests
Fix typos in comments and error messages of reg-tests. Note that this
has not been qualified as minor as it is used for testing purposes, not
end-users.
MINOR: lua/htx: Forbid lua usage when the HTX is enabled on a proxy
For now, the lua scripts are not compatible with the new HTX internal
representation of HTTP messages. Thus, for a given proxy, when the option
"http-use-htx" is enabled, an error is triggered if any lua's
action/service/sample-fetch/converter is also configured.
MINOR: filters/htx: Forbid filters when the HTX is enabled on a proxy
For now, the filters are not compatible with the new HTX internal representation
of HTTP messages. Thus, for a given proxy, when the option "http-use-htx" is
enabled, an error is triggered if any filter is also configured.
MEDIUM: mux-h1: Handle errors and timeouts in the stream
To do so, the stream is created as earlier as possible. It means, during the mux
creation for the first request, and for others, just at the end of the previous
transaction. Because all timeouts are handled by the strream, the mux's task is
now useless, so it is removed. Finally, to report errors, flags are set on the
HTX message. The HTX message is passed to the stream if there is some content to
analyse or if there is some error to handle.
All of this will probably be reworked later to handle errors and timeouts
directly in the mux. For now, it is the simpler way to handle all of this.
MEDIUM: mux-h1: Wait for connection establishment before consuming channel's data
When a server is down, the channel's data must not be consumed. This is
required to allow redispatch and connection retry. So now, we wait for
the connection to be marked as connected, with the flag CO_FL_CONNECTED,
before starting to consume channel's data. In the mux, this event is
tracked with the flag H1C_F_CS_WAIT_CONN.
It does the same than smp_prefetch_http but for HTX messages. It can be called
from an HTTP proxy or a TCP proxy. For HTTP proxies, the parsing is handled by
the mux, so it does nothing but wait. For TCP proxies, it tries to parse an HTTP
message and to convert it in a temporary HTX message. Sample fetches will use
this temporary variable to do their job.
MEDIUM: proto_htx: Adapt htx_wait_for_request_body to handle HTX messages
This version is simpler than the legacy one because the parsing is no more
handled by the analyzer. So now we just need to wait to have more data to move
on.
MINOR: proto_htx: Add functions to handle the stats applet
For now, the call to the stats applet is disabled for HTX messages. But HTX
versions of the function to check the request URI against the stats URI and the
fnuction to prepare the call to the stats applet have been added.
It is more or less the same than legacy version but adapted to be called from
HTX analyzers. In the legacy version of this function, we switch on the HTX code
when applicable.
It is more or less the same than legacy version but adapted to be called from
HTX analyzers. In the legacy version of this function, we switch on the HTX code
when applicable.
MINOR: proto_htx: Add functions to check the cacheability of HTX messages
It is more or less the same than legacy versions but adapted to be called from
HTX analyzers. In the legacy versions of these functions, we switch on the HTX
code when applicable.