diff --git a/scripts/caclmgrd b/scripts/caclmgrd index 02cc506a..1ddcfade 100755 --- a/scripts/caclmgrd +++ b/scripts/caclmgrd @@ -17,6 +17,7 @@ try: import sys import threading import time + import json from sonic_py_common.general import getstatusoutput_noshell_pipe from sonic_py_common import daemon_base, device_info, multi_asic from swsscommon import swsscommon @@ -1078,9 +1079,13 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): ctrl_plane_acl_notification.add(namespace) # Check ACL Rule notification and make sure Rule point to ACL Table which is Controlplane else: - acl_table = key.split(acl_rule_table_seprator)[0] - if self.config_db_map[namespace].get_table(self.ACL_TABLE)[acl_table]["type"] == self.ACL_TABLE_TYPE_CTRLPLANE: - ctrl_plane_acl_notification.add(namespace) + try: + acl_table = key.split(acl_rule_table_seprator)[0] + if self.config_db_map[namespace].get_table(self.ACL_TABLE)[acl_table]["type"] == self.ACL_TABLE_TYPE_CTRLPLANE: + ctrl_plane_acl_notification.add(namespace) + except KeyError: + self.log_error("ACL table '{}' not found in Config DB. ACL_TABLE={}".format(acl_table, json.dumps(self.config_db_map[namespace].get_table(self.ACL_TABLE), indent=4))) + continue # Update the Control Plane ACL of the namespace that got config db acl table event for namespace in ctrl_plane_acl_notification: