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(a)redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack |
http://blog.oddbit.com/