Skip to content

Commit

Permalink
Remove the argument that is causing the xcvrd to crash (sonic-net#318)
Browse files Browse the repository at this point in the history
- Description
Fixed SfpStateUpdateTask to not crash during port_cfg dynamic add/del event

- Motivation and Context
During port breakout, the subprocess invoked by parent xcvrd is crashing indicated in the log

- How Has This Been Tested?
Apply breakout and check if the subprocess is not crashing

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
  • Loading branch information
vivekrnv authored Dec 1, 2022
1 parent e474335 commit 0573416
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sonic-xcvrd/xcvrd/xcvrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
try:
import ast
import copy
import functools
import json
import multiprocessing
import os
Expand Down Expand Up @@ -1794,9 +1793,8 @@ def task_worker(self, stopping_event, sfp_error_event):
timeout = RETRY_PERIOD_FOR_SYSTEM_READY_MSECS
state = STATE_INIT
sel, asic_context = port_mapping.subscribe_port_config_change(self.namespaces)
port_change_event_handler = functools.partial(self.on_port_config_change, stopping_event)
while not stopping_event.is_set():
port_mapping.handle_port_config_change(sel, asic_context, stopping_event, self.port_mapping, helper_logger, port_change_event_handler)
port_mapping.handle_port_config_change(sel, asic_context, stopping_event, self.port_mapping, helper_logger, self.on_port_config_change)

# Retry those logical ports whose EEPROM reading failed or timeout when the SFP is inserted
self.retry_eeprom_reading()
Expand Down

0 comments on commit 0573416

Please sign in to comment.