[systemd-devel] How to suppress "A start job is running for offline-updates" knight-rider status output?

Lennart Poettering lennart at poettering.net
Wed Feb 27 11:50:02 UTC 2019


On Mi, 27.02.19 10:40, Mantas Mikulėnas (grawity at gmail.com) wrote:

> On Tue, Feb 26, 2019 at 7:29 PM Hans de Goede <hdegoede at redhat.com> wrote:
>
> > Hi All,
> >
> > As part of improving the boot experience:
> > https://fedoraproject.org/wiki/Changes/FlickerFreeBoot
> > https://hansdegoede.livejournal.com/20119.html
> >
> > I took a look at how applying offline updates looks
> > when pressing ESC to get the detailed view, pk-offline-update
> > then prints "dnf update" like output, but at the same time
> > systemd is printing:
> >
> > [   ***] A start job is running for offline-updates
> >
> > Messages to the console, the 2 get intermixed and this looks
> > quite bad and makes the status update of the actual
> > update process almost impossible to follow.
> >
> > Is there something which I can put in the
> >
> > /lib/systemd/system/system-update.target.wants/packagekit-offline-update.service
> > service file to suppress the knightrider status updates ?
> >
> >
> I think the official name is "cylon eye status updates".
>
> Hmm, I *thought* it was possible to disable this by something like
> flock()'ing the console device, and systemd-fsck was supposed to do that in
> order to avoid the job status from mixing with the "fsck: x% complete"
> output. But it looks like that functionality was lost, or never present,
> and indeed even systemd-fsck's output is trashed by the "job is running"
> messages, from what I remember.

There was a plan to use BSD locks for that. But that was only a
plan. It's listed in the TODO list still though, but noone worked on
that yet.

> Looking at source code (manager_get_show_status, unit_needs_console,
> exec_context_may_touch_console), the output should be disabled if at least
> one currently active unit has a tty as its stdin/stdout, and/or any of the
> tty_reset/tty_vhangup options enabled. So maybe StandardOutput=tty,
> TTYPath=/dev/console would achieve this?

So, this should work, though is a bit ugly I'd say.

My suggestion would be: the status msg indicates that start-up of the
offline-updates service takes awfully long, i.e. that it apparently
runs everything as Type=oneshot? I find that a curious choice: why
that? Why not use Type=simple or Type=notify or so? i.e. why delay the
boot transaction like this? If you don't then the status message
wouldn't be shown.

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list