From: Valentine Krasnobaeva Date: Tue, 19 Nov 2024 09:47:38 +0000 (+0100) Subject: MINOR: cfgparse-global: parse options to allow non std keywords in discovery mode X-Git-Tag: v3.1-dev14~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39ea0df38ffc44a8d78a5524f50d22b25cd78101;p=thirdparty%2Fhaproxy.git MINOR: cfgparse-global: parse options to allow non std keywords in discovery mode '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. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index b8369c821e..c0056458ad 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -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 },