-
Notifications
You must be signed in to change notification settings - Fork 161
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
[PMON][psud] Fix the repeated NOTICE log message on Chassis platform #529
Conversation
Signed-off-by: mlok <[email protected]>
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.
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. |
@prgeor @judyjoseph Please cherry-pick this PR to 202405 branch |
…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]>
Cherry-pick PR to 202405: #561 |
…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]>
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
Additional Information (Optional)