]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: remove startup alert if conn socket-owner unsupported
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 4 Dec 2024 15:25:03 +0000 (16:25 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 5 Dec 2024 10:30:12 +0000 (11:30 +0100)
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.

src/proto_quic.c

index 417c364f50316a9b031289e60d62e8934d2ad6b8..47be132386b65f98aa0c4c2669d388d2dfde87a5 100644 (file)
@@ -543,13 +543,13 @@ static int quic_test_socketopts(struct listener *l)
                 */
                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");
                        global.tune.options &= ~GTUNE_QUIC_SOCK_PER_CONN;
                }
 #else
-               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");
                global.tune.options &= ~GTUNE_QUIC_SOCK_PER_CONN;
 #endif
        }