[systemd-devel] systemd unit checker tool

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Apr 7 10:02:16 PDT 2015


On Tue, Apr 07, 2015 at 12:36:31PM -0400, Rahul Sundaram wrote:
> Hi
> 
> On Tue, Apr 7, 2015 at 10:49 AM, Lennart Poettering  wrote:
> 
> >
> > We probably should add chekcs for these to "systemd-analyze verify"
> > even...
> 
> 
> Perhaps packaging guidelines should recommend running this command or it
> should be part of the macro that packages include that logs warnings when
> unit files has any of these issues

The problem is that the way this is currently implemented is that the
unit files to check are loaded, and any errors encountered are
printed. This means that problems in other units are also reported,
even though the unit being checked might not be responsible. (This is
not just an implementation issue though. For example, let's say that
we are testing A.service, which references B.service, but B.service
cannot be read because it has a syntax error. We could filter out
anything not directly related to A.service, but this might obscure an
issue that will cause A.service to fail. It seems better to report the
error for B.service too, if loading A.service causes B.service to be
loaded.) Nevertheless, the output from systemd-analyze verify is not
really suitable for automatic testing of single unit files.

The most interesting problems occur because of conflicts at the level
of whole graph of units, so such isolated testing could be
implemented, but it would have only limited usefulness. But adding
such a mode for automatic testing to catch typos and syntax errors
might be reasonable.

Zbyszek




More information about the systemd-devel mailing list