]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: streams: Introduce a new retry-on keyword, all-retryable-errors.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 10 May 2019 16:05:40 +0000 (18:05 +0200)
committerOlivier Houchard <cognet@ci0.org>
Fri, 10 May 2019 16:05:35 +0000 (18:05 +0200)
Add a new retry-on keyword, "all-retryable-errors", that activates retry
for all errors that are considered retryable.
This currently activates retry for "conn-failure", "empty-response",
"junk-respones", "response-timeout", "0rtt-rejected", "500", "502", "503" and
"504".

doc/configuration.txt
src/proxy.c

index f88dad876e24a8ed879a034970b73eaf2982f70d..754ea8bec37d6e3411ba1fbf58fce60d422c5482 100644 (file)
@@ -8062,6 +8062,12 @@ retry-on [list of keywords]
                         Error), "501" (Not Implemented), "502" (Bad Gateway),
                         "503" (Service Unavailable), "504" (Gateway Timeout).
 
+      all-retryable-errors
+                        retry request for any error that are considered
+                       retryable. This currently activates "conn-failure",
+                       "empty-response", "junk-response", "response-timeout",
+                       "0rtt-rejected", "500", "502", "503", and "504".
+
   Using this directive replaces any previous settings with the new ones; it is
   not cumulative.
 
index 3c599d68378abaaa7ce0c45815a05ccfcd16a16f..7b8e29450a16fe2a4aafdf68708def0723573f10 100644 (file)
@@ -545,6 +545,11 @@ proxy_parse_retry_on(char **args, int section, struct proxy *curpx,
                        curpx->retry_type |= PR_RE_EARLY_ERROR;
                else if (!strcmp(args[i], "junk-response"))
                        curpx->retry_type |= PR_RE_JUNK_REQUEST;
+               else if (!(strcmp(args[i], "all-retryable-errors")))
+                       curpx->retry_type |= PR_RE_CONN_FAILED | PR_RE_DISCONNECTED |
+                                            PR_RE_TIMEOUT | PR_RE_500 | PR_RE_502 |
+                                            PR_RE_503 | PR_RE_504 | PR_RE_EARLY_ERROR |
+                                            PR_RE_JUNK_REQUEST;
                else if (!strcmp(args[i], "none")) {
                        if (i != 1 || *args[i + 1]) {
                                memprintf(err, "'%s' 'none' keyworld only usable alone", args[0]);