-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mellanox] Enhance is_module_host_management_mode to also check syncd's sai.profile #18
Conversation
…for the Host CMIS management flag in syncd's sai.profile
@@ -267,12 +267,16 @@ def get_cpld_component_list(cls): | |||
@classmethod | |||
@utils.read_only_cache() | |||
def is_module_host_management_mode(cls): | |||
sai_profile_file_syncd = os.path.join('/tmp/', 'sai.profile') | |||
if os.path.exists(sai_profile_file_syncd): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to add an "else" - if this file doesn't exist for some reason, try to check the under-sku file.
Need to think if we want to have this approach -
on the one hand it may cause the bug to appear again. on the second hand, it is under /tmp/ folder and might be deleted. we want to continue the flow even if file was deleted from inside the docker.
* Update to Linux 6.1.94 Signed-off-by: Saikrishna Arcot <[email protected]> * Integrate HW-MGMT 7.0040.1008 Changes (#18) * Integrate HW-MGMT 7.0040.1011 Changes (#19) * Update sonic-linux-kernel submodule (#20) Signed-off-by: Vivek Reddy <[email protected]> --------- Signed-off-by: Saikrishna Arcot <[email protected]> Signed-off-by: Vivek Reddy <[email protected]> Co-authored-by: Vivek <[email protected]>
…tically (sonic-net#682) #### Why I did it src/sonic-sairedis ``` * 2e00768 - (HEAD -> 202412, origin/HEAD, origin/202412) [code sync] Merge code from sonic-net/sonic-sairedis:202411 to 202412 (#18) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
…omatically (sonic-net#705) #### Why I did it src/sonic-swss-common ``` * 0d42e0a - (HEAD -> 202412, origin/HEAD, origin/202412) Merge pull request #19 from r12f/code-sync-202412 (18 hours ago) [Riff] |\ | failure_prs.log skip_prs.log 3fa36f4 - Merge remote-tracking branch 'base/202411' into code-sync-202412 (19 hours ago) [r12f] |/| | failure_prs.log skip_prs.log 7aa1a47 - Added field for policer counter (sonic-net#975) (7 days ago) [mssonicbld] | failure_prs.log skip_prs.log 8f47a37 - Handle 'bulkget' in consumer_table_pops.lua (sonic-net#970) (3 weeks ago) [mssonicbld] * 3f09bf0 - [code sync] Merge code from sonic-net/sonic-swss-common:202411 to 202412 (#18) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (sonic-net#704) #### Why I did it src/sonic-linux-kernel ``` * 6877ae3 - (HEAD -> 202412, origin/HEAD, origin/202412) [optoe] Reset page select byte to 0 before upper memory access on page 0h (sonic-net#464) (#18) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
Why I did it
Two steps 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.
Work item tracking
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')
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)