fedora-infra / mirrormanager2

Rewrite of the MirrorManager application in Flask and SQLAlchemy
https://mirrormanager.fedoraproject.org
GNU General Public License v2.0
63 stars 46 forks source link

logs kept forever and outside logrotate #164

Open nirik opened 8 years ago

nirik commented 8 years ago

Some recent logging changes have resulted in mirrormanager keeping /var/log/mirrormanager/ logs, but it never seems to expire/remove them and they are not controlled by logrotate, they seem to rotate every day at 00:00UTC outside logrotate.

So, how many of these logs are useful to keep? Should it be configurable?

Should mirrormanager let logrotate handle them instead of doing it internally itself?

Should logs be compressed to save space?

Note that in Fedora ansible I added a logotate for these before I realized they are controlled directly by mirrormanager. We will want to adjust that based on what we do here.

adrianreber commented 8 years ago

I am not aware at which place mirrormanager rotates its own logfiles. Which part of mirrormanager are we talking about here? Frontend, Backend, Crawler, Mirrorlist?

nirik commented 8 years ago

mirrorlists... /var/log/mirrormanager/mirrorlist.log.YYYY.MM.DD

adrianreber commented 8 years ago

Ah, those files. They are actually handled via ansible cron tab entries. The last three entries in roles/mirrormanager/mirrorlist2/tasks/main.yml

This is for the mirrorlist usage statistics and can be reduced to the current day and the previous day. Maybe keeping the last 7 days would be a good start to reduce the required disk space. I changed it in ansible from 14 days to 7 days.