]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: Make 'redispatch' directive fatal
authorTim Duesterhus <tim@bastelstu.be>
Tue, 14 May 2019 18:57:58 +0000 (20:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Jun 2019 11:35:54 +0000 (13:35 +0200)
It was deprecated with HAProxy 1.5. Time to remove it.

doc/configuration.txt
include/types/global.h
src/cfgparse-listen.c

index 62f02af51b651031aebabc34bc49d9f4d289e34b..db51c07d1e2e9a5e3138fe1615303c7703d30b90 100644 (file)
@@ -2449,8 +2449,6 @@ external-check path                       X          -         X         X
 persist rdp-cookie                        X          -         X         X
 rate-limit sessions                       X          X         X         -
 redirect                                  -          X         X         X
-redisp                      (deprecated)  X          -         X         X
-redispatch                  (deprecated)  X          -         X         X
 reqadd                      (deprecated)  -          X         X         X
 reqallow                    (deprecated)  -          X         X         X
 reqdel                      (deprecated)  -          X         X         X
@@ -7760,30 +7758,6 @@ redirect scheme   <sch> [code <code>] <option> [{if | unless} <condition>]
   See section 7 about ACL usage.
 
 
-redisp (deprecated)
-redispatch (deprecated)
-  Enable or disable session redistribution in case of connection failure
-  May be used in sections:    defaults | frontend | listen | backend
-                                 yes   |    no    |   yes  |   yes
-  Arguments : none
-
-  In HTTP mode, if a server designated by a cookie is down, clients may
-  definitely stick to it because they cannot flush the cookie, so they will not
-  be able to access the service anymore.
-
-  Specifying "redispatch" will allow the proxy to break their persistence and
-  redistribute them to a working server.
-
-  It also allows to retry last connection to another server in case of multiple
-  connection failures. Of course, it requires having "retries" set to a nonzero
-  value.
-
-  This form is deprecated, do not use it in any new configuration, use the new
-  "option redispatch" instead.
-
-  See also : "option redispatch"
-
-
 reqadd  <string> [{if | unless} <cond>] (deprecated)
   Add a header at the end of the HTTP request
   May be used in sections :   defaults | frontend | listen | backend
index fb0c5e123e249f5a7b7b1c2f578ede201453f049..ce8a93d3eaadfd7083a5c075cb52a9c7bc407947 100644 (file)
@@ -251,7 +251,7 @@ extern int atexit_flag;
 /* bit values to go with "warned" above */
 /* unassigned : 0x00000001 (previously: WARN_BLOCK_DEPRECATED) */
 /* unassigned : 0x00000002 */
-#define WARN_REDISPATCH_DEPRECATED  0x00000004
+/* unassigned : 0x00000004 (previously: WARN_REDISPATCH_DEPRECATED) */
 #define WARN_CLITO_DEPRECATED       0x00000008
 #define WARN_SRVTO_DEPRECATED       0x00000010
 #define WARN_CONTO_DEPRECATED       0x00000020
index 5fd8ecf5a7b759366f113b1ce88dfb5750395195..9c98a2371d38c5cd541ed2f95e38644b3631dd25 100644 (file)
@@ -2822,18 +2822,10 @@ stats_error_parsing:
                        goto out;
        }
        else if (!strcmp(args[0], "redispatch") || !strcmp(args[0], "redisp")) {
-               if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
-                       err_code |= ERR_WARN;
-
-               if (!already_warned(WARN_REDISPATCH_DEPRECATED))
-                       ha_warning("parsing [%s:%d]: keyword '%s' is deprecated in favor of 'option redispatch', and will not be supported by future versions.\n",
-                                  file, linenum, args[0]);
-               err_code |= ERR_WARN;
-               /* enable reconnections to dispatch */
-               curproxy->options |= PR_O_REDISP;
+               ha_alert("parsing [%s:%d] : keyword '%s' directive is not supported anymore since HAProxy 2.1. Use 'option redispatch'.\n", file, linenum, args[0]);
 
-               if (alertif_too_many_args_idx(1, 0, file, linenum, args, &err_code))
-                       goto out;
+               err_code |= ERR_ALERT | ERR_FATAL;
+               goto out;
        }
        else if (!strcmp(args[0], "http-reuse")) {
                if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))