BUG/MINOR: checks: Fix PostgreSQL regex on the authentication packet

For PostgreSQL health check, there is a regex on the backend authentication
packet. It must match to succeed. But it exists 6 types of authentication
packets and the regex only matches the first one (AuthenticationOK). This patch
fixes the regex to match all authentication packets.

No backport needed.
This commit is contained in:
Christopher Faulet 2020-04-27 18:29:49 +02:00
parent b693a0de37
commit b841c74aad
1 changed files with 1 additions and 1 deletions

View File

@ -6224,7 +6224,7 @@ int proxy_parse_pgsql_check_opt(char **args, int cur_arg, struct proxy *curpx, s
chk->index = 2;
LIST_ADDQ(&rs->rules, &chk->list);
chk = parse_tcpcheck_expect((char *[]){"tcp-check", "expect", "rbinary", "^520000000800000000",
chk = parse_tcpcheck_expect((char *[]){"tcp-check", "expect", "rbinary", "^52000000(08|0A|0C)000000(00|02|03|04|05|06)",
"min-recv", "9",
"error-status", "L7STS",
"on-success", "PostgreSQL server is ok",