Skip to content

Commit

Permalink
[chassis][pmon] Fix the traceback issue while chassis is rebooting (#558
Browse files Browse the repository at this point in the history
)

Signed-off-by: mlok <[email protected]>
  • Loading branch information
mlok-nokia authored Nov 13, 2024
1 parent 0cb3644 commit e772183
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sonic-chassisd/scripts/chassisd
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,14 @@ class ModuleUpdater(logger.Logger):
self.hostname_table.set(hostname_key, hostname_fvs)

# Asics that are on the "not online" modules need to be cleaned up
asics = list(self.asic_table.getKeys())
for asic in asics:
fvs = self.asic_table.get(asic)
if isinstance(fvs, list):
fvs = dict(fvs[-1])
if fvs[CHASSIS_MODULE_INFO_NAME_FIELD] in notOnlineModules:
self.asic_table._del(asic)
if notOnlineModules:
asics = list(self.asic_table.getKeys())
for asic in asics:
fvs = self.asic_table.get(asic)
if isinstance(fvs, list):
fvs = dict(fvs[-1])
if CHASSIS_MODULE_INFO_NAME_FIELD in fvs.keys() and fvs[CHASSIS_MODULE_INFO_NAME_FIELD] in notOnlineModules:
self.asic_table._del(asic)

def _get_module_info(self, module_index):
"""
Expand Down

0 comments on commit e772183

Please sign in to comment.