From e8705fd4df4a588418ef0adb6a9fc9faac36f070 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Thu, 3 Dec 2020 01:15:06 +0800 Subject: [PATCH] [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 --- src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py index 2ca89630786a..b58d8bb885c9 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py @@ -149,7 +149,7 @@ def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_ if cmds: self.cfg_mgr.push_list(cmds) 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") else: log_debug("BGPAllowListMgr::__update_policy. Nothing to update") @@ -179,7 +179,7 @@ def __remove_policy(self, deployment_id, community_value): if cmds: self.cfg_mgr.push_list(cmds) 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") else: log_debug("BGPAllowListMgr::__remove_policy. Nothing to remove")