Skip to content

Commit

Permalink
[xcvrd] Remove log errors in single ASIC platforms with init Global c…
Browse files Browse the repository at this point in the history
…onfig (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.
  • Loading branch information
judyjoseph committed Nov 2, 2020
1 parent 95b1696 commit af79326
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions sonic-xcvrd/scripts/xcvrd
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,6 @@ class DomInfoUpdateTask(object):
self.task_thread = None
self.task_stopping_event = threading.Event()

# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()

def task_worker(self):
helper_logger.log_info("Start DOM monitoring loop")

Expand Down Expand Up @@ -840,9 +837,6 @@ class SfpStateUpdateTask(object):
self.task_process = None
self.task_stopping_event = multiprocessing.Event()

# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()

def _mapping_event_from_change_event(self, status, port_dict):
"""
mapping from what get_transceiver_change_event returns to event defined in the state machine
Expand Down Expand Up @@ -1195,8 +1189,9 @@ class DaemonXcvrd(daemon_base.DaemonBase):
self.log_error("Failed to load sfputil: %s" % (str(e)), True)
sys.exit(SFPUTIL_LOAD_ERROR)

# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()
if multi_asic.is_multi_asic():
# Load the namespace details first from the database_global.json file.
swsscommon.SonicDBConfig.initializeGlobalConfig()

# Load port info
try:
Expand Down

0 comments on commit af79326

Please sign in to comment.