summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-12 17:48:15 +0200
committerChristian Poessinger <christian@poessinger.com>2022-05-12 17:50:19 +0200
commit8d120b9af4966d1d8cd49e4900b3de6149700b4e (patch)
tree7b4145d7e0487db4345f2f597ea2be55b2cd01fb /src/conf_mode
parent373227e717fac82af5ea8d71e611a3df1c59054e (diff)
downloadvyos-1x-8d120b9af4966d1d8cd49e4900b3de6149700b4e.tar.gz
vyos-1x-8d120b9af4966d1d8cd49e4900b3de6149700b4e.zip
vrrp: T3944: use "reload-or-restart" over individual code paths
systemd has its internal reload or restart logic - we do not need to programm it on our own.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/high-availability.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py
index f939f9469..e14050dd3 100755
--- a/src/conf_mode/high-availability.py
+++ b/src/conf_mode/high-availability.py
@@ -28,7 +28,6 @@ from vyos.template import render
from vyos.template import is_ipv4
from vyos.template import is_ipv6
from vyos.util import call
-from vyos.util import is_systemd_service_running
from vyos.xml import defaults
from vyos import ConfigError
from vyos import airbag
@@ -161,12 +160,7 @@ def apply(ha):
call(f'systemctl stop {service_name}')
return None
- # XXX: T3944 - reload keepalived configuration if service is already running
- # to not cause any service disruption when applying changes.
- if is_systemd_service_running(service_name):
- call(f'systemctl reload {service_name}')
- else:
- call(f'systemctl restart {service_name}')
+ call(f'systemctl reload-or-restart {service_name}')
return None
if __name__ == '__main__':