Skip to content

[Credo][Ycable] update health_check() to enhance the accuracy #345

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

Closed
wants to merge 2 commits into from

Conversation

xinyulin
Copy link
Contributor

Description

The fix will check UART retry/abort counts and fail it if those counters are over-limit.
The API, health_check() is used for RMA diagnostics.

Motivation and Context

To enhance health_check() accuracy

How Has This Been Tested?

Tested on Arista-7050CX3

Additional Information (Optional)

@prgeor prgeor added the Y-Cable label Apr 25, 2023
@prgeor prgeor requested a review from vdahiya12 May 19, 2023 22:17
if api_ver >= 0x18 and uart_stat['Local']['UART2']['RxErrorCnt'] > 100:
self.log_error("check cable health fail: uart rx error count overlimit:%d" % (uart_stat['local']['UART2']['RxErrorCnt']))
if api_ver >= 0x18:
if uart_stat['Local']['UART2']['RxErrorCnt'] > 100:
Copy link
Contributor

Choose a reason for hiding this comment

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

could we check the uart_stat dictionary would have the keys ? and if not what to do ?

Copy link
Contributor Author

@xinyulin xinyulin Jun 9, 2023

Choose a reason for hiding this comment

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

My original concept is to use api_ver to avoid to hit KeyError (key is not exist in the dict). but, you are right, it is better to check if the key is exist or not. Let me submit one more commit to handle the exception

@xinyulin xinyulin closed this Sep 10, 2024
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
* [CMIS] Add power up duration for power up timeout

Signed-off-by: chiourung_huang <[email protected]>

* modify function name after code review

---------

Signed-off-by: chiourung_huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants