[Rdo-list] Question about Restart=always in systemd

Lars Kellogg-Stedman lars at redhat.com
Thu Sep 17 20:30:03 UTC 2015


On Tue, Sep 15, 2015 at 08:33:16PM +0200, Haïkel wrote:
> > Or if that's too crazy, just add a check to the fedora-review tool
> > that ensures unit files have standard settings, such as the Restart=
> > setting.  The review could flag things like:
> >
> > - Missing Restart behavior
> > - Missing Description

As a proof-of-concept for this sort of idea:

    https://github.com/larsks/audit-unit-files

Which, when run for example against the delorean nova repository:

    git clone https://github.com/openstack-packages/nova.git
    find nova -name '*.service' |
      xargs audit-unit-files -r required.service -a

Yields:

    ERROR:__main__:file nova/openstack-nova-serialproxy.service is missing required option Service/restart
    ERROR:__main__:file nova/openstack-nova-xvpvncproxy.service is missing required option Service/restart
    ERROR:__main__:file nova/openstack-nova-novncproxy.service is missing required option Service/restart
    ERROR:__main__:file nova/openstack-nova-spicehtml5proxy.service is missing required option Service/restart

(Run with '-v' to report 'file is okay' for files with no errors)

-- 
Lars Kellogg-Stedman <lars at redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack          | http://blog.oddbit.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.rdoproject.org/pipermail/dev/attachments/20150917/d57d57d3/attachment.sig>


More information about the dev mailing list