summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-12 21:25:42 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:24:50 +0100
commit7d99257902c2d638dbf9a8a095660d6aa0d92e38 (patch)
treedef8b5ed6e15c64bcbe92062e60d0d751bc2bdd9 /src/conf_mode/vrf.py
parent176f974d1c50aae44ec985467aa37f01ca6e0169 (diff)
downloadvyos-1x-7d99257902c2d638dbf9a8a095660d6aa0d92e38.tar.gz
vyos-1x-7d99257902c2d638dbf9a8a095660d6aa0d92e38.zip
frr: T6746: do not use FRRender apply() method when vyos-configd is running
Diffstat (limited to 'src/conf_mode/vrf.py')
-rwxr-xr-xsrc/conf_mode/vrf.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 1b19c55d2..6533f493f 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -32,6 +32,7 @@ from vyos.utils.network import get_vrf_members
from vyos.utils.network import interface_exists
from vyos.utils.process import call
from vyos.utils.process import cmd
+from vyos.utils.process import is_systemd_service_running
from vyos.utils.process import popen
from vyos.utils.system import sysctl_write
from vyos import ConfigError
@@ -198,7 +199,7 @@ def generate(vrf):
# Render iproute2 VR helper names
render(config_file, 'iproute2/vrf.conf.j2', vrf)
- if 'frr_dict' in vrf and 'frrender_cls' not in vrf['frr_dict']:
+ if 'frr_dict' in vrf and not is_systemd_service_running('vyos-configd.service'):
FRRender().generate(vrf['frr_dict'])
return None
@@ -341,7 +342,7 @@ def apply(vrf):
if has_rule(afi, 2000, 'l3mdev'):
call(f'ip {afi} rule del pref 2000 l3mdev unreachable')
- if 'frr_dict' in vrf and 'frrender_cls' not in vrf['frr_dict']:
+ if 'frr_dict' in vrf and not is_systemd_service_running('vyos-configd.service'):
FRRender().apply()
return None