Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: fix reload script for bgp graceful-shutdown
Global BGP configuration knob like 'bgp graceful-shutdown' is not rendered properly via frr-reload script. when the config line is rendered if happened to be post router bgp config lines, frr end up rendering bgp gr-shut under bgp instance config though global config knob is set. Two fixes: 1) Move bgp global config line at the beginning of pending config lines to add. 2) Skip adding bgp global config line in second pass of frr-reload script run. The second fix is required to avoid following scenario: 2022-08-30 20:40:53,397 DEBUG: Running Frr Config (Pass #0) ['bgp graceful-shutdown\n', 'router bgp 65564\n timers bgp 3 9\n', 'router bgp 65564\n bgp deterministic-med\n', 2022-08-30 20:40:54,042 DEBUG: Running Frr Config (Pass #1) 'vrf mgmt\n', 'router bgp 65564 vrf sym_1\n address-family l2vpn evpn\n', 'bgp graceful-shutdown\n', <<<<<<< reapp %Failed: per-vrf graceful-shutdown config not permitted with global graceful-shutdown line 97: Failure to communicate[13] to bgpd, line: bgp graceful-shutdown [8816|bgpd] Configuration file[/etc/frr/frr.conf] processing failure: 13 Ticket: #3187405 Testing Done: Add and remove 'bgp graceful-shutdown' config in frr.conf and perform frr-reload. Signed-off-by: Chirag Shah <chirag@nvidia.com>
- Loading branch information