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

[logrotate.conf]: Truncate log files #1027

Closed
wants to merge 1 commit into from

Conversation

marian-pritsak
Copy link
Collaborator

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.

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.
Copy link
Contributor

@jleveque jleveque left a 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?

@marian-pritsak
Copy link
Collaborator Author

My opinion is that all log files need to be truncated. But if you have some objections, it's up to discussion.

@jleveque
Copy link
Contributor

Retest this please.

@lguohan
Copy link
Collaborator

lguohan commented Jan 11, 2018

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.

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

need more information

@lguohan lguohan closed this Jan 12, 2018
@lguohan lguohan deleted the marian-pritsak-patch-1 branch January 12, 2018 03:57
jleveque added a commit that referenced this pull request Aug 9, 2020
* 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)
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
* 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)
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants