]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: force-persist and ignore-persist only apply to backends
authorCyril Bonté <cyril.bonte@free.fr>
Mon, 12 Mar 2018 21:02:59 +0000 (22:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 12 Mar 2018 21:52:24 +0000 (22:52 +0100)
>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.

doc/configuration.txt
src/cfgparse.c

index a914c416cb93fea62e63dbc4adc9d42f0cb26bc4..992e18acc7915c5f71622e21079ed1a09903fb44 100644 (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
index 27d7eee7b4656e3ce3e4ca37e79609ba309f7abd..c40e71dc790d6e952c0b1fe85f8cfebb42724a52 100644 (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) {