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

[enhancement]: add logrotate config file #4509

Closed
laroche opened this issue Oct 15, 2023 · 6 comments
Closed

[enhancement]: add logrotate config file #4509

laroche opened this issue Oct 15, 2023 · 6 comments
Labels
enhancement New feature or request good first issue

Comments

@laroche
Copy link

laroche commented Oct 15, 2023

Enhancement

Please consider adding a logrotate config file to your cloud-init source repository. Looking at bigger
files in /var/log/, cloud-init grows quite big logging files.

Please also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926424 which ends
also into a merge request at https://salsa.debian.org/cloud-team/cloud-init/-/merge_requests/6.

best regards,

Florian La Roche

@laroche laroche added enhancement New feature or request new An issue that still needs triage labels Oct 15, 2023
@itsaviral2609
Copy link
Contributor

Hey @blackboxsw
Can u guide me under which directory it will be added as logrotate file generally comes under /etc/logrotate.d.
Will add this if i get to know more on this :)
https://www.digitalocean.com/community/tutorials/how-to-manage-logfiles-with-logrotate-on-ubuntu-16-04

@aciba90
Copy link
Contributor

aciba90 commented Oct 16, 2023

Thanks for making cloud-init better.

For debian derivatives, I think it is enough to create a cloud-init.logrotate file under the debian folder in the Ubuntu downstream branches: ubuntu/devel, ubuntu/mantic, ubuntu/jammy and ubuntu/focal. dh_installlogrotate will handle the installation of the config file under /etc/logrotate.d

In addition to that, cloud-init clean --logs and cloud-init collect-logs have to be aware of this new behavior.

And optionally, we tend to document packaging changes under packages/debian for packagers and testing.

@aciba90 aciba90 removed the new An issue that still needs triage label Oct 16, 2023
@blackboxsw
Copy link
Collaborator

Thanks @aciba90 and correct, I think this is something we should look to implement. The cloud-init clean --logs and collect-logs determine their related log files from merged configuration in cloudinit.util.get_config_logfiles. It'd be good if we align cloud-init collect-logs and cloud-init clean --logs with the dynamic config-driven log file definitions so they both source util.get_config_logfiles if possible

@chifac08
Copy link
Contributor

chifac08 commented Jan 1, 2024

Related PR #4721

@aciba90
Copy link
Contributor

aciba90 commented Jan 18, 2024

#4721 added the support to collect and clean rotated logs, plus a reference log rotation config file.

What is missing is to add the logrotation config to ubuntu/devel under debian/, to add this to the devel series of Ubuntu.

@aciba90 aciba90 reopened this Jan 18, 2024
@github-actions github-actions bot added the Stale label Sep 18, 2024
@aciba90
Copy link
Contributor

aciba90 commented Oct 1, 2024

Log rotation was added to ubuntu/devel in #4789.

@aciba90 aciba90 closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue
Projects
None yet
Development

No branches or pull requests

5 participants