summaryrefslogtreecommitdiff
path: root/python/makevars.py
diff options
context:
space:
mode:
authorChirag Shah <chirag@nvidia.com>2021-12-04 13:27:29 -0800
committerChirag Shah <chirag@nvidia.com>2022-04-23 12:49:47 -0700
commitd2acc328bd776f31638d957444ea610eb7e4d132 (patch)
tree8e29c477aa042fb63fc774c2b24d47e4cf48b1cc /python/makevars.py
parentc27892b24d21762f3cd4276fa2cca75c958f9b15 (diff)
tools: fix bgp instances deletion in frr-reload
BGPd does not allow default instance deletion in presence of bgp vrf instance; frr-reload script fails if delete list contains default instance followed by vrf instance. Fix: frr-reload scans lines_to_delete to look for 'router bgp' and 'router bgp vrf ...' line. If both are present switch the order to delete bgp vrf instance(s) than default instance at the end. Testing Done: Before: INFO: Loading Config object from file /etc/frr/frr.conf INFO: Loading Config object from vtysh show running INFO: Failed to execute no router bgp 40201 <-- Failed to delete INFO: Failed to execute no router bgp INFO: Failed to execute no router ERROR: "no router" we failed to remove this command ERROR: % Cannot delete default BGP instance. Dependent VRF instances exist INFO: Executed "no router bgp 40201 vrf bgp-test" <-- vrf instance deleted INFO: Loading Config object from vtysh show running After: order of deletion switched INFO: Loading Config object from file /etc/frr/frr.conf INFO: Loading Config object from vtysh show running INFO: Executed "no router bgp 40201 vrf bgp-test" INFO: Executed "no router bgp 40201" INFO: Loading Config object from vtysh show running Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'python/makevars.py')
0 files changed, 0 insertions, 0 deletions