mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: tcpcheck: Add support of L7OKC on expect rules error-status argument
L7OKC may now be used as an error status for an HTTP/TCP expect rule. Thus it is for instance possible to write: option httpchk GET /isalive http-check expect status 200,404 http-check expect status 200 error-status L7OKC It is more or less the same than the disable-on-404 option except that if a DOWN is up again but still replying a 404 will be set to NOLB state. While it will stay in DOWN state with the disable-on-404 option.
This commit is contained in:
parent
1e527cbf53
commit
83662b5431
@ -5161,15 +5161,18 @@ http-check expect [min-recv <int>] [comment <msg>]
|
||||
the last rule in the tcp-check ruleset. "L7OK", "L7OKC",
|
||||
"L6OK" and "L4OK" are supported :
|
||||
- L7OK : check passed on layer 7
|
||||
- L7OKC : check conditionally passed on layer 7, for
|
||||
example 404 with disable-on-404
|
||||
- L7OKC : check conditionally passed on layer 7, set
|
||||
server to NOLB state.
|
||||
- L6OK : check passed on layer 6
|
||||
- L4OK : check passed on layer 4
|
||||
By default "L7OK" is used.
|
||||
|
||||
error-status <st> is optional and can be used to set the check status if
|
||||
an error occurred during the expect rule evaluation.
|
||||
"L7RSP", "L7STS", "L6RSP" and "L4CON" are supported :
|
||||
"L7OKC", "L7RSP", "L7STS", "L6RSP" and "L4CON" are
|
||||
supported :
|
||||
- L7OKC : check conditionally passed on layer 7, set
|
||||
server to NOLB state.
|
||||
- L7RSP : layer 7 invalid response - protocol error
|
||||
- L7STS : layer 7 response error, for example HTTP 5xx
|
||||
- L6RSP : layer 6 invalid response - protocol error
|
||||
@ -11044,15 +11047,18 @@ tcp-check expect [min-recv <int>] [comment <msg>]
|
||||
the last rule in the tcp-check ruleset. "L7OK", "L7OKC",
|
||||
"L6OK" and "L4OK" are supported :
|
||||
- L7OK : check passed on layer 7
|
||||
- L7OKC : check conditionally passed on layer 7, for
|
||||
example 404 with disable-on-404
|
||||
- L7OKC : check conditionally passed on layer 7, set
|
||||
server to NOLB state.
|
||||
- L6OK : check passed on layer 6
|
||||
- L4OK : check passed on layer 4
|
||||
By default "L7OK" is used.
|
||||
|
||||
error-status <st> is optional and can be used to set the check status if
|
||||
an error occurred during the expect rule evaluation.
|
||||
"L7RSP", "L7STS", "L6RSP" and "L4CON" are supported :
|
||||
"L7OKC", "L7RSP", "L7STS", "L6RSP" and "L4CON" are
|
||||
supported :
|
||||
- L7OKC : check conditionally passed on layer 7, set
|
||||
server to NOLB state.
|
||||
- L7RSP : layer 7 invalid response - protocol error
|
||||
- L7STS : layer 7 response error, for example HTTP 5xx
|
||||
- L6RSP : layer 6 invalid response - protocol error
|
||||
|
@ -3020,6 +3020,8 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
||||
err_st = HCHK_STATUS_L7RSP;
|
||||
else if (strcasecmp(args[cur_arg+1], "L7STS") == 0)
|
||||
err_st = HCHK_STATUS_L7STS;
|
||||
else if (strcasecmp(args[cur_arg+1], "L7OKC") == 0)
|
||||
err_st = HCHK_STATUS_L7OKCD;
|
||||
else if (strcasecmp(args[cur_arg+1], "L6RSP") == 0)
|
||||
err_st = HCHK_STATUS_L6RSP;
|
||||
else if (strcasecmp(args[cur_arg+1], "L4CON") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user