It was deprecated with HAProxy 1.5. Time to remove it.
---
doc/configuration.txt | 26 --------------------------
include/types/global.h | 2 +-
src/cfgparse-listen.c | 14 +++-----------
3 files changed, 4 insertions(+), 38 deletions(-)
diff --git a/doc/configuration.txt b/doc/configuration.txt
index e520c1548..edfcd02d5 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -2391,8 +2391,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 - X X X
reqallow - X X X
reqdel - X X X
@@ -7680,30 +7678,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>]
Add a header at the end of the HTTP request
May be used in sections : defaults | frontend | listen | backend
diff --git a/include/types/global.h b/include/types/global.h
index ab1c3036e..d34dae9ff 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -247,7 +247,7 @@ __decl_hathreads(extern pthread_t *threads);
/* 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
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index 0a3aa9281..b29484478 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -2779,18 +2779,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))
--
2.21.0