-
Notifications
You must be signed in to change notification settings - Fork 558
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
Move away sairedis logrotate from signal handler #1153
Conversation
retest this please |
@@ -47,6 +47,7 @@ int gBatchSize = DEFAULT_BATCH_SIZE; | |||
bool gSairedisRecord = true; | |||
bool gSwssRecord = true; | |||
bool gLogRotate = false; | |||
bool gSaiRedisLogRotate = false; |
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.
Add volatile
?
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.
not needed
@@ -47,6 +47,7 @@ int gBatchSize = DEFAULT_BATCH_SIZE; | |||
bool gSairedisRecord = true; | |||
bool gSwssRecord = true; | |||
bool gLogRotate = false; |
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.
gLogRotate [](start = 5, length = 10)
The name seems cover gSaiRedisLogRotate. Do you mean gOrchagentLogRotate
?
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.
no, this logrotate only covers sairedis library
not sure why tests fails on VS, seems not related to my change |
retest this please |
test this please |
* Move away sairedis logrotate from signal handler * Update tests
*[Cisco] enable SAI bulk API config from syncd to pass a set of Rid and review code-flow performance on cisco SAI/SDK layer. until route-check.py(sonic-utility) will not dump the associated ERR message.
What I did
Move away logrotate from signal handler to main orch loop, to not execute any sairedis library code which potentially can be under mutex and cause deadlock when signal handler occur
Why I did it
to not execute sai_switch_api->set_attribute() under signal handler, just to set logrotate flag
How I verified it
running orchagent against vs switch and sending HUP signal to orch process
Details if related
Since flush method is executed every time that select is returning object from orchdaemon main/start loop, this is good point to check if logrotate is needed