diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-05-08 11:39:16 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-05-08 11:39:16 +0000 |
commit | e201454f073c9a92fb56b65f497eae55fc634521 (patch) | |
tree | afc3630bdbad6b60d27da73dafb66d501d52f620 /src | |
parent | 43b4d30ed0298565ce7cf891fbd72c5a7484dac6 (diff) | |
download | vyos-1x-e201454f073c9a92fb56b65f497eae55fc634521.tar.gz vyos-1x-e201454f073c9a92fb56b65f497eae55fc634521.zip |
T5060: Add disable option for high-availability
Add 'maintenance mode' (option disable) for high-availability
set high-availability disable
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/high-availability.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index 79e407efd..5e76dd9f9 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -86,7 +86,7 @@ def get_config(config=None): return ha def verify(ha): - if not ha: + if not ha or 'disable' in ha: return None used_vrid_if = [] @@ -175,7 +175,7 @@ def verify(ha): def generate(ha): - if not ha: + if not ha or 'disable' in ha: return None render(VRRP.location['config'], 'high-availability/keepalived.conf.j2', ha) @@ -183,7 +183,7 @@ def generate(ha): def apply(ha): service_name = 'keepalived.service' - if not ha: + if not ha or 'disable' in ha: call(f'systemctl stop {service_name}') return None |