-
Notifications
You must be signed in to change notification settings - Fork 283
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
Change sai log level before discovery to prevent SAI ERR spam to the log #316
Change sai log level before discovery to prevent SAI ERR spam to the log #316
Conversation
@kcudnik to check. |
@pavel-shirshov @lguohan This pull request will reset all the SAI components' loglevel back to NOTICE. It breaks loglevel for warm-reboot Suggest store the previous loglevel, and restore back. |
@@ -937,8 +937,9 @@ void SaiSwitch::helperDiscover() | |||
|
|||
{ | |||
SWSS_LOG_TIMER("discover"); | |||
|
|||
set_sai_api_log_min_prio("SAI_LOG_LEVEL_CRITICAL"); |
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.
why this is critical ?
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.
because otherwise sai will dump to syslog many thousands of the error messages "something not found" when syncd discover sai api". Output to syslog seriously hits cpu which increases fast-reboot time
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.
there is nothing that produces critical message, so nothing would be logged except maybe something from internal sai
i would propose to log SAI_STATUS_NOT_IMPLEMENTED (which is the most errors probably) as info message in discovery method, instead of disabling all messages in this way
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.
Hi Kamil,
Yes. I made that level CRITICAL because no messages are produced by SAI on syncd discovery.
I had a patch making SAI_STATUS_NOT_IMPLEMENTED as INFO in SAI. I'm not sure it's still there.
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.
yea that would be better approach, so other meaningfull errors if present they still would be logged
Change the level of sai api log to critical right before discovery and set it back to notice after the discovery to prevent error messages caused by discovery process