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

client: fix deletion of archive log files based on log_rotate_max_files #10913

Closed

Conversation

h3yduck
Copy link
Contributor

@h3yduck h3yduck commented Jul 20, 2021

Fixes #10912

Added pruning of old archive files on the first write (without having a file open = on starting the client).

@h3yduck
Copy link
Contributor Author

h3yduck commented Sep 1, 2021

@drewbailey could you guys please take a look at this anytime soon?

@lgfa29
Copy link
Contributor

lgfa29 commented Oct 22, 2021

Hi @h3yduck 👋

Sorry for the delay on getting this reviewed. I think this problem has been mitigated by #11070 where we realized that the behaviour of log_file was actually wrong and Nomad was generating timestamped log files even for the active one.

Could you check if this solves the problem for you? That patch was released in Nomad v1.1.4.

Thanks!

@h3yduck
Copy link
Contributor Author

h3yduck commented Oct 23, 2021

Hi @lgfa29 👋

Thank you very much for the notification 🙂 Yes, the change fixes the bug as well 🎉

On the other hand, it introduces behavior that is problematic for us: if the number/size of the log files isn't exceeded and the client is restarted, the previous logs are lost (because the previously active log file isn't archived to a timestamped file and the contents are overridden with the logs of the restarted client). Anyways, that is a completely different problem, I will open an issue for that and I'm closing this one.

Thanks!

@h3yduck h3yduck closed this Oct 23, 2021
@h3yduck h3yduck deleted the b-client-log-rotate-max-files branch October 23, 2021 10:43
@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 12, 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.

log_rotate_max_files is only checked on exceeding log_rotate_duration or log_rotate_bytes
2 participants