Skip to content

[action] [PR:19261] [Mellanox] Enhance is_module_host_management_mode to also check syncd's sai.profile (#19261)#19341

Merged
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/19261
Jun 18, 2024
Merged

[action] [PR:19261] [Mellanox] Enhance is_module_host_management_mode to also check syncd's sai.profile (#19261)#19341
mssonicbld merged 1 commit intosonic-net:202405from
mssonicbld:cherry/202405/19261

Conversation

@mssonicbld
Copy link
Collaborator

  • Why I did it
    Two steps (among others) are required to enable the host CMIS management feature: enabling it in the switch's sai.profile and performing a config reload. During the timeframe between these two steps, the control sysfs might be accessed, but they will not be present on the system until the latter step, the config reload, is completed. The code should try to access the control sysfs only after the config reload step. A good indication that this has been done is to check if the relevant entry is included in syncd's sai.profile. In contrast to the switch's sai.profile, syncd's sai.profile is only updated with the Host CMIS management support flag after the reload is complete.

  • How I did it
    I updated the is_module_host_management_mode() implementation to first look for the Host CMIS management support flag in syncd's sai.profile, and only if it does not exist for some reason, look for it in the switch's sai.profile.

  • How to verify it
    Add the Host CMIS management support flag to the switch's sai.profile and verify that the following log does not appear:
    ERR pmon#xcvrd: Exception occured at DomInfoUpdateTask thread due to Exception('control sysfs for SFP 20 does not exist')

…'s sai.profile (sonic-net#19261)

- Why I did it
Two steps (among others) are required to enable the host CMIS management feature: enabling it in the switch's sai.profile and performing a config reload. During the timeframe between these two steps, the control sysfs might be accessed, but they will not be present on the system until the latter step, the config reload, is completed. The code should try to access the control sysfs only after the config reload step. A good indication that this has been done is to check if the relevant entry is included in syncd's sai.profile. In contrast to the switch's sai.profile, syncd's sai.profile is only updated with the Host CMIS management support flag after the reload is complete.

- How I did it
I updated the is_module_host_management_mode() implementation to first look for the Host CMIS management support flag in syncd's sai.profile, and only if it does not exist for some reason, look for it in the switch's sai.profile.

- How to verify it
Add the Host CMIS management support flag to the switch's sai.profile and verify that the following log does not appear:
ERR pmon#xcvrd: Exception occured at DomInfoUpdateTask thread due to Exception('control sysfs for SFP 20 does not exist')
@mssonicbld
Copy link
Collaborator Author

Original PR: #19261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants