summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-21 12:54:13 +0200
committerGitHub <noreply@github.com>2024-04-21 12:54:13 +0200
commit2208c846d6bffeecac99afa7ebc3eda5c467aebc (patch)
tree984e88cdf2604bb418608fd8b2970c4f3739c710 /src
parent8062edbefb311257c5f0dd5e6810334e4d120eb9 (diff)
parent98a0fdbef343c20c5054abea478a81e5b86c254f (diff)
downloadvyos-1x-2208c846d6bffeecac99afa7ebc3eda5c467aebc.tar.gz
vyos-1x-2208c846d6bffeecac99afa7ebc3eda5c467aebc.zip
Merge pull request #3332 from vyos/mergify/bp/sagitta/pr-3325
T6246: basic haproxy http-check configuration (backport #3325)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/load-balancing_reverse-proxy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/load-balancing_reverse-proxy.py b/src/conf_mode/load-balancing_reverse-proxy.py
index 9f895c4e2..1569d8d71 100755
--- a/src/conf_mode/load-balancing_reverse-proxy.py
+++ b/src/conf_mode/load-balancing_reverse-proxy.py
@@ -75,6 +75,10 @@ def verify(lb):
raise ConfigError(f'"TCP" port "{tmp_port}" is used by another service')
for back, back_config in lb['backend'].items():
+ if 'http-check' in back_config:
+ http_check = back_config['http-check']
+ if 'expect' in http_check and 'status' in http_check['expect'] and 'string' in http_check['expect']:
+ raise ConfigError(f'"expect status" and "expect string" can not be configured together!')
if 'server' not in back_config:
raise ConfigError(f'"{back} server" must be configured!')
for bk_server, bk_server_conf in back_config['server'].items():