From ccf429960b81cbadcb2b5e63c6098bc7e626495f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 9 Oct 2020 19:15:03 +0200 Subject: [PATCH] MEDIUM: config: remove the deprecated and dangerous global "debug" directive This one was scheduled for removal in 2.3 since 2.2-dev3 by commit 1b85785bc ("MINOR: config: mark global.debug as deprecated"). Let's remove it now. It remains totally possible to use -d on the command line though. --- doc/configuration.txt | 7 ------- doc/management.txt | 5 ++--- src/cfgparse-global.c | 8 -------- tests/test-fsm.cfg | 1 - 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index ce7000470..3e01dbf1a 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -717,7 +717,6 @@ The following keywords are supported in the "global" section : - tune.zlib.windowsize * Debugging - - debug - quiet - zero-warning @@ -2317,12 +2316,6 @@ tune.zlib.windowsize 3.3. Debugging -------------- -debug (deprecated) - Enables debug mode which dumps to stdout all exchanges, and disables forking - into background. It is the equivalent of the command-line argument "-d". It - should never be used in a production configuration since it may prevent full - system startup. - quiet Do not display any message during startup. It is equivalent to the command- line argument "-q". diff --git a/doc/management.txt b/doc/management.txt index 9fd7e6c03..a5fecffeb 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -196,9 +196,8 @@ list of options is : error is encountered. Presence of warnings will be reported if any. -d : enable debug mode. This disables daemon mode, forces the process to stay - in foreground and to show incoming and outgoing events. It is equivalent to - the "global" section's "debug" keyword. It must never be used in an init - script. + in foreground and to show incoming and outgoing events. It must never be + used in an init script. -dG : disable use of getaddrinfo() to resolve host names into addresses. It can be used when suspecting that getaddrinfo() doesn't work as expected. diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index c9805a32e..4547d962c 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -58,14 +58,6 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) } global.mode |= MODE_MWORKER; } - else if (!strcmp(args[0], "debug")) { - if (alertif_too_many_args(0, file, linenum, args, &err_code)) - goto out; - global.mode |= MODE_DEBUG; - ha_warning("parsing [%s:%d] : '%s' must never be used and will be removed in 2.3. If you need debug mode, please use '-d' on the command line.\n", file, linenum, args[0]); - err_code |= ERR_WARN; - goto out; - } else if (!strcmp(args[0], "noepoll")) { if (alertif_too_many_args(0, file, linenum, args, &err_code)) goto out; diff --git a/tests/test-fsm.cfg b/tests/test-fsm.cfg index 8fcf2655b..4ea3efd03 100644 --- a/tests/test-fsm.cfg +++ b/tests/test-fsm.cfg @@ -256,7 +256,6 @@ global maxconn 100 log 127.0.0.1 local0 - debug # connect to port 8000 to consult statistics listen stats