]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse-global: parse options to allow non std keywords in discovery mode
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 19 Nov 2024 09:47:38 +0000 (10:47 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 19 Nov 2024 13:13:19 +0000 (14:13 +0100)
'Program' section is considered as deprecated now, see the commit 581c8a27d98c
("MEDIUM: mworker: depreciate the 'program' section"). So, the 'program'
section parser emits a warning every time since this commit, if its section is
presented. This makes impossible to launch the process in zero-warning mode.

After master-worker refactoring only the master process parses the 'program'
section. So, at first, in order to be able to start in zero-warning mode, we
need to parse in master process option, which allows deprecated keywords. Thus,
let's set in this commit KWF_DISCOVERY flag to
cfg_parse_global_non_std_directives parser, which parses
'expose-deprecated-directives' and 'expose-deprecated-directives' options.

src/cfgparse-global.c

index b8369c821ea05c02a918ff4675cd3babd180d1b8..c0056458adb7df519687bbf03f8f207e555270a2 100644 (file)
@@ -1633,7 +1633,7 @@ static struct cfg_kw_list cfg_kws = {ILH, {
        { CFG_GLOBAL, "noevports", cfg_parse_global_disable_poller, KWF_DISCOVERY },
        { CFG_GLOBAL, "nopoll", cfg_parse_global_disable_poller, KWF_DISCOVERY },
        { CFG_GLOBAL, "pidfile", cfg_parse_global_pidfile, KWF_DISCOVERY },
-       { CFG_GLOBAL, "expose-deprecated-directives", cfg_parse_global_non_std_directives },
+       { CFG_GLOBAL, "expose-deprecated-directives", cfg_parse_global_non_std_directives, KWF_DISCOVERY },
        { CFG_GLOBAL, "expose-experimental-directives", cfg_parse_global_non_std_directives },
        { CFG_GLOBAL, "tune.runqueue-depth", cfg_parse_global_tune_opts },
        { CFG_GLOBAL, "tune.maxpollevents", cfg_parse_global_tune_opts },