]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
6 years agoDOC: Fix typos in different subsections of the documentation
Joseph Herlant [Wed, 14 Nov 2018 03:45:17 +0000 (19:45 -0800)] 
DOC: Fix typos in different subsections of the documentation

Fix typos found in the design-thoughts, internals and lua-api
subsections of the documentation.

6 years agoCLEANUP: fix typos in the ssl_sock subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:07:59 +0000 (09:07 -0800)] 
CLEANUP: fix typos in the ssl_sock subsystem

Fix some typos found in the code comments of the ssl_sock subsystem.

6 years agoCLEANUP: fix typos in the proxy subsystem
Joseph Herlant [Thu, 15 Nov 2018 19:46:55 +0000 (11:46 -0800)] 
CLEANUP: fix typos in the proxy subsystem

Fix typos in the code comments of the proxy subsystem.

6 years agoCLEANUP: fix typos in the proto_http subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:25:36 +0000 (09:25 -0800)] 
CLEANUP: fix typos in the proto_http subsystem

Fixes typos in the code comments of the proto_http subsystem.

6 years agoCLEANUP: fix typos in the hlua_fcn subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:35:04 +0000 (09:35 -0800)] 
CLEANUP: fix typos in the hlua_fcn subsystem

Fixes typos detected in the code comments of the hlua_fcn subsystem using
the misspell tool and other ones detected manually.

6 years agoCLEANUP: fix typos in the comments of the vars subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:19:50 +0000 (09:19 -0800)] 
CLEANUP: fix typos in the comments of the vars subsystem

Those are mostly misspells of the words available and variable.

6 years agoCLEANUP: fix typos in reg-tests
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.

6 years agoCLEANUP: fix typos in comments in ebtree
Joseph Herlant [Wed, 14 Nov 2018 03:55:57 +0000 (19:55 -0800)] 
CLEANUP: fix typos in comments in ebtree

This is mainly about misspells of the word "occurrence". The misspells
are only located in code comments.

6 years agoCLEANUP: fix a typo found in the stream subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:14:14 +0000 (09:14 -0800)] 
CLEANUP: fix a typo found in the stream subsystem

This typo is in a code comment so not end-user visible.

6 years agoCLEANUP: fix a misspell in tests/filltab25.c
Joseph Herlant [Wed, 14 Nov 2018 04:07:48 +0000 (20:07 -0800)] 
CLEANUP: fix a misspell in tests/filltab25.c

The commit fixes a misspell in a comment of tests/filltab25.c.

6 years agoCLEANUP: fix a few typos in the comments of the server subsystem
Joseph Herlant [Thu, 15 Nov 2018 16:57:51 +0000 (08:57 -0800)] 
CLEANUP: fix a few typos in the comments of the server subsystem

A few misspells where detected in the server subsystem. This commit
fixes them.

6 years agoCLEANUP: fix 2 typos in the xxhash subsystem
Joseph Herlant [Thu, 15 Nov 2018 17:30:49 +0000 (09:30 -0800)] 
CLEANUP: fix 2 typos in the xxhash subsystem

Fixes 2 typos in the comments of the xxhash subsystem.

6 years agoCLEANUP: Fix typos in the pattern subsystem
Joseph Herlant [Thu, 15 Nov 2018 18:22:31 +0000 (10:22 -0800)] 
CLEANUP: Fix typos in the pattern subsystem

Fixes typos in the code comments of the pattern subsystem.

6 years agoCLEANUP: Fix typos in the dns subsystem
Joseph Herlant [Thu, 15 Nov 2018 18:33:28 +0000 (10:33 -0800)] 
CLEANUP: Fix typos in the dns subsystem

Fix misspells in the code comments of the dns subsystem.

6 years agoCLEANUP: Fix some typos in the haproxy subsystem
Joseph Herlant [Thu, 15 Nov 2018 18:41:50 +0000 (10:41 -0800)] 
CLEANUP: Fix some typos in the haproxy subsystem

Fix some typos in the code comments of the haproxy subsystem.

6 years agoMINOR: lua/htx: Forbid lua usage when the HTX is enabled on a proxy
Christopher Faulet [Thu, 8 Nov 2018 10:34:21 +0000 (11:34 +0100)] 
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.

6 years agoMINOR: filters/htx: Forbid filters when the HTX is enabled on a proxy
Christopher Faulet [Wed, 7 Nov 2018 13:09:32 +0000 (14:09 +0100)] 
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.

6 years agoMEDIUM: mux-h1: Handle errors and timeouts in the stream
Christopher Faulet [Wed, 31 Oct 2018 16:40:50 +0000 (17:40 +0100)] 
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.

6 years agoMINOR: stream: Don't reset sov value with HTX messages
Christopher Faulet [Wed, 31 Oct 2018 12:43:33 +0000 (13:43 +0100)] 
MINOR: stream: Don't reset sov value with HTX messages

6 years agoMINOR: stats/htx: Adapt the stats applet to handle HTX messages
Christopher Faulet [Wed, 31 Oct 2018 07:47:01 +0000 (08:47 +0100)] 
MINOR: stats/htx: Adapt the stats applet to handle HTX messages

Switches between the HTX version of the code and the legacy one have been added
to let the stats applet work with both.

6 years agoMEDIUM: mux-h1: Wait for connection establishment before consuming channel's data
Christopher Faulet [Fri, 26 Oct 2018 15:36:03 +0000 (17:36 +0200)] 
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.

6 years agoMEDIUM: http_fetch: Adapt all fetches to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 19:41:55 +0000 (21:41 +0200)] 
MEDIUM: http_fetch: Adapt all fetches to handle HTX messages

For HTTP proxies, when the HTX internal representation is used, or for all TCP
proxies, we use the HTX version of sample fetches.

6 years agoMINOR: http_fetch: Add smp_prefetch_htx
Christopher Faulet [Wed, 24 Oct 2018 19:39:27 +0000 (21:39 +0200)] 
MINOR: http_fetch: Add smp_prefetch_htx

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.

6 years agoMEDIUM: proto_htx: Adapt htx_process_res_common to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:17:50 +0000 (11:17 +0200)] 
MEDIUM: proto_htx: Adapt htx_process_res_common to handle HTX messages

6 years agoMEDIUM: proto_htx: Adapt htx_wait_for_request_body to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:16:22 +0000 (11:16 +0200)] 
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.

6 years agoMINOR: proto_htx: Adapt htx_process_tarpit to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:15:09 +0000 (11:15 +0200)] 
MINOR: proto_htx: Adapt htx_process_tarpit to handle HTX messages

6 years agoMEDIUM: proto_htx: Adapt htx_process_request to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:14:34 +0000 (11:14 +0200)] 
MEDIUM: proto_htx: Adapt htx_process_request to handle HTX messages

6 years agoMEDIUM: proto_htx: Adapt htx_process_req_common to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:13:16 +0000 (11:13 +0200)] 
MEDIUM: proto_htx: Adapt htx_process_req_common to handle HTX messages

Here, the only real change is that the stats and cache applets are disabled.

6 years agoMINOR: proto_htx: Add functions to handle the stats applet
Christopher Faulet [Wed, 24 Oct 2018 19:21:30 +0000 (21:21 +0200)] 
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.

6 years agoMINOR: proto_htx: Add functions htx_perform_server_redirect
Christopher Faulet [Wed, 24 Oct 2018 19:18:04 +0000 (21:18 +0200)] 
MINOR: proto_htx: Add functions htx_perform_server_redirect

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.

6 years agoMINOR: proto_htx: Add functions htx_send_name_header
Christopher Faulet [Wed, 24 Oct 2018 19:15:35 +0000 (21:15 +0200)] 
MINOR: proto_htx: Add functions htx_send_name_header

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.

6 years agoMINOR: proto_htx: Add functions to check the cacheability of HTX messages
Christopher Faulet [Wed, 24 Oct 2018 10:00:25 +0000 (12:00 +0200)] 
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.

6 years agoMINOR: proto_htx: Add functions to manage cookies on HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:56:22 +0000 (11:56 +0200)] 
MINOR: proto_htx: Add functions to manage cookies on HTX messages

It is more or less the same than legacy versions but adapted to be called from
HTX analyzers.

6 years agoMINOR: proto_htx: Add functions to apply req* and rsp* rules on HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:53:01 +0000 (11:53 +0200)] 
MINOR: proto_htx: Add functions to apply req* and rsp* rules on HTX messages

It is more or less the same than legacy versions but adapted to be called from
HTX analyzers.

6 years agoMINOR: proto_htx: Add functions htx_req_get_intercept_rule and htx_res_get_intercept_rule
Christopher Faulet [Wed, 24 Oct 2018 09:39:23 +0000 (11:39 +0200)] 
MINOR: proto_htx: Add functions htx_req_get_intercept_rule and htx_res_get_intercept_rule

It is more or less the same than legacy versions but adapted to be called from
HTX analyzers.

6 years agoMINOR: proto_htx: Add function to build and send HTTP 103 responses
Christopher Faulet [Thu, 15 Nov 2018 15:39:29 +0000 (16:39 +0100)] 
MINOR: proto_htx: Add function to build and send HTTP 103 responses

It is more or less the same than legacy versions but adapted to be called from
HTX analyzers.

6 years agoMINOR: proto_htx: Add functions htx_req_replace_stline and htx_res_set_status
Christopher Faulet [Wed, 24 Oct 2018 09:27:39 +0000 (11:27 +0200)] 
MINOR: proto_htx: Add functions htx_req_replace_stline and htx_res_set_status

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.

6 years agoMINOR: proto_htx: Add functions htx_transform_header and htx_transform_header_str
Christopher Faulet [Wed, 24 Oct 2018 09:25:02 +0000 (11:25 +0200)] 
MINOR: proto_htx: Add functions htx_transform_header and htx_transform_header_str

It is more or less the same than legacy versions but adapted to be called from
HTX analyzers.

6 years agoMINOR: proto_htx: Add the internal function htx_fmt_res_line
Christopher Faulet [Wed, 24 Oct 2018 09:06:58 +0000 (11:06 +0200)] 
MINOR: proto_htx: Add the internal function htx_fmt_res_line

6 years agoMINOR: proto_htx: Add the internal function htx_del_hdr_value
Christopher Faulet [Wed, 24 Oct 2018 09:05:36 +0000 (11:05 +0200)] 
MINOR: proto_htx: Add the internal function htx_del_hdr_value

It is more or less the same than del_hdr_value but adapted to be called from HTX
analyzers. The main changes is that it takes pointers on the start and the end
of the header value.

6 years agoMINOR: proto_htx: Rewrite htx_apply_redirect_rule to handle HTX messages
Christopher Faulet [Wed, 24 Oct 2018 09:02:25 +0000 (11:02 +0200)] 
MINOR: proto_htx: Rewrite htx_apply_redirect_rule to handle HTX messages

6 years agoMINOR: http_htx: Add functions to retrieve a specific occurrence of a header
Christopher Faulet [Wed, 24 Oct 2018 08:39:35 +0000 (10:39 +0200)] 
MINOR: http_htx: Add functions to retrieve a specific occurrence of a header

There are 2 functions. The first one considers any comma as a delimiter for
distinct values. The second one considers full-line headers.

6 years agoMINOR: http_htx: Add functions to replace part of the start-line
Christopher Faulet [Wed, 24 Oct 2018 08:36:45 +0000 (10:36 +0200)] 
MINOR: http_htx: Add functions to replace part of the start-line

6 years agoMAJOR: mux-h1/proto_htx: Switch mux-h1 and HTX analyzers on the HTX representation
Christopher Faulet [Mon, 22 Oct 2018 07:34:31 +0000 (09:34 +0200)] 
MAJOR: mux-h1/proto_htx: Switch mux-h1 and HTX analyzers on the HTX representation

The mux-h1 now parses and formats HTTP/1 messages using the HTX
representation. The HTX analyzers have been updated too. For now, only
htx_wait_for_{request/response} and http_{request/response}_forward_body have
been adapted. Others are disabled for now.

Now, the HTTP messages are parsed by the mux on a side and then, after analysis,
formatted on the other side. In the middle, in the stream, there is no more
parsing. Among other things, the version parsing is now handled by the
mux. During the data forwarding, depending the value of the "extra" field, we
are able to know if the body length is known or not and if yes, how many bytes
are still expected.

6 years agoMINOR: proto_htx: Add some functions to handle HTX messages
Christopher Faulet [Mon, 22 Oct 2018 07:29:56 +0000 (09:29 +0200)] 
MINOR: proto_htx: Add some functions to handle HTX messages

More functions will come, but it is the minimum to switch HTX analyzers on the
HTX internal representation.

6 years agoMINOR: http_htx: Add functions to manipulate HTX messages in http_htx.c
Christopher Faulet [Mon, 22 Oct 2018 07:17:28 +0000 (09:17 +0200)] 
MINOR: http_htx: Add functions to manipulate HTX messages in http_htx.c

This file will host all functions to manipulate HTTP messages using the HTX
representation. Functions in this file will be able to be called from anywhere
and are mainly related to the HTTP semantics.

6 years agoMEDIUM: htx: Add API to deal with the internal representation of HTTP messages
Christopher Faulet [Mon, 22 Oct 2018 06:59:39 +0000 (08:59 +0200)] 
MEDIUM: htx: Add API to deal with the internal representation of HTTP messages

The internal representation of an HTTP message, called HTX, is a structured
representation, unlike the old one which is a raw representation of
messages. Idea is to have a version-agnostic representation of the HTTP
messages, which can be easily used by to handle HTTP/1, HTTP/2 and hopefully
QUIC messages, and communication from one of them to another.

In this patch, we add types to define the internal representation itself and the
main functions to manipulate them.

6 years agoMEDIUM: mux-h1: Add support of the kernel TCP splicing to forward data
Christopher Faulet [Tue, 2 Oct 2018 13:59:23 +0000 (15:59 +0200)] 
MEDIUM: mux-h1: Add support of the kernel TCP splicing to forward data

The mux relies on the flag CO_RFL_BUF_FLUSH during a call to h1_rcv_buf to know
if it needs to stop reads and to flush its internal buffers to use kernel tcp
splicing. It is the caller responsibility (here the SI) to know when it must
come back on buffered exchanges.

6 years agoMAJOR: mux-h1/proto_htx: Handle keep-alive connections in the mux
Christopher Faulet [Mon, 1 Oct 2018 10:12:37 +0000 (12:12 +0200)] 
MAJOR: mux-h1/proto_htx: Handle keep-alive connections in the mux

Now, the connection mode is detected in the mux and not in HTX analyzers
anymore. Keep-alive connections are now managed by the mux. A new stream is
created for each transaction. This removes the most important part of the
synchronization between channels and the HTTP transaction cleanup. These changes
only affect the HTX part (proto_htx.c). Legacy HTTP analyzers remain untouched
for now.

On the client-side, the mux is responsible to create new streams when a new
request starts. It is also responsible to parse and update the "Connection:"
header of the response. On the server-side, the mux is responsible to parse and
update the "Connection:" header of the request. Muxes on each side are
independent. For now, there is no connection pool on the server-side, so it
always close the server connection.

6 years agoMEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages
Christopher Faulet [Thu, 20 Sep 2018 14:14:40 +0000 (16:14 +0200)] 
MEDIUM: mux-h1: Add parsing of incoming and ougoing HTTP messages

For now, it only parses and transfers data. There is no internal representation
yet. It means the stream still need to parse it too. So a message is parsed 3
times today: one time by each muxes (the client one and the server one) and
another time by the stream. This is of course inefficient. But don't worry, it
is only a transitionnal state. And this mux is optional for now.

BTW, headers and body parsing are now handled using same functions than the mux
H2. Request/Response synchronization is also handled. The mux's task is now used
to catch client/http-request timeouts. Others timeouts are still handled by the
stream. On the clien-side, the stream is created once headers are fully parsed
and body parsing starts only when heeaders are transferred to the stream (ie,
copied into channel buffer).

There is still some known limitations here and there. But, it works in the
common cases. Bad message are not captured and some logs are emitted when errors
occur, only if no stream are attached to the mux. Otherwise, data are
transferred and we let the stream handles errors itself.

6 years agoMEDIUM: mux-h1: Add dummy mux to handle HTTP/1.1 connections
Christopher Faulet [Thu, 13 Sep 2018 07:05:15 +0000 (09:05 +0200)] 
MEDIUM: mux-h1: Add dummy mux to handle HTTP/1.1 connections

For now, it is just an other kind of passthrough multiplexer, but with internal
buffers to be prepared to parse incoming messages and to format outgoing
ones. There is also a task attached to it to handle timeouts. However, because
it does not handle any timeout for now, this task is unused. And finally,
because it handles internal buffers, it also handles retries on recv/send. To
use this multiplexer, you must use the option "http-use-htx" both on the
frontend and the backend.

It does not support keep-alive and will freeze connections after the first
request/response.

6 years agoMEDIUM: proto_htx: Add HTX analyzers and use it when the mux H1 is used
Christopher Faulet [Wed, 3 Oct 2018 14:38:02 +0000 (16:38 +0200)] 
MEDIUM: proto_htx: Add HTX analyzers and use it when the mux H1 is used

For now, these analyzers are just copies of the legacy HTTP analyzers. But,
during the HTTP refactoring, it will be the main place where it will be
visible. And in legacy analyzers, the macro IS_HTX_STRM is used to know if the
HTX version should be called or not.

Note: the following commits were applied to proto_http.c after this patch
      was developed and need to be studied to see if an adaptation to htx
      is required :

  fd9b68c BUG/MINOR: only mark connections private if NTLM is detected

6 years agoMINOR: http: Add macros to check if a stream uses the HTX representation
Christopher Faulet [Wed, 3 Oct 2018 12:25:40 +0000 (14:25 +0200)] 
MINOR: http: Add macros to check if a stream uses the HTX representation

To prepare the refactoring of the code handling HTTP messages, these macros will
help to use HTX functions instead of legacy ones when the new HTX internal
representation is in use. To do so, for a given stream, we will check if its
frontend has the option PR_O2_USE_HTX. It is useless to test backend options
because it is not possible to mix the HTX representation and the legacy one
(i.e, having an HTX frontend and a legacy backend or vice versa).

6 years agoMINOR: conn_stream: Add a flag to notify the SI some data were received
Christopher Faulet [Wed, 31 Oct 2018 07:53:54 +0000 (08:53 +0100)] 
MINOR: conn_stream: Add a flag to notify the SI some data were received

The flag CS_FL_READ_PARTIAL can be set by the mux on the conn_stream to notify
the stream interface that some data were received. Is is used in si_cs_recv to
re-arm read timeout on the channel.

6 years agoMINOR: http: Call http_send_name_header with the stream instead of the txn
Christopher Faulet [Tue, 23 Oct 2018 13:34:07 +0000 (15:34 +0200)] 
MINOR: http: Call http_send_name_header with the stream instead of the txn

This is just a minor change to ease integrartion of the HTX.

6 years agoMINOR: http: Add standalone functions to parse a start-line or a header
Christopher Faulet [Mon, 22 Oct 2018 13:12:04 +0000 (15:12 +0200)] 
MINOR: http: Add standalone functions to parse a start-line or a header

These 2 functions are pretty naive. They only split a start-line into its 3
substrings or a header line into its name and value. Spaces before and after
each part are skipped. No CRLF at the end are expected.

6 years agoMINOR: conn_stream: Add a flag to notify the mux it must respect the reserve
Christopher Faulet [Wed, 17 Oct 2018 09:08:23 +0000 (11:08 +0200)] 
MINOR: conn_stream: Add a flag to notify the mux it must respect the reserve

By setting the flag CO_RFL_KEEP_RSV when calling mux->rcv_buf, the
stream-interface notifies the mux it must keep some space to preserve the
buffer's reserve. This flag is only useful for multiplexers handling structured
data, because in such case, the stream-interface cannot know the real amount of
free space in the channel's buffer.

6 years agoMINOR: htx: Add proto_htx.c file
Christopher Faulet [Thu, 11 Oct 2018 13:55:07 +0000 (15:55 +0200)] 
MINOR: htx: Add proto_htx.c file

This file is empty for now. But it will be used to add new versions of the HTTP
analyzers based on the internal representation of HTTP messages (not implemented
yet but called HTX).

6 years agoMINOR: conn_stream: Add a flag to notify the mux it should flush its buffers
Christopher Faulet [Thu, 11 Oct 2018 13:56:04 +0000 (15:56 +0200)] 
MINOR: conn_stream: Add a flag to notify the mux it should flush its buffers

By setting the flag CO_RFL_BUF_FLUSH when calling mux->rcv_buf, the
stream-interface notifies the mux it should flush its buffers without reading
more data. This flag is set when the SI want to use the kernel TCP splicing to
forward data. Of course, the mux can respect it or not, depending on its
state. It's just an information.

6 years agoMAJOR: connections: Detach connections from streams.
Olivier Houchard [Tue, 13 Nov 2018 15:48:36 +0000 (16:48 +0100)] 
MAJOR: connections: Detach connections from streams.

Do not destroy the connection when we're about to destroy a stream. This
prevents us from doing keepalive on server connections when the client is
using HTTP/2, as a new stream is created for each request.
Instead, the session is now responsible for destroying connections.
When reusing connections, the attach() mux method is now used to create a new
conn_stream.

6 years agoMINOR: sessions: Start to store the outgoing connection in sessions.
Olivier Houchard [Tue, 13 Nov 2018 15:44:31 +0000 (16:44 +0100)] 
MINOR: sessions: Start to store the outgoing connection in sessions.

Introduce a new field in session, "srv_conn", and a linked list of sessions
in the connection. It will be used later when we'll switch connections
from being managed by the stream, to being managed by the session.

6 years agoMINOR: mux: Add a destroy() method.
Olivier Houchard [Tue, 6 Nov 2018 15:32:42 +0000 (16:32 +0100)] 
MINOR: mux: Add a destroy() method.

Add a new method to muxes, destroy(), that is responsible for destroying
the mux and the associated connection, to be used for server connections.

6 years agoMINOR: mux: Add a new "avail_streams" method.
Olivier Houchard [Mon, 5 Nov 2018 17:37:53 +0000 (18:37 +0100)] 
MINOR: mux: Add a new "avail_streams" method.

Add a new method for mux, avail_streams, that returns the number of streams
still available for a mux.
For the mux_pt, it'll return 1 if the connection is in idle, or 0. For
the H2 mux, it'll return the max number of streams allowed, minus the number
of streams currently in use.

6 years agoMEDIUM: mux: Teach the mux_pt how to deal with idle connections.
Olivier Houchard [Mon, 5 Nov 2018 17:28:43 +0000 (18:28 +0100)] 
MEDIUM: mux: Teach the mux_pt how to deal with idle connections.

In order to make the mux_pt able to handle idle connections, give it its
own context, where it'll stores the connection, the current conn_stream if
any, and a wait_event, so that it can subscribe to I/O events.
Add a new parameter to the detach() method, that gives the mux a hint
if it should destroy the connection or not when detaching a conn_stream.
If 1, then the mux_pt immediately destroys the connecion, if 0, then it
just subscribes to any read event. If a read happens, it will call
conn_sock_drain(), and if there's a connection error, it'll free the
connection, after removing it from the idle list.

6 years agoMEDIUM: connections: Wait until the connection is established to try to recv.
Olivier Houchard [Wed, 7 Nov 2018 16:55:19 +0000 (17:55 +0100)] 
MEDIUM: connections: Wait until the connection is established to try to recv.

Instead of trying to receive as soon as the connection is created, and to
eventually have to transfer subscription if we move connections, wait
until the connection is established before attempting to recv.

6 years agoMINOR: stream-int: replace si_cant_put() with si_rx_room_{blk,rdy}()
Willy Tarreau [Thu, 15 Nov 2018 10:08:52 +0000 (11:08 +0100)] 
MINOR: stream-int: replace si_cant_put() with si_rx_room_{blk,rdy}()

Remaining calls to si_cant_put() were all for lack of room and were
turned to si_rx_room_blk(). A few places where SI_FL_RXBLK_ROOM was
cleared by hand were converted to si_rx_room_rdy().

The now unused si_cant_put() function was removed.

6 years agoMEDIUM: stream-int: make use of si_rx_chan_{rdy,blk} to control the stream-int from...
Willy Tarreau [Wed, 14 Nov 2018 16:10:36 +0000 (17:10 +0100)] 
MEDIUM: stream-int: make use of si_rx_chan_{rdy,blk} to control the stream-int from the channel

The channel can disable reading from the stream-interface using various
methods, such as :
  - CF_DONT_READ
  - !channel_may_recv()
  - and possibly others

Till now this was done by mangling SI_FL_RX_WAIT_EP which is not
appropriate at all since it's not the stream interface which decides
whether it wants to deliver data or not. Some places were also wrongly
relying on SI_FL_RXBLK_ROOM since it was the only other alternative,
but it's not suitable for CF_DONT_READ.

Let's use the SI_FL_RXBLK_CHAN flag for this instead. It will properly
prevent the stream interface from being woken up and reads from
subscribing to more receipt without being accidently removed. It is
automatically reset if CF_DONT_READ is not set in stream_int_notify().

The code is not trivial because it splits the logic between everything
related to buffer contents (channel_is_empty(), CF_WRITE_PARTIAL, etc)
and buffer policy (CF_DONT_READ). Also it now needs to decide timeouts
based on any blocking flag and not just SI_FL_RXBLK_ROOM anymore.

It looks like this patch has caused a minor performance degradation on
connection rate, which possibly deserves being investigated deeper as
the test conditions are uncertain (e.g. slightly more subscribe calls?).

6 years agoMEDIUM: stream-int: unconditionally call si_chk_rcv() in update and notify
Willy Tarreau [Thu, 15 Nov 2018 06:46:57 +0000 (07:46 +0100)] 
MEDIUM: stream-int: unconditionally call si_chk_rcv() in update and notify

For a long time, stream_int_update() and stream_int_notify() used to only
conditionally call si_chk_rcv() based on state change detection. This
detection is not reliable and quite complex. With the new blocked flags
that si_chk_rcv() checks, it's much more reliable to always call the
function to take into account recent changes,and let it decide if it needs
to wake something up or not.

This also removes the calls to si_chk_rcv() that were performed in
si_update_both() since these ones are systematically performed in
stream_int_update() after updating the Rx flags.

6 years agoMEDIUM: stream-int: use si_rx_shut_blk() to indicate the SI is closed
Willy Tarreau [Wed, 14 Nov 2018 15:58:52 +0000 (16:58 +0100)] 
MEDIUM: stream-int: use si_rx_shut_blk() to indicate the SI is closed

Till now we were using si_done_put() upon shutr, but these flags could
be reset upon next activity. Now let's switch to SI_FL_RXBLK_SHUT which
doesn't go away. It's also set in stream_int_update() in case a shutr
condition is detected.

The now unused si_done_put() was removed.

6 years agoMEDIUM: stream-int: fix the si_cant_put() calls used for buffer readiness
Willy Tarreau [Thu, 15 Nov 2018 10:03:21 +0000 (11:03 +0100)] 
MEDIUM: stream-int: fix the si_cant_put() calls used for buffer readiness

A number of calls to si_cant_put() were used in fact to request being
called back once a buffer is available. These ones are not needed anymore
since si_alloc_ibuf() already sets the SI_FL_RXBLK_BUFF flag when called
in appctx context. Those called with a foreign stream-int are simply turned
to si_rx_buff_blk().

6 years agoMEDIUM: stream-int: fix the si_cant_put() calls used for end point readiness
Willy Tarreau [Thu, 15 Nov 2018 09:57:41 +0000 (10:57 +0100)] 
MEDIUM: stream-int: fix the si_cant_put() calls used for end point readiness

A number of si_cant_put() calls were still present to in fact indicate
that the end point is ready (thus should be turned to si_rx_endp_more()).

One other call in the Lua handler indicates that the endpoint wanted to
be blocked until some room is made in the Rx buffer in order to detect
that the connection happened, which is in fact an indication that it
wants to be called once the endpoint is ready, this is the default case
for an applet so this call was removed.

A useless call to si_cant_put() before appctx_wakeup() in the Lua
applet wakeup call was removed as well since the first thing that will
be done there will be to set end ENDP blocking flag.

6 years agoMINOR: stream-int: automatically mark applets as ready if they block on the channel
Willy Tarreau [Fri, 16 Nov 2018 15:18:34 +0000 (16:18 +0100)] 
MINOR: stream-int: automatically mark applets as ready if they block on the channel

If an applet reports being blocked due to any of the channel-side flags,
it's reportedly ready to deliver incoming data. It's better to do this
after the return from the applet handler so that applet developers don't
have to worry about details related to flags ordering.

6 years agoMINOR: stream-int: make si_sync_recv() simply check ENDP before si_cs_recv()
Willy Tarreau [Fri, 16 Nov 2018 13:26:11 +0000 (14:26 +0100)] 
MINOR: stream-int: make si_sync_recv() simply check ENDP before si_cs_recv()

Instead of checking complex conditions to call si_cs_recv() upon first
call, let's simply use si_rx_endp_ready() now that si_cs_recv() reports
it accurately, and add si_rx_blocked() to cover any blocking situation.

6 years agoMEDIUM: stream-int: update the endp polling status only at the end of si_cs_recv()
Willy Tarreau [Thu, 15 Nov 2018 15:55:14 +0000 (16:55 +0100)] 
MEDIUM: stream-int: update the endp polling status only at the end of si_cs_recv()

Instead of first indicating that there's more data to read from the
conn_stream then re-adjusting this info along the function, we now
instead set the status according to the subscription status at the
end. It's easier, more accurate, and less sensitive to intermediary
changes.

This will soon allow to remove all the si_cant_put() calls that were
placed in the middle to force a subsequent callback and prevent the
function from subscribing to the mux layer.

6 years agoMINOR: stream-int: replace si_{want,stop}_put() with si_rx_endp_{more,done}()
Willy Tarreau [Wed, 14 Nov 2018 16:54:13 +0000 (17:54 +0100)] 
MINOR: stream-int: replace si_{want,stop}_put() with si_rx_endp_{more,done}()

Here it's only a 1-to-1 replacement.

6 years agoMEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness
Willy Tarreau [Wed, 14 Nov 2018 14:12:08 +0000 (15:12 +0100)] 
MEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness

The stream interface used to conflate a missing buffer and lack of
buffer space into SI_FL_WAIT_ROOM but this causes difficulties as
these cannot be checked at the same moment and are not resolved at
the same moment either. Now we instead mark the buffer as presumably
available using si_rx_buff_rdy() and mark it as unavailable+requested
using si_rx_buff_blk().

The call to si_alloc_buf() was moved after si_stop_put(). This makes
sure that the SI_FL_RX_WAIT_EP flag is cleared on allocation failure so
that the function is called again if the callee fails to do its work.

6 years agoMINOR: stream-int: use si_rx_blocked()/si_tx_blocked() to check readiness
Willy Tarreau [Wed, 14 Nov 2018 13:07:59 +0000 (14:07 +0100)] 
MINOR: stream-int: use si_rx_blocked()/si_tx_blocked() to check readiness

This way we don't limit ourselves to random flags only and the code
is more readable and safer for the long term.

6 years agoMINOR: stream-int: replace SI_FL_WANT_PUT with !SI_FL_RX_WAIT_EP
Willy Tarreau [Wed, 14 Nov 2018 12:43:35 +0000 (13:43 +0100)] 
MINOR: stream-int: replace SI_FL_WANT_PUT with !SI_FL_RX_WAIT_EP

The SI_FL_WANT_PUT flag is used in an awkward way, sometimes it's
set by the stream-interface to mean "I have something to deliver",
sometimes it's cleared by the channel to say "I don't want you to
send what you have", and it has to be set back once CF_DONT_READ
is cleared. This will have to be split between SI_FL_RX_WAIT_EP
and SI_FL_RXBLK_CHAN. This patch only replaces all uses of the
flag with its natural (but negated) replacement SI_FL_RX_WAIT_EP.
The code is expected to be strictly equivalent. The now unused flag
was completely removed.

6 years agoMINOR: stream-int: add new functions si_{rx,tx}_{blocked,endp_ready}()
Willy Tarreau [Wed, 14 Nov 2018 13:01:40 +0000 (14:01 +0100)] 
MINOR: stream-int: add new functions si_{rx,tx}_{blocked,endp_ready}()

The first ones are used to figure if a direction is blocked on the
stream interface for anything but the end point. The second ones are
used to detect if the end point is ready to receive/transmit. They
should be used instead of directly fiddling with the existing bits.

6 years agoMINOR: stream-int: introduce new SI_FL_RXBLK flags
Willy Tarreau [Wed, 14 Nov 2018 10:24:08 +0000 (11:24 +0100)] 
MINOR: stream-int: introduce new SI_FL_RXBLK flags

The plan is to have the following flags to describe why a stream interface
doesn't produce data :

    - SI_FL_RXBLK_CHAN : the channel doesn't want it to receive
    - SI_FL_RXBLK_BUFF : waiting for a buffer allocation to complete
    - SI_FL_RXBLK_ROOM : more room is required in the channel to receive
    - SI_FL_RXBLK_SHUT : input now closed, nothing new will come
    - SI_FL_RX_WAIT_EP : waiting for the endpoint to produce more data

Applets like the CLI which consume complete commands at once and produce
large chunks of responses will for example be able to stop being woken up
by clearing SI_FL_WANT_GET and setting SI_FL_RXBLK_ROOM when the rx buffer
is full. Once called they will unblock WANT_GET. The flags were moved
together in readable form with the Rx bits using 2 hex digits and still
have some room to do a similar operation on the Tx path later, with the
WAIT_EP flag being represented alone on a digit.

6 years agoMINOR: stream-int: rename SI_FL_WAIT_ROOM to SI_FL_RXBLK_ROOM
Willy Tarreau [Wed, 14 Nov 2018 10:10:26 +0000 (11:10 +0100)] 
MINOR: stream-int: rename SI_FL_WAIT_ROOM to SI_FL_RXBLK_ROOM

This flag is not enough to describe all blocking situations, as can be
seen in each case we remove it. The muxes has taught us that using multiple
blocking flags in parallel will be much easier, so let's start to do this
now. This patch only renames this flags in order to make next changes more
readable.

6 years agoMINOR: stream-int: expand the flags to 32-bit
Willy Tarreau [Wed, 14 Nov 2018 09:53:42 +0000 (10:53 +0100)] 
MINOR: stream-int: expand the flags to 32-bit

We used to have enough of 16 bits, with 3 still available but it's
not possible to add the rx/tx blocking bits there. Let's extend the
format to 32 bits and slightly reorder the fields to maintain the
struct size to 64 bytes. Nothing else was changed.

6 years agoMINOR: stream-int: relax the forwarding rules in stream_int_notify()
Willy Tarreau [Sun, 18 Nov 2018 14:46:10 +0000 (15:46 +0100)] 
MINOR: stream-int: relax the forwarding rules in stream_int_notify()

There currently is an optimization in stream_int_notify() consisting
in not trying to forward small bits of data if extra data remain to be
processed. The purpose is to avoid forwarding one chunk at a time if
multiple chunks are available to be parsed at once. It consists in
avoiding sending pending output data if there are still data to be
parsed in the channel's buffer, since process_stream() will have the
opportunity to deal with them all at once.

Not only this optimization is less useful with the new way the connections
work, but it even causes problems like lost events since WAIT_ROOM will
not be removed. And with HTX, it will never be able to update the input
buffer after the first read.

Let's relax the rules now, by always sending if we don't have the
CF_EXPECT_MORE flag (used to group writes), or if the buffer is
already full.

6 years agoMINOR: stream-int: make conn_si_send_proxy() use cs_get_first()
Willy Tarreau [Sun, 18 Nov 2018 20:38:19 +0000 (21:38 +0100)] 
MINOR: stream-int: make conn_si_send_proxy() use cs_get_first()

The function used to abuse the internals of mux_pt to retrieve a
conn_stream, which will not work anymore after the idle connection
changes. Let's make it rely on the more reliable cs_get_first()
instead.

6 years agoMINOR: mux: implement a get_first_cs() method
Willy Tarreau [Sun, 18 Nov 2018 20:29:20 +0000 (21:29 +0100)] 
MINOR: mux: implement a get_first_cs() method

This method is used to retrieve the first known good conn_stream from
the mux. It will be used to find the other end of a connection when
dealing with the proxy protocol for example.

6 years agoCLEANUP: h2: minimum documentation for recent API changes
Willy Tarreau [Sun, 18 Nov 2018 05:30:59 +0000 (06:30 +0100)] 
CLEANUP: h2: minimum documentation for recent API changes

Commit d4dd22d ("MINOR: h2: Let user of h2_recv() and h2_send() know xfer
has been done") changed the API without documenting the expected returned
values which appear to come out of nowhere in the code :-(  Please don't
do that anymore! The description was recovered from the commit message.

6 years agoBUG/MINOR: config: Copy default error messages when parsing of a backend starts
Christopher Faulet [Mon, 12 Nov 2018 10:57:31 +0000 (11:57 +0100)] 
BUG/MINOR: config: Copy default error messages when parsing of a backend starts

To be used, error messages declared in a default section must be copied when the
parsing of a proxy section starts. But this was only done for frontends.

This patch may be backported to older versions.

6 years agoMINOR: stream: move the conn_stream specific calls to the stream-int
Willy Tarreau [Sat, 17 Nov 2018 18:51:07 +0000 (19:51 +0100)] 
MINOR: stream: move the conn_stream specific calls to the stream-int

There are still some unwelcome synchronous calls to si_cs_recv() in
process_stream(). Let's have a new function si_sync_recv() to perform
a synchronous receive call on a stream interface regardless of the type
of its endpoint, and move these calls there. For now it only implements
conn_streams since it doesn't seem useful to support applets there. The
function implements an extra check for the stream interface to be in an
established state before attempting anything.

6 years agoBUG/MINOR: stream-int: set SI_FL_WANT_PUT in sess_establish()
Willy Tarreau [Sat, 17 Nov 2018 18:14:35 +0000 (19:14 +0100)] 
BUG/MINOR: stream-int: set SI_FL_WANT_PUT in sess_establish()

In commit f26c26c ("BUG/MEDIUM: stream-int: change the way buffer room
is requested by a stream-int") we used to call si_want_put() at the
end of sess_update_st_con_tcp(), when switching to SI_ST_EST state.
But this is incorrect as there are a few other situations where we
can switch to this state, such as in si_connect() where a connection
reuse is detected, or when directly calling an applet (in which case
that was already covered anyway). For now it doesn't have any side
effect but it could impact connection reuse after the stream-int
changes by stalling an immediately reused connection.

Let's move this flag change to sess_establish() instead, which is the
only place which is always called exactly once on connection setup.

No backport is needed, this is purely 1.9.

6 years agoMEDIUM: cli: worker socketpair is unstoppable
William Lallemand [Fri, 16 Nov 2018 15:57:22 +0000 (16:57 +0100)] 
MEDIUM: cli: worker socketpair is unstoppable

In master-worker mode, the socketpair CLI listener of the worker is now
marked unstoppable, which allows to connect to the CLI of an old process
which is in a leaving state, allowing to debug it.

6 years agoMEDIUM: listeners: support unstoppable listener
William Lallemand [Fri, 16 Nov 2018 15:57:21 +0000 (16:57 +0100)] 
MEDIUM: listeners: support unstoppable listener

An unstoppable listener is a listener which won't be stop during a soft
stop. The unstoppable_jobs variable is incremented and the listener
won't prevent the process to leave properly.

It is not a good idea to use this feature (the LI_O_NOSTOP flag) with a
listener that need to be bind again on another process during a soft
reload.

6 years agoMEDIUM: jobs: support unstoppable jobs for soft stop
William Lallemand [Fri, 16 Nov 2018 15:57:20 +0000 (16:57 +0100)] 
MEDIUM: jobs: support unstoppable jobs for soft stop

This patch allows a process to properly quit when some jobs are still
active, this feature is handled by the unstoppable_jobs variable, which
must be atomically incremented.

During each new iteration of run_poll_loop() the break condition of the
loop is now (jobs - unstoppable_jobs) == 0.

The unique usage of this at the moment is to handle the socketpair CLI
of a the worker during the stopping of the process.  During the soft
stop, we could mark the CLI listener as an unstoppable job and still
handle new connections till every other jobs are stopped.

6 years agoBUG/MINOR: http: Be sure to sent fully formed HTTP 103 responses
Christopher Faulet [Thu, 15 Nov 2018 14:41:55 +0000 (15:41 +0100)] 
BUG/MINOR: http: Be sure to sent fully formed HTTP 103 responses

The previous commit fedceaf33 ("MINOR: http: Regroup return statements of
http_req_get_intercept_rule at the end") partly fixes the problem. But not
entierly. Because HTTP 103 reponses were sent line by line it is possible to mix
them with others. For instance, an early-hint rule followed by a redirect rule
leaving the response buffer totally messed up. Furthermore, if we fail to add
the last CRLF to finish the HTTP 103 response because there is no more space in
the buffer, it leave the buffer with an unfinished and invalid message.

This patch fixes the bug by creating a fully formed HTTP 103 response before
trying to push it in the response buffer. If an error occurred during the copy
or if another response was already sent, the HTTP 103 response is
ignored. However, the last point should never happened because, for redirects
and authentication errors, we first try to copy any pending HTTP 103 response.

6 years agoMINOR: http: Regroup return statements of http_res_get_intercept_rule at the end
Christopher Faulet [Thu, 15 Nov 2018 14:40:29 +0000 (15:40 +0100)] 
MINOR: http: Regroup return statements of http_res_get_intercept_rule at the end

Instead of having multiple return statements spreaded here and there in middle
of the function, we just exit from the loop setting the right return code. It
let a chance to do some work before leaving the function. It is also less error
prone.

6 years agoMINOR: http: Regroup return statements of http_req_get_intercept_rule at the end
Christopher Faulet [Thu, 15 Nov 2018 14:34:11 +0000 (15:34 +0100)] 
MINOR: http: Regroup return statements of http_req_get_intercept_rule at the end

Instead of having multiple return statements spreaded here and there in middle
of the function, we just exit from the loop setting the right return code. It
let a chance to do some work before leaving the function. It is also less error
prone.

6 years agoBUG/MINOR: http_fetch: Remove the version part when capturing the request uri
Christopher Faulet [Thu, 15 Nov 2018 13:35:18 +0000 (14:35 +0100)] 
BUG/MINOR: http_fetch: Remove the version part when capturing the request uri

This patch fixes a bug introduced in the commit 6b952c810 ("REORG: http: move
http_get_path() to http.c"). In the reorg, the code responsible to skip the
version to only extract the path in the HTTP request was dropped.

No backport is needed, this only affects 1.9.

6 years agoREGTEST: fix scripts 1 and 3 to accept development version
Willy Tarreau [Fri, 16 Nov 2018 14:54:23 +0000 (15:54 +0100)] 
REGTEST: fix scripts 1 and 3 to accept development version

These scripts were checking that the program's name was exactly "haproxy"
which clearly is not workable during development.

6 years agoCONTRIB: debug: fix build related to conn_stream flags change
Willy Tarreau [Fri, 16 Nov 2018 09:37:20 +0000 (10:37 +0100)] 
CONTRIB: debug: fix build related to conn_stream flags change

Commit 53216e7db ("MEDIUM: connections: Don't directly mess with the
polling from the upper layers.") removed the CS_FL_DATA_RD_ENA and
CS_FL_DATA_WR_ENA flags without updating flags.c, thus breaking the
build. This patch also adds flag CL_FL_NOT_FIRST which was brought
by commit 08088e77c.

6 years agoBUG/MINOR: stream-int: make sure not to go through the rcv_buf path after splice()
Willy Tarreau [Thu, 15 Nov 2018 15:06:02 +0000 (16:06 +0100)] 
BUG/MINOR: stream-int: make sure not to go through the rcv_buf path after splice()

When splice() reports a pipe full condition, we go through the common
code used to release a possibly empty pipe (which we don't have) and which
immediately tries to allocate a buffer that will never be used. Further,
it may even subscribe to get this buffer if the resources are low. Let's
simply get out of this way if the pipe is full.

This fix could be backported to 1.8 though the code is a bit different
overthere.

6 years agoBUG/MEDIUM: stream-int: clear CO_FL_WAIT_ROOM after splicing data in
Willy Tarreau [Thu, 15 Nov 2018 14:52:53 +0000 (15:52 +0100)] 
BUG/MEDIUM: stream-int: clear CO_FL_WAIT_ROOM after splicing data in

Since we don't necessarily pass through conn_fd_handler() when reading,
conn_refresh_polling_flags() is not necessarily called when performing
a recv() operation, thus flags like CO_FL_WAIT_ROOM are not cleared.

It happens that si_cs_recv() checks CO_FL_WAIT_ROOM before deciding to
receive into a buffer, to see if the previous rcv_pipe() call failed by
lack of pipe room. The combined effect of these two statements is that
at the end of a file transmission, when there's too little data to
warrant the use of a pipe and the pipe is empty, we refrain from using
rcv_pipe() for the last few bytes, but since CO_FL_WAIT_ROOM is still
present, we don't use rcv_buf() either, and the connection remains
frozen in this state with si_cs_recv() called in loops.

In order to fix this we can simply manually clear CO_FL_WAIT_ROOM when
not using pipe so that the next check sees the result of the previous
operation and not an old one. We could equally call
cond_refresh_polling_flags() but that would be overkill and dangerous
given that it would manipulate the connection's flags under the mux.
By the way ideally the mux should report this flag into the connstream
for cleaner manipulation.

No backport is needed as this is only post 1.9-dev2.