Bug 864629 - RFE: time-based log rotation policies for systemd journal
RFE: time-based log rotation policies for systemd journal
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 15:19 EDT by Matthew Miller
Modified: 2012-12-20 10:09 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:09:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matthew Miller 2012-10-09 15:19:06 EDT
Most large organizations have policies for data retention, which may include operating system log files.

These policies usually specify both the minimum time data must be retained and a time after which it must be deleted.

Currently, systemd only uses a disk-space-free heuristic for log rotation.

The syslog-derived log systems plus logrotate give an easy and effective way of implementing data retention policies. In order to be used in these environments, systemd's journal needs the same.
Comment 1 Simo Sorce 2012-10-09 18:36:20 EDT
SOme system even require that logs are never rotated automatically and that the machine must crash if logs can't be written, so systemd must allow for boundless configuration and just let the machine crash when disk space is not available anymore.
Comment 2 Michal Schmidt 2012-10-10 08:15:09 EDT
I am not strictly opposed to having time-based in journald, but I disagree with the statement that the journal *needs* to support that. We could tell users with similar requirements to disable journal storage and defer to rsyslog for data retention.
Comment 3 Matthew Miller 2012-10-10 09:36:43 EDT
(In reply to comment #2)
> I am not strictly opposed to having time-based in journald, but I disagree
> with the statement that the journal *needs* to support that. We could tell
> users with similar requirements to disable journal storage and defer to
> rsyslog for data retention.

"Needs" is if we want to not ship rsyslog by default anymore. "Strongly want as an important and useful feature which will help people and help both Fedora and systemd" is the general statement. :)
Comment 4 Jóhann B. Guðmundsson 2012-10-10 09:41:09 EDT
There is absolutely no need for that period administrator can still install either rsyslog or syslog-ng if they either need or want this feature...
Comment 5 Matthew Miller 2012-10-10 15:37:34 EDT
(In reply to comment #4)
> There is absolutely no need for that period administrator can still install
> either rsyslog or syslog-ng if they either need or want this feature...

That doesn't help the mandatory cases.

But in general (and I think more importantly), it also means that users who arguably _most benefit_ from the new features systemd's journal brings (e.g., reliable and better metadata) don't actually get them. Falling back to "bah, they should use the old system" doesn't seem satisfactory to me.
Comment 6 Michael Biebl 2012-10-10 21:58:13 EDT
(In reply to comment #4)
> There is absolutely no need for that period administrator can still install
> either rsyslog or syslog-ng if they either need or want this feature...

Can the journal be disabled in such a case?
In some cases law or company policy forbids to keep certain log files after a certain period of time. If such log data would end up in the journal, one could run into problems.
Comment 7 Michal Schmidt 2012-10-11 08:22:24 EDT
You can disable the storage of journal data using "Storage=none" in /etc/systemd/journald.conf.
Comment 8 Michael Biebl 2012-10-11 08:46:40 EDT
(In reply to comment #7)
> You can disable the storage of journal data using "Storage=none" in
> /etc/systemd/journald.conf.

What exactly does this option do?
Does this only affect what get's persistently stored in /var/log or also what is stored in /run?
Comment 9 Michal Schmidt 2012-10-11 08:49:10 EDT
Both /var/log and /run/log. See the manpage for other possible values of the option:
http://0pointer.de/public/systemd-man/journald.conf.html
Comment 10 Lennart Poettering 2012-10-16 17:06:18 EDT
Implemented in git. Will upload to F18 soon too.
Comment 11 Fedora Update System 2012-10-22 21:04:08 EDT
systemd-195-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-195-1.fc18
Comment 12 Fedora Update System 2012-10-23 02:47:37 EDT
Package systemd-195-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-195-1.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16709/systemd-195-1.fc18
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2012-10-26 15:37:02 EDT
Package systemd-195-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-195-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16709/systemd-195-2.fc18
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2012-12-20 10:09:59 EST
systemd-195-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.