diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-21 12:51:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-21 12:51:35 +0200 |
commit | 6331040d560641921f44517298271e301ce52646 (patch) | |
tree | 4ffb08c661920b0a33f0f6c0cf8a6dea2b4a5602 /src/conf_mode/load-balancing_reverse-proxy.py | |
parent | 4cde677e9e128bc9b62fad720b1b6f6cac506954 (diff) | |
parent | 050f24770aec7a74c1a07ba64cf2cb83afb72f1a (diff) | |
download | vyos-1x-6331040d560641921f44517298271e301ce52646.tar.gz vyos-1x-6331040d560641921f44517298271e301ce52646.zip |
Merge pull request #3338 from nvollmar/haproxy-http-check
T6246: improve haproxy http check configuration
Diffstat (limited to 'src/conf_mode/load-balancing_reverse-proxy.py')
-rwxr-xr-x | src/conf_mode/load-balancing_reverse-proxy.py | 4 |
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(): |