[bgp]: Fix bgp crash after BGP allow list configuration is added (#6088)

The issue was a typo introduced in #6006. In that change, the BGP allow list
configuration manager was updated to use a method of common ConfigMgr
for restarting peer groups. However, the method name 'restart_peers' was
used instead of the correct 'restart_peer_groups'.

This change updated the managers_allow_list.py to use correct method
'restart_peer_groups' for restarting peer groups.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
This commit is contained in:
Xin Wang 2020-12-03 01:15:06 +08:00 committed by GitHub
parent 443f81f9b7
commit e4ee07b79f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,7 +149,7 @@ class BGPAllowListMgr(Manager):
if cmds: if cmds:
self.cfg_mgr.push_list(cmds) self.cfg_mgr.push_list(cmds)
peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) peer_groups = self.__find_peer_group_by_deployment_id(deployment_id)
self.cfg_mgr.restart_peers(peer_groups) self.cfg_mgr.restart_peer_groups(peer_groups)
log_debug("BGPAllowListMgr::__update_policy. The peers configuration scheduled for updates") log_debug("BGPAllowListMgr::__update_policy. The peers configuration scheduled for updates")
else: else:
log_debug("BGPAllowListMgr::__update_policy. Nothing to update") log_debug("BGPAllowListMgr::__update_policy. Nothing to update")
@ -179,7 +179,7 @@ class BGPAllowListMgr(Manager):
if cmds: if cmds:
self.cfg_mgr.push_list(cmds) self.cfg_mgr.push_list(cmds)
peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) peer_groups = self.__find_peer_group_by_deployment_id(deployment_id)
self.cfg_mgr.restart_peers(peer_groups) self.cfg_mgr.restart_peer_groups(peer_groups)
log_debug("BGPAllowListMgr::__remove_policy. 'Allow list' policy was scheduled for removal") log_debug("BGPAllowListMgr::__remove_policy. 'Allow list' policy was scheduled for removal")
else: else:
log_debug("BGPAllowListMgr::__remove_policy. Nothing to remove") log_debug("BGPAllowListMgr::__remove_policy. Nothing to remove")