-
Notifications
You must be signed in to change notification settings - Fork 727
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
Don't fail if logrotate cron job file isn't present #6964
Conversation
Bullseye-based images currently have both a cronjob task and a systemd timer configured for the logrotate rotation. This can cause conflicts with two simultaneous log rotations happening (in the worst case; I think there's some check somewhere to prevent this from happening). To fix this, the cronjob task will be removed. This means that this file will no longer exist. Therefore, don't fail if this file doesn't exist. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
flake8 failures appear to be for lines I didn't touch. If needed, I can fix those issues as well. |
Bullseye-based images currently have both a cronjob task and a systemd timer configured for the logrotate rotation. This can cause conflicts with two simultaneous log rotations happening (in the worst case; I think there's some check somewhere to prevent this from happening). To fix this, the cronjob task will be removed. This means that this file will no longer exist. Therefore, don't fail if this file doesn't exist. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@wangxin , we need this in 202012 branch as well. |
Signed-off-by: Saikrishna Arcot sarcot@microsoft.com
Description of PR
Summary:
Work on sonic-net/sonic-buildimage#12392.
Type of change
Back port request
Approach
What is the motivation for this PR?
Bullseye-based images currently have both a cronjob task and a systemd timer configured for the logrotate rotation. This can cause conflicts with two simultaneous log rotations happening (in the worst case; I think there's some check somewhere to prevent this from happening).
How did you do it?
To fix this, the cronjob task will be removed. This means that this file will no longer exist. Therefore, don't fail if this file doesn't exist.
How did you verify/test it?
Verified that KVM T0 part 1 tests pass with an image without
/etc/cron.d/logrotate
.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation