-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[logrotate.conf]: Truncate log files #1027
Conversation
When creating a new file we have a problem that the handle to an original log file is no longer valid. It can be bad for those programs that write to log file or read from it. So log file now is truncated instead.
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.
Do you think it's best to change the default behavior here, or change it on a per-log (or per-group-of-logs) basis in the other logrotate config files?
My opinion is that all log files need to be truncated. But if you have some objections, it's up to discussion. |
Retest this please. |
in the commit message, it mentions "we have a problem". which log file has this problem exactly? for syslog, we are doing rsyslog reload after rotate so it should not be a problem. |
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.
need more information
* src/sonic-utilities 9700e45...621aad0 (9): > [Python] Migrate applications/scripts to import sonic-py-common package (#1008) > [config qos] QoS and Buffer config genration for multi ASIC platforms (#978) > [cli]: pass db connector as click context (#1029) > [PDDF] Make utilities compatible to platform API 2.0, in accordance with pddf_2.0 (#940) > [tests] Add unit tests for 'show platform ...' commands (#1021) > Add secure fast/warm-reboot support for Aboot (#994) > [sonic-installer] Create Envvars File for Incoming Image (#1011) > [config load]: do not stop/reset/reload service if it is disabled (#1028) > [tests]: move feature_test.py into tests folder (#1027)
* src/sonic-utilities 9700e45...621aad0 (9): > [Python] Migrate applications/scripts to import sonic-py-common package (sonic-net#1008) > [config qos] QoS and Buffer config genration for multi ASIC platforms (sonic-net#978) > [cli]: pass db connector as click context (sonic-net#1029) > [PDDF] Make utilities compatible to platform API 2.0, in accordance with pddf_2.0 (sonic-net#940) > [tests] Add unit tests for 'show platform ...' commands (sonic-net#1021) > Add secure fast/warm-reboot support for Aboot (sonic-net#994) > [sonic-installer] Create Envvars File for Incoming Image (sonic-net#1011) > [config load]: do not stop/reset/reload service if it is disabled (sonic-net#1028) > [tests]: move feature_test.py into tests folder (sonic-net#1027)
Signed-off-by: Guohan Lu <[email protected]>
When creating a new file we have a problem
that the handle to an original log file is no longer valid.
It can be bad for those programs that write to log file
or read from it. So log file now is truncated instead.