BUG/MINOR: quic: remove startup alert if conn socket-owner unsupported

QUIC relies on several advanced network API features from the kernel to
perform optimally. Checks are performed during startup to ensure that
these features are supported. A fallback is automatically performed for
every incompatible feature.

Besides the automatic fallback mechanism, a message is also reported to
the user at the same time. Previously, alert level was used, but it is
incorrect as it is reserved for unrecoverable errors which should
prevent haproxy to start. Warning level could be used, but this can
annoy users running with zero-warning mode.

This patch removes the alert message when 'socket-owner connection' mode
cannot be activated. Convert the message to a diag level. This allows
users to start without forcing configuration modification to hide a
warning. Besides, several feature fallback such as the polling mechanism
does not emit any warning either, so it's better to adopt a similar
behavior for QUIC features.

This must be backported up to 2.8.

(cherry picked from commit 6fed219fd786f3fdca155f686cf2fa2f9e572697)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 24fa1cc97310e436607f64aa1ce3fd4330a26597)
[cf: ctx adjt]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
Amaury Denoyelle
2024-12-04 16:25:03 +01:00
committed by Christopher Faulet
parent b5044b5760
commit ffdd10f627

View File

@ -537,8 +537,8 @@ static int quic_test_sock_per_conn_support(struct listener *l)
* operation.
*/
#if !defined(IP_PKTINFO) && !defined(IP_RECVDSTADDR)
ha_alert("Your platform does not seem to support UDP source address retrieval through IP_PKTINFO or an alternative flag. "
"QUIC connections will use listener socket.\n");
ha_diag_warning("Your platform does not seem to support UDP source address retrieval through IP_PKTINFO or an alternative flag. "
"QUIC connections will use listener socket.\n");
ret = 0;
#endif
@ -553,8 +553,8 @@ static int quic_test_sock_per_conn_support(struct listener *l)
if (fdtest >= 0) {
if (setsockopt(fdtest, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) &&
bind(fdtest, (struct sockaddr *)&rx->addr, rx->proto->fam->sock_addrlen) < 0) {
ha_alert("Your platform does not seem to support multiple UDP sockets binded on the same address. "
"QUIC connections will use listener socket.\n");
ha_diag_warning("Your platform does not seem to support multiple UDP sockets binded on the same address. "
"QUIC connections will use listener socket.\n");
ret = 0;
}