From d16a88c2717e87f9184587281547e45506df4215 Mon Sep 17 00:00:00 2001 From: Alex Kudentsov <43482574+alexk37@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:53:40 +0700 Subject: frrender: T9377: do not save the FRR configuration a second time apply() runs frr-reload.py --reload without --daemon, and in that mode frr-reload.py saves the configuration itself (vtysh "write" to /etc/frr/frr.conf, bind-mounted from /run/frr/config/frr.conf). The following vtysh -n --writeconfig, added by T3217 when VyOS still reloaded one daemon at a time with --daemon, writes the same file again and asks every daemon for its configuration once more. That second round trip comes several seconds after the change was applied. On a large FRR configuration it reaches bgpd after the route-map update timer (5 s) has started a policy walk, and the commit then waits until the walk ends: on a 20,000-line FRR configuration with 100 update groups and 500,000 routes a policy commit took 497.9/501.0 s against 381.1/381.6 s without this second save. --- python/vyos/frrender.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 1ea49abe4..69bb93a96 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -34,7 +34,6 @@ from vyos.defaults import frr_debug_enable from vyos.utils.dict import dict_search from vyos.utils.dict import dict_set_nested from vyos.utils.file import write_file -from vyos.utils.process import cmdl from vyos.utils.process import rc_cmd from vyos.template import get_dhcp_router from vyos.template import render_to_string @@ -928,5 +927,10 @@ class FRRender: if count >= count_max: raise ConfigError(emsg) - # T3217: Save FRR configuration to /run/frr/config/frr.conf - return cmdl(['/usr/bin/vtysh', '-n', '--writeconfig']) + # frr-reload.py --reload has already saved the configuration to + # /etc/frr/frr.conf (bind-mounted from /run/frr/config/frr.conf): it + # does so whenever it is not run with --daemon. T3217 added a second + # save here when VyOS still reloaded one daemon at a time with + # --daemon. Repeating it asks every daemon for its configuration once + # more, and a bgpd busy with a policy walk then holds the commit until + # the walk ends. -- cgit v1.2.3