]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: config: remove the deprecated and dangerous global "debug" directive
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:15:03 +0000 (19:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:18:45 +0000 (19:18 +0200)
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
doc/management.txt
src/cfgparse-global.c
tests/test-fsm.cfg

index ce7000470fec391c61b4442401899fbdec52e615..3e01dbf1ae440e72161d1bc6a8ba0ed4143dd9e8 100644 (file)
@@ -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 <number>
 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".
index 9fd7e6c034ea909962937e6b389c77abdf4f7f69..a5fecffeb2057228bb246da707f02b45b20be15b 100644 (file)
@@ -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.
index c9805a32ed6ce8185a63636450bd11d7063b8107..4547d962c0c59fc95716a4b90a41885cb47d7ab3 100644 (file)
@@ -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;
index 8fcf2655bda1f3a6a1783b4022f0406a740bc870..4ea3efd034ee4b44a4118ab8a115a037d41f9238 100644 (file)
 global
        maxconn 100
        log             127.0.0.1 local0
-       debug
 
 # connect to port 8000 to consult statistics
 listen stats