Skip to content

Commit af79326

Browse files
authored
[xcvrd] Remove log errors in single ASIC platforms with init Global config (sonic-net#108)
Add check to make sure that the initializeGlobalConfig is invoked only in multi-asic platforms. Additionaly remove the initializeGlobalConfig() call in the DomUpdate thread and SFPUpdate process. This is because initializeGlobalConfig() is already invoked and initialized in the parent Xcvrd daemon which is available to the child thread/process.
1 parent 95b1696 commit af79326

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

sonic-xcvrd/scripts/xcvrd

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,6 @@ class DomInfoUpdateTask(object):
790790
self.task_thread = None
791791
self.task_stopping_event = threading.Event()
792792

793-
# Load the namespace details first from the database_global.json file.
794-
swsscommon.SonicDBConfig.initializeGlobalConfig()
795-
796793
def task_worker(self):
797794
helper_logger.log_info("Start DOM monitoring loop")
798795

@@ -840,9 +837,6 @@ class SfpStateUpdateTask(object):
840837
self.task_process = None
841838
self.task_stopping_event = multiprocessing.Event()
842839

843-
# Load the namespace details first from the database_global.json file.
844-
swsscommon.SonicDBConfig.initializeGlobalConfig()
845-
846840
def _mapping_event_from_change_event(self, status, port_dict):
847841
"""
848842
mapping from what get_transceiver_change_event returns to event defined in the state machine
@@ -1195,8 +1189,9 @@ class DaemonXcvrd(daemon_base.DaemonBase):
11951189
self.log_error("Failed to load sfputil: %s" % (str(e)), True)
11961190
sys.exit(SFPUTIL_LOAD_ERROR)
11971191

1198-
# Load the namespace details first from the database_global.json file.
1199-
swsscommon.SonicDBConfig.initializeGlobalConfig()
1192+
if multi_asic.is_multi_asic():
1193+
# Load the namespace details first from the database_global.json file.
1194+
swsscommon.SonicDBConfig.initializeGlobalConfig()
12001195

12011196
# Load port info
12021197
try:

0 commit comments

Comments
 (0)