[systemd-devel] [PATCH] Log failing start conditions

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Wed Jul 17 20:52:48 PDT 2013


On Tue, Jul 16, 2013 at 07:15:56PM +0200, Lennart Poettering wrote:
> On Wed, 26.06.13 15:06, harald at redhat.com (harald at redhat.com) wrote:
> 
> > From: Harald Hoyer <harald at redhat.com>
> > 
> > $ systemctl status dracut-initqueue.service
> > dracut-initqueue.service - dracut initqueue hook
> >    Loaded: loaded (/usr/lib/systemd/system/dracut-initqueue.service;
> > static)
> >    Active: inactive (dead)
> >           start condition failed at Wed 2013-06-26 13:01:05 UTC; 22s ago
> >      Docs: man:dracut-initqueue.service(8)
> 
> I'd prefer if we'd solve this without the journal. Instead, I think
> "struct Condition" should be extended to store the most recent test
> result in a tri-state, i.e. negative for "untested", zero for "failed",
> positive for "succeeded". Then we should add bus property to the Unit
> interface that is an array of structs with the conditions in them,
> including their results.
I've now extended the dbus api, except that 0 means untested,
>0 means OK, <0 means failed, in case we decide to extend failed 
later on.

> With that in place systemctl should simple retrieve this property and
> show the results of *all* individual condition checks if the overall
> condition result was negatzive.
systemctl now will add a line (at most one), describing which condition
or condtions failed. Full output like in Harald's patch is not shown,
although we could still add it without any trouble, because full information
is exported over dbus. Nevertheless, I think current output is fine.

I'll update the wiki shortly.

Zbyszek
-- 
they are not broken. they are refucktored
                           -- alxchk


More information about the systemd-devel mailing list