From e0f8aa71d6a8d0fa73c47c482f96716c8052378a Mon Sep 17 00:00:00 2001 From: Kelly Chen Date: Tue, 19 May 2020 17:52:48 +0800 Subject: [PATCH] [lldpmgrd] only log error in is_port_up() after port init done (#4606) lldpmgrd listens for changes to the PORT table in the CONFIG_DB and APP_DB in order to handle alias/description config change. It checks if port is up or down by looking into the oper-status for in APP_DB PORT TABLE. If it cannot find it in the App DB, it will log error. During initializing, it is possible that there is a port change in CONFIG_DB and but the not ready in APP_DB. The change here is to only log error in is_port_up() after port init done. --- dockers/docker-lldp-sv2/lldpmgrd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dockers/docker-lldp-sv2/lldpmgrd b/dockers/docker-lldp-sv2/lldpmgrd index 7e9ef1642a..a0dff5d402 100755 --- a/dockers/docker-lldp-sv2/lldpmgrd +++ b/dockers/docker-lldp-sv2/lldpmgrd @@ -119,7 +119,11 @@ class LldpManager(object): else: return False else: - log_error("Port '{}' not found in {} table in App DB".format(port_name, swsscommon.APP_PORT_TABLE_NAME)) + # Retrieve PortInitDone entry from the Port table + (init_status, init_fvp) = port_table.get("PortInitDone") + #The initialization procedure is done, but don't have this port entry + if init_status: + log_error("Port '{}' not found in {} table in App DB".format(port_name, swsscommon.APP_PORT_TABLE_NAME)) return False def generate_pending_lldp_config_cmd_for_port(self, port_name):