On Sat, 1 Feb 2020 at 22:01, Michael Biebl <bi...@debian.org> wrote:
>
> Hi Steve
>
> Am 01.02.20 um 14:36 schrieb Steve McIntyre:
> > Michael Biebl wrote:
> >>
> >> with today's upload of systemd 244.1-2 I finally enabled persistent
> >> journal by default [1]. It has been a long requested feature.
> >>
> >> The package will create a directory /var/log/journal on upgrades and new
> >> installs, which enables persistent journal in so called auto mode.
> >
> > Fine for new installations, but please *don't* do this for
> > upgrades. Those people with existing logging setups will be surprised
> > by this.
>
> I honestly don't like packages that behave differently depending on
> whether they were upgraded or installed anew (given their default
> configuration wasn't changed). I assume there would be equally as many
> or even more surprised users that find their upgraded system behave
> differently then their freshly installed system.
>
> The change here is basically just an update of the default behaviour of
> journald. If you explicitly configured a different journald behavior via
> Storage=, this is respected. If you already created a /var/log/journal
> in the past, the change will be a nop.
>
> Existing sysloggers will continue to work after this change as before,
> they are not directly affected by this change.
>
> Can you eloborate more on this what your concerns are here?
>
> I think Didier's idea of documenting this in the release notes is a good
> one, so I filed #950447. The NEWS entry is a good idea as well and I
> thought about that, but decided to not add it (yet) but instead ask for
> feedback on debian-devel first. Depending on the feedback, the content
> of that NEWS entry might change. E.g. I was unsure whether I should
> mention that a syslogger like rsyslog can now be uninstalled safely, as
> the contents are now available in the journal as well. Feedback on this
> welcome.
>
> I would also like to mention that there is prior art. Ubuntu made the
> switch to a persistent journal a while back and they did it on upgrades
> and new installations [1] as well.
> I've CCed Dimitri, just in case he wants to chime in here. Maybe he has
> some feedback on this transition in Ubuntu.
>

In Ubuntu, we have enabed persistant journal by default on fresh
installs and upgrades, but only once.

# Enable persistent journal, in auto-mode, by default on new installs
installs and upgrades
if dpkg --compare-versions "$2" lt "235-3ubuntu3~"; then
    mkdir -p /var/log/journal
    # create tmpfiles only when running systemd, otherwise %b substitution fails
    if [ -d /run/systemd/system ]; then
        systemd-tmpfiles --create --prefix /var/log/journal
    fi
fi

Meaning, post-install/upgrade if one removes /var/log/journal it gets
disabled and doesn't come back again.

Overall, the feedback was extremely positive. A lot of different
classes of users were expecting journal to be there and were very
unhappy to find out retroactively that it was not there on first boot
/ last boot / broken boot. Especially people with existing logging
setups were pissed off about missing logs that only appeared in the
small ephemeral runtime journal and never made it to the persistent
journal on disk - for example early boot logs; failing to boot;
shutdown logs; and whenever remote logging services failed.

The fact that we leave it "auto" mode and simply removing
/var/log/journal gets rid of the persistent journaling is very
intuitive too, and grumpy people who dislike it manage to
disable/remove it, without any complaints (i.e. there are no bug
reports "why is journal back").

We have a recurring class of "bugs" filed by people who claim "OMG
journal is growing to unlimited size", and every single time so far
that turned out to be not true, and the caps that journald calculates
are actually enforced.
$ journalctl -u systemd-journald -b | head
System Journal (/var/log/journal/1b8df0fa27039f0163586c6756a6d401) is
3.9G, max 4.0G, 23.7M free.

After pointing out that caps are actually enfoced and rotated off, and
that one can set bigger / smaller caps for the persistent journal,
people seemed to agree that it doesn't in fact grow to unlimited
sizes.

This is the experience we have had in Ubuntu, and I do hope that in
Debian too it will be enabled on new installs and upgrades, but only
once and keep it in auto mode - meaning that removal of
/var/log/journal disables persistent journaling.

The change was done in December 2017 and thus systems installed with /
upgraded to 18.04 LTS overwhelmingly have persistent journal enabled
by default across the board.

-- 
Regards,

Dimitri.

Reply via email to