If there is static route under VRF, FRR is restarted with each commit whatever is changed (e.g. system host-name change).
How to reproduce:
First check that change of host-name doesn't restart FRR without vrf:
configure set system host-name no-vrf1 commit set system host-name no-vrf2 commit
Now add VRF and static route:
configure set system host-name with-vrf1 set interfaces ethernet eth0 vrf 'red' set vrf name red table '1010' set vrf name red protocols static route 10.20.30.40/32 interface eth0 commit
After this any changes lead to FRR restart:
configure set system host-name with-vrf2 commit set system host-name with-vrf3 commit
With each commit FRR is restarted:
vyos@vyos# journalctl -b -g 'configuration write' Oct 14 10:06:55 vyos watchfrr[1205]: [WFP93-1D146] configuration write completed with exit code 0 Oct 14 10:08:02 with-vrf1 watchfrr[1205]: [WFP93-1D146] configuration write completed with exit code 0 Oct 14 10:08:11 with-vrf2 watchfrr[1205]: [WFP93-1D146] configuration write completed with exit code 0 Oct 14 10:08:18 with-vrf3 watchfrr[1205]: [WFP93-1D146] configuration write completed with exit code 0
Currently FRRender has the following code in python/vyos/frrender.py:
if 'vrf' in config_dict and 'name' in config_dict['vrf']:
output += render_to_string('frr/zebra.vrf.route-map.frr.j2', config_dict['vrf'])
for vrf, vrf_config in config_dict['vrf']['name'].items():
if 'protocols' not in vrf_config:
continue
for protocol in vrf_config['protocols']:
vrf_config['protocols'][protocol]['vrf'] = vrf
output += inline_helper(vrf_config['protocols'])This adds vrf field to each protocol in cached configuration, next time the check
if self.cached_config_dict == config_dict:
debug('FRR: NO CHANGES DETECTED')
return FalseCompares clean configuration with cached configuration where vrf is added and it is not equal even if nothing has changed.