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

prevent active log from being overwritten when agent starts #11386

Merged
merged 4 commits into from
Oct 27, 2021

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Oct 26, 2021

Before #11070 the agent assumed that a new log file always started fresh, and so it truncated the file and assumed it was just created.

#11070 changed this behaviour to keep the active log file name stable, but didn't modify the full process. This caused the agent to overwrite log lines that were not rotated in a previous run.

This PR updates the logic so new log lines are appended to the active log file and that the internal state is also updated accordingly with the existing file information.

Closes #11379

@lgfa29 lgfa29 marked this pull request as draft October 26, 2021 00:21
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rotate active log file on agent restart
2 participants