diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-04-28 13:16:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-28 13:16:47 +0100 |
| commit | e834a6d51090b2a9261f80464be05d4984cbcce0 (patch) | |
| tree | e140319f165a50f0c764255cf31f3817059b86d1 /src | |
| parent | 6bbd589ae563e4737845217710ff80c73a3b8fc4 (diff) | |
| parent | c2fa136a3589c30d98cffa49c9dd7682c81c2002 (diff) | |
| download | vyos-1x-e834a6d51090b2a9261f80464be05d4984cbcce0.tar.gz vyos-1x-e834a6d51090b2a9261f80464be05d4984cbcce0.zip | |
Merge pull request #5151 from natali-rs1985/T8293
T8293: Add ability to set timeout for high-availability health-check
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/high-availability.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index 48a7d8abc..175929547 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -188,6 +188,15 @@ def _validate_health_check(group, group_config): # to avoid generating useless config statements in keepalived.conf del group_config["health_check"] + if 'timeout' in group_config.get('health_check', {}): + interval = int(group_config['health_check']['interval']) + timeout = int(group_config['health_check']['timeout']) + if timeout < interval: + Warning( + f'Health check timeout ({timeout}s) is less than interval ({interval}s) ' + f'for VRRP group "{group}", script may be killed before completion' + ) + def generate(ha): if not ha or 'disable' in ha: |
