Problem:
I have just noticed that log files on my foreman servers haven’t been rotated for a couple of weeks now, to be more specific: since I have upgraded them from el8 to el9 with leapp.
I am not sure if this is a general problem with the leapp upgrade or specific to foreman, but I guess it wouldn’t be a bad idea to check the logrotate.timer status during foreman-installer runs and make sure it’s enabled.
I guess the reason is because in el8 it’s started by a cron script in /etc/cron.daily while in el9 it’s via a systemd timer which is disabled by default after the rpm installation, not matching the previous state in el8.
Expected outcome:
logrotate active after leapp upgrade.
Foreman and Proxy versions:
Originally upgraded from el8 to el9 with foreman 3.11/katello 4.13
Just updated my AlmaLinux 8 Foreman server to 9 using leapp. Can confirm logrotate.timer service is disabled.
Enabled it with “systemctl enable --now logrotate.timer”
Still, I think it would be good, if foreman-installer enables the logrotate.timer. I have only noticed after weeks when the current log files got huge and the first logrotate run had to go through a couple of gigabytes which took a while… And nothing is more annoying than running out of space on the root partition.
We try not to manage things that are not part of the “main app” (another example would be Postfix or any other local mail delivery service), but I can bring that up for discussion.
Hmm. I guess the foreman/katello leapp package could be extended to cover this for those who still have to upgrade.
For those, you already have, if you don’t want to touch it, maybe you could add some notification message to foreman-installer which notifies people about this on installations which have been upgraded with leapp and where logrotate.timer is disabled?
Or at minimum add it to the upgrade docs for the next couple of versions? Telling people to check logrotate.timer status if they have upgraded their system from el8? For those who read them…