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

[PMON][psud] Fix the repeated NOTICE log message on Chassis platform #529

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

mlok-nokia
Copy link
Contributor

Description

In psud script, first_run is always true in PsuChassisInfo class. This causes the method update_master_status() always set the psu status_master_led and log the status change messages although the status is not changed. The same NOTICE message is repeated and never stop. Address this issue, added code to set the first_run to False after the first run. This initializes set_led to False before the calculation. So that it won't be True to trigger the set_status_maste_led() and log the same message while the status has NO change.

Motivation and Context

This PR fixes sonic-net/sonic-buildimage#19780 and not set the LED to the same state or log the same message when there is NO change.

How Has This Been Tested?

Checking the syslog on the SUP. The following message will not be repeated if the status is not changed

pmon#psud: PSU supplied power warning cleared: supplied power is back to norma

Additional Information (Optional)

Copy link
Contributor

@assrinivasan assrinivasan left a comment

Choose a reason for hiding this comment

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

Change LGTM. Could you paste a syslog comparison before and after your change?

@mlok-nokia
Copy link
Contributor Author

mlok-nokia commented Aug 2, 2024

Change LGTM. Could you paste a syslog comparison before and after your change?

The context of log message is not changed. This PR is to stop logging the same message periodically when the Pusd Master Status is not changed. On the stablized system, we found that the same message is repeated thousand times (see below message). Also, the Pusd.set_status_master_led() has been trigged repeadedly to call the platform specified code to set the Master Led although the Status is not changed.
2024 Aug 2 03:33:14.778967 ixre-cpm-chassis11 NOTICE pmon#psud: message repeated 4420 times: [ PSU supplied power warning cleared: supplied power is back to normal.

@prgeor prgeor merged commit f581c06 into sonic-net:master Sep 12, 2024
5 checks passed
@mlok-nokia
Copy link
Contributor Author

@prgeor @judyjoseph Please cherry-pick this PR to 202405 branch

mssonicbld pushed a commit to mssonicbld/sonic-platform-daemons that referenced this pull request Nov 18, 2024
…onic-net#529)

* [PMON][psud] Fix the repeated NOTICE log message on Chassis platform

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

* Fix the Unit test

---------

Signed-off-by: mlok <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #561

mssonicbld pushed a commit that referenced this pull request Nov 19, 2024
…529)

* [PMON][psud] Fix the repeated NOTICE log message on Chassis platform

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

* Fix the Unit test

---------

Signed-off-by: mlok <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
6 participants