]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: startup: don't dump polling info for master in verbose mode
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 30 Oct 2024 09:49:26 +0000 (10:49 +0100)
committerValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 30 Oct 2024 09:50:09 +0000 (10:50 +0100)
As master-worker fork happens now before step_init_2(), when pollers are
initialized and polling settings and dumped then in verbose and in debug modes
to stdout, it turns out that master and worker dump its same polling
settings separately. This creates long and messy output in these modes.

Polling settings are the same for master and for worker process for the moment.
Even if they would diverge in future we are interested here in worker's
settings. So, when started in the master-worker mode let's dump it only in the
worker context.

This doesn't need to be backported as related to the latest master-worker
refactoring.

src/haproxy.c

index ffee48779f1bf16690d325ae2c9d13b2b6a816cc..80bb090b36969aa11866a08cf304160ecea9e99c 100644 (file)
@@ -2786,7 +2786,7 @@ static void step_init_2(int argc, char** argv)
 
        /* Note: we could disable any poller by name here */
 
-       if (global.mode & (MODE_VERBOSE|MODE_DEBUG)) {
+       if ((global.mode & (MODE_VERBOSE|MODE_DEBUG)) && !master) {
                list_pollers(stderr);
                fprintf(stderr, "\n");
                list_filters(stderr);