-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] error in logs "Failed to start Rotate log files" #12392
Labels
Comments
saiarcot895
added a commit
to saiarcot895/sonic-buildimage
that referenced
this issue
Dec 2, 2022
Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes sonic-net#12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This was referenced Dec 2, 2022
yxieca
pushed a commit
that referenced
this issue
Dec 8, 2022
Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes #12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this issue
Dec 8, 2022
…net#12921) Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes sonic-net#12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld
pushed a commit
that referenced
this issue
Dec 12, 2022
Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes #12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this issue
Feb 3, 2023
…net#12921) Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes sonic-net#12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld
pushed a commit
that referenced
this issue
Feb 4, 2023
Debian is shipping a systemd timer unit for logrotate, but we're also packaging in a cron job, which means both of them will run, potentially at the same time. Remove our cron file, and add an override to the shipped timer file to have it be run every 10 minutes. Fixes #12392. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Error in logs happen: "Failed to start Rotate log files"
Steps to reproduce the issue:
It reproduces only in case when time is 12:00AM and logrotation started
There are two triggers for logrotate - One is the default debian logrotate timer which runs daily at 12:00 AM. The second one is the logrotate by cron job which SONiC has created and runs every 10 mins.
The SONiC cron job has a logic to kill any logrotate that is running. #2942
The cron job in this case was aligned in such a way in runs at 12:00:01 which is 1 sec after the default timer triggers a logrotate. Since the cron finds a logrotate already running it kills it which results in the log
From cron log:
This is non functional since the logrotate from cron will eventually accomplish the task.
However given there is already a cron running in SONiC the default daily logrotate can be disabled
Describe the results you received:
Got error in logs
Describe the results you expected:
No error in logs
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: