Skip to content

Commit

Permalink
Fix a bug in removing asics on not-online cards (sonic-net#203)
Browse files Browse the repository at this point in the history
Fix a bug coming from PR sonic-net#175 when asic is removed due to card getting offline (before it was online).
  • Loading branch information
ngoc-do authored Sep 14, 2021
1 parent ef0e791 commit dfe737a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sonic-chassisd/scripts/chassisd
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ class ModuleUpdater(logger.Logger):
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)

Expand Down

0 comments on commit dfe737a

Please sign in to comment.