Could it be that, despite this previous issue/fix, there is still an issue with journal and ACLs, probably because of some sort of racing condition upon system boot?
From time to time, I am encountering situations where "journalctl" shows the log from BEFORE the last boot, only, while "journalctl -b" shows the log from AFTER the last boot - suggesting that there is an issue with writing the current journal onto log2ram. Usually, this is fixed by rebooting.
I just have a vm where this happened again - and I am having some time to report it. I compared /var/log/journal on both systems - permissions and acls are identical, but journald appears to be still not able to write the journal on one VM.
# systemd-analyze critical-chain systemd-journald.service
systemd-journald.service +50ms
└─log2ram.service @1.563s +360ms
└─var-log.mount @2.531s
└─local-fs-pre.target @631ms
└─systemd-tmpfiles-setup-dev.service @610ms +20ms
└─systemd-tmpfiles-setup-dev-early.service @582ms +19ms
└─kmod-static-nodes.service @453ms +78ms
└─systemd-journald.socket @444ms
└─system.slice @395ms
└─-.slice @395ms
If I read this correctly, it means that systemd-journald.socket actually started before log2ram, which could explain the difficulties in writing. And this is even though the log2ram.service file contains:
Before=basic.target rsyslog.service syslog-ng.service syslog.target systemd-journald.service sysinit.target shutdown.target zram-swap-conf.service apache2.service lighttpd.service
Assuming this means that there is indeed a race condition, would it help to add
[Unit]
After=log2ram.service
to systemd-journald.service as well as part of installing log2ram, e.g. by creating /etc/systemd/system/systemd-journald.service.d/log2ram.conf with this content? Or will it break other things?
Could it be that, despite this previous issue/fix, there is still an issue with journal and ACLs, probably because of some sort of racing condition upon system boot?
From time to time, I am encountering situations where "journalctl" shows the log from BEFORE the last boot, only, while "journalctl -b" shows the log from AFTER the last boot - suggesting that there is an issue with writing the current journal onto log2ram. Usually, this is fixed by rebooting.
I just have a vm where this happened again - and I am having some time to report it. I compared /var/log/journal on both systems - permissions and acls are identical, but journald appears to be still not able to write the journal on one VM.
If I read this correctly, it means that systemd-journald.socket actually started before log2ram, which could explain the difficulties in writing. And this is even though the log2ram.service file contains:
Before=basic.target rsyslog.service syslog-ng.service syslog.target systemd-journald.service sysinit.target shutdown.target zram-swap-conf.service apache2.service lighttpd.serviceAssuming this means that there is indeed a race condition, would it help to add
[Unit]
After=log2ram.service
to systemd-journald.service as well as part of installing log2ram, e.g. by creating /etc/systemd/system/systemd-journald.service.d/log2ram.conf with this content? Or will it break other things?