Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691116 - sys-apps/systemd-242-r6: persistent journal is missing on fresh install
Summary: sys-apps/systemd-242-r6: persistent journal is missing on fresh install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-31 09:52 UTC by Anna Tikhomirova
Modified: 2019-07-31 23:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Tikhomirova 2019-07-31 09:52:17 UTC
Persistent journal is missing on fresh install of Gentoo Linux.

This is related to the Bug #678758

This commit https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-apps/systemd?id=2d3ac449e2125b58ca0d946ad21b8173054b446e replaced "keepdir /var/log/journal/remote" with "rm -rf "${ED}"/var/log || die". The result is the missing /var/log/journal/ directory. It is not autocreated by systemd and only runtime journal is used:

systemd-journald[1805]: Runtime journal (/run/log/journal/efacc5fc0559c31034aa3bb25d30743f) is 8.0M, max 97.2M, 89.2M free.
Comment 1 Anna Tikhomirova 2019-07-31 10:28:35 UTC
# emerge -pqv systemd

[ebuild   R   ] sys-apps/systemd-242-r6  USE="acl elfutils gcrypt idn kmod libidn2 lz4 lzma pam pcre seccomp (split-usr) sysv-utils -apparmor -audit -build -cryptsetup -curl -dns-over-tls -gnuefi -http -importd -nat -policykit -qrcode -resolvconf (-selinux) -test -vanilla -xkb" ABI_X86="(64) -32 (-x32)"
Comment 2 Anna Tikhomirova 2019-07-31 14:53:06 UTC
I've made some tests. It seems that /var/log/journal just should exist on system boot. systemd automatically sets correct permissions and creates necessary subdirectories, but doesn't automatically create the directory itself.
"keepdir /var/log/journal" should fix the issue.
Comment 3 Mike Gilbert gentoo-dev 2019-07-31 16:27:08 UTC
This change was made intentionally. If the sysadmin wants persistent logs, they should create the directory as part of the system setup process.

This is documented in the manpage for systemd-journald. Maybe we should document it somewhere more visible to the average user?
Comment 4 Anna Tikhomirova 2019-07-31 19:52:50 UTC
This is a major distribution-specific policy change, this shouldn't go without any notice.

Another distributions either
1) enable persistent journal by default 
2) use rsyslog by default and disable persistent journal to avoid duplication of logs

Enabling it seems to be a safer default than not having persistent logs at all.
Comment 5 Larry the Git Cow gentoo-dev 2019-07-31 23:53:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa3fae8d768c871af0574da9ea81d7282e83036d

commit aa3fae8d768c871af0574da9ea81d7282e83036d
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-07-31 23:51:03 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-07-31 23:52:09 +0000

    sys-apps/systemd: keepdir /var/log/journal
    
    Closes: https://bugs.gentoo.org/691116
    Package-Manager: Portage-2.3.69_p9_p14210, Repoman-2.3.16_p18_p14210
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/systemd/systemd-242-r6.ebuild  | 5 ++---
 sys-apps/systemd/systemd-243_rc1.ebuild | 5 ++---
 sys-apps/systemd/systemd-9999.ebuild    | 5 ++---
 3 files changed, 6 insertions(+), 9 deletions(-)