diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-04-27 16:10:26 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-04-27 18:18:47 +0300 |
| commit | c2fa136a3589c30d98cffa49c9dd7682c81c2002 (patch) | |
| tree | da9dc3917afda283da2b8eabfc6e3ea2139b9087 /smoketest/scripts/cli | |
| parent | 0cc2bbfc54370cce2d2c7540fb155e464207f1be (diff) | |
| download | vyos-1x-c2fa136a3589c30d98cffa49c9dd7682c81c2002.tar.gz vyos-1x-c2fa136a3589c30d98cffa49c9dd7682c81c2002.zip | |
T8293: Add ability to set timeout for high-availability health-check
Setting a timeout allows VRRP health-check scripts to run longer than the set interval.
Without timeout, keepalived considers the script as failed after interval seconds.
With timeout set higher than interval, the script has more time to complete
before being marked as failed and transitioning VRRP to FAULT state.
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_high-availability_vrrp.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_high-availability_vrrp.py b/smoketest/scripts/cli/test_high-availability_vrrp.py index f1f1c7df2..93ef9a09b 100755 --- a/smoketest/scripts/cli/test_high-availability_vrrp.py +++ b/smoketest/scripts/cli/test_high-availability_vrrp.py @@ -279,6 +279,7 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): def test_check_health_script(self): sync_group = 'VyOS' + timeout = '100' for group in groups: vlan_id = group.lstrip('VLAN') @@ -329,6 +330,16 @@ class TestVRRP(VyOSUnitTestSHIM.TestCase): config = getConfig(f'vrrp_sync_group {sync_group}') self.assertIn(f'track_script', config) + self.cli_set( + base_path + + ['vrrp', 'sync-group', sync_group, 'health-check', 'timeout', timeout] + ) + # commit changes + self.cli_commit() + + config = getConfig(f'vrrp_script healthcheck_sg_{sync_group}') + self.assertIn(f'timeout {timeout}', config) + if __name__ == '__main__': unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on()) |
