On Saturday 05 April 2014, Cristian Rodríguez wrote:
Hi:
Today an update to logrotate has hit the factory repositories and I think it is prudent to inform you all about some changes I added to the package and its side effects, either for documentation purposes or JFYI. ;)
- Logrotate no longer runs as a cronjob but as a systemd.timer(5)
- You can enable/disable log rotation by issuing systemctl enable/disable logrotate.timer
- It continues to run just like "cron.daily" with the following bonus perks:
So it's still possible to rotate ONLY at a specific time like suse's cron does if you have DAILY_TIME="02:15" in /etc/sysconfig/cron?
* Log rotation will be postponed until your are connected to AC power, in order not drain your precious battery time.
* The task will run as soon as possible in case your system was turned off, suspended or otherwise inactive at the time the process was scheduled (requires systemd 212 or later)
* If any error is found, the results will be found in the journal (and/or syslog if installed) to see what's going on issue:
These are again features only useful for laptops or smart phones but not for 24/7 machines. I want log rotation at a specific time when I know they are idle and when no backup is pulled. Please respect above mentioned DAILY_TIME setting for the upgrade scenario.
systemctl status logrotate.service logrotate.timer
Observed problems/gotchas:
zypp installs packages in an unsuitable order, systemd-presets that enable the timer by default may be installed after the logrotate update. thus it does not get automatically enabled.
to ensure things keep running smoothly in your factory installation:
$ systemctl enable logrotate.timer $ systemctl start logrotate.timer
This also needs to be solved for the upgrade scenario.
Have a lot of fun :-)
-- Cristian Team PITA -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org