[systemd-devel] Detecting failed units based on active state

Mantas Mikulėnas grawity at gmail.com
Wed Jun 11 03:43:53 PDT 2014


Hmm, didn't this get fixed in recent versions? I seem to remember that
after the sd-bus port systemd started sending changed_properties with
values, not just invalidated_properties...

-- 
Mantas Mikulėnas <grawity at gmail.com>
// sent from phone
On Jun 11, 2014 12:59 PM, <David.Yates at continental-corporation.com> wrote:

> Hi,
>
>
>
> We have written a component that detects failing units in the system. This
> registers for the PropertiesChanged signal, to be notified whenever the
> ActiveState of a unit changes.
>
> However this signal is sent without the property values. This can result
> in a problem when a unit is restarted fast (i.e. RestartSec=0) because we
> miss the "FailedState" and can not distinguish between a failed unit and a
> unit that was intentionally stopped and restarted.
>
> We looked at using the InactiveEnterTimestamp however there we also can
> not make the distinction.
>
> Does anyone have any ideas on how we could handle this problem (i.e. other
> properties that could be used)?
>
> In case there is no solution we wondered about introducing a new property
> (UnitFailedCount) to track the number of failures within the current
> lifecycle. Any thoughts??
>
>
>
>
> Thanks
>
>
> Dave
>
>
> Software Architect System Software
>
> I IC RD G SW SSW HKT
> Continental Automotive GmbH
> Interior Infotainment & Connectivity
> Philipsstrasse 1, 35576 Wetzlar, Germany
>
> Telefon/Phone: +49 6441 370-8289
> Mobile/Handy: +49 151 6522 9102
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140611/b0eabf25/attachment.html>


More information about the systemd-devel mailing list