Skip to content
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

[xcvrd] Add logs to improve debugging in xcvrd #539

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Sep 18, 2024

Description

Following logs are planned to be added to xcvrd for enhancing debuggability

  1. Dumping Module and DataPath state during CMIS SM transition
  2. Print a NOTICE if module is not CMIS
    self.update_port_transceiver_status_table_sw_cmis_state(lport, CMIS_STATE_READY)
  3. Add a NOTICE if sfp is not present while updating TRANSCEIVER_INFO table during SFP insertion
    if not _wrapper_get_presence(physical_port):
    continue

Motivation and Context

How Has This Been Tested?

Log for #1
2024 Sep 18 21:37:02.573152 sonic NOTICE pmon#xcvrd: CMIS: Ethernet0: 400G, lanemask=0xff, CMIS state=INSERTED, Module state=ModuleReady, DP state={'DP1State': 'DataPathActivated', 'DP2State': 'DataPathActivated', 'DP3State': 'DataPathActivated', 'DP4State': 'DataPathActivated', 'DP5State': 'DataPathActivated', 'DP6State': 'DataPathActivated', 'DP7State': 'DataPathActivated', 'DP8State': 'DataPathActivated'}, appl 1 host_lane_count 8 retries=0

Log for #3
2024 Sep 19 15:56:48.794489 sonic NOTICE pmon#xcvrd: Transceiver not present in port Ethernet232

Additional Information (Optional)

MSFT ADO - 29427847

@@ -440,6 +440,7 @@ def post_port_sfp_info_to_db(logical_port_name, port_mapping, table, transceiver
break

if not _wrapper_get_presence(physical_port):
helper_logger.log_warning("Transceiver not present in port {}".format(logical_port_name))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihirpat1 may be notice should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prgeor I have now modified it to notice.

@prgeor prgeor merged commit 2c39785 into sonic-net:master Sep 19, 2024
5 checks passed
@mihirpat1
Copy link
Contributor Author

@bingwang-ms Can you please help to cherry-pick this to 202405 branch?
MSFT ADO - 29427847

mssonicbld pushed a commit to mssonicbld/sonic-platform-daemons that referenced this pull request Sep 20, 2024
* [xcvrd] Add logs to improve debugging in xcvrd

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Fixed unit-test failure

* Improved code coverage

* Changed warning to notice

---------

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #540

mssonicbld pushed a commit that referenced this pull request Sep 20, 2024
* [xcvrd] Add logs to improve debugging in xcvrd

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Fixed unit-test failure

* Improved code coverage

* Changed warning to notice

---------

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
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.

4 participants