BUG/MINOR: force-persist and ignore-persist only apply to backends

>From the very first day of force-persist and ignore-persist features,
they only applied to backends, except that the documentation stated it
could also be applied to frontends.

In order to make it clear, the documentation is updated and the parser
will raise a warning if the keywords are used in a frontend section.

This patch should be backported up to the 1.5 branch.
This commit is contained in:
Cyril Bont 2018-03-12 22:02:59 +01:00 committed by Willy Tarreau
parent d400ab3a36
commit 4288c5a9d8
2 changed files with 5 additions and 5 deletions

View File

@ -2039,7 +2039,7 @@ errorloc X X X X
errorloc302 X X X X
-- keyword -------------------------- defaults - frontend - listen -- backend -
errorloc303 X X X X
force-persist - X X X
force-persist - - X X
filter - X X X
fullconn X - X X
grace X X X X
@ -2052,7 +2052,7 @@ http-response - X X X
http-reuse X - X X
http-send-name-header - - X X
id - X X X
ignore-persist - X X X
ignore-persist - - X X
load-server-state-from-file X - X X
log (*) X X X X
log-format X X X -
@ -3503,7 +3503,7 @@ email-alert to <emailaddr>
force-persist { if | unless } <condition>
Declare a condition to force persistence on down servers
May be used in sections: defaults | frontend | listen | backend
no | yes | yes | yes
no | no | yes | yes
By default, requests are not dispatched to down servers. It is possible to
force this using "option persist", but it is unconditional and redispatches
@ -4825,7 +4825,7 @@ id <value>
ignore-persist { if | unless } <condition>
Declare a condition to ignore persistence
May be used in sections: defaults | frontend | listen | backend
no | yes | yes | yes
no | no | yes | yes
By default, when cookie persistence is enabled, every requests containing
the cookie are unconditionally persistent (assuming the target server is up

View File

@ -4068,7 +4068,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
goto out;
}
if (warnifnotcap(curproxy, PR_CAP_FE|PR_CAP_BE, file, linenum, args[0], NULL))
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
err_code |= ERR_WARN;
if (strcmp(args[1], "if") != 0 && strcmp(args[1], "unless") != 0) {