]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mworker: does not create the "default" resolvers in wait mode
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 24 Aug 2022 09:15:08 +0000 (11:15 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 24 Aug 2022 09:28:29 +0000 (11:28 +0200)
When doing a re-exec, the master was creating a "default" resolvers,
which could result in a warning emitted because the "default" resolvers
of the configuration file is not available anymore.

Skip the creating of the "default" resolvers in wait mode, this is not
useful in the master.

Must be backported as far as 2.6.

src/resolvers.c

index 2124df7bb3cd1f0b33d5d8ded99d04063028cbcf..bcfd8783a24fc6d61bb02de4d83f8faadb39f29e 100644 (file)
@@ -3671,6 +3671,9 @@ int resolvers_create_default()
 {
        int err_code = 0;
 
+       if (global.mode & MODE_MWORKER_WAIT) /* does not create the section if in wait mode */
+               return 0;
+
        /* if the section already exists, do nothing */
        if (find_resolvers_by_id("default"))
                return 0;