Bug#850703: systemd: incorrect LSB support with monit's init script

Vincent Lefevre vincent at vinc17.net
Mon Jan 9 16:30:31 GMT 2017


Hi Martin,

On 2017-01-09 16:41:20 +0100, Martin Pitt wrote:
> Hello Vincent,
> 
> Vincent Lefevre [2017-01-09 15:15 +0100]:
> > The monit service (from the monit package) should be started last and
> > stopped first. This is not the case with systemd.
> >
> > # Should-Start:      $all
> > # Should-Stop:       $all
> 
> Please note that the SysV concept of "$all" is notoriously broken
> (what if another package uses $all too?),

I suppose that both should fall in the same class, with no
dependencies between them. Actually, this is how it is specified
in <https://wiki.debian.org/LSBInitScripts>.

  $all  facility supported by insserv to start a script after all
        the scripts not depending on $all, at the end of the boot
                    ^^^^^^^^^^^^^^^^^^^^^
        sequence. This only work for start ordering, not stop
        ordering. Depending on a script depending on $all will
        give incorrect ordering, as the script depending on $all
        will be started after the script depending on it. 

According to this description, monit is incorrect for Should-Stop,
but anyway, the main problem may be with Should-Start.

> and cannot be represented sensibly in any non-serial init system
> (systemd, upstart, and even sysv with startpar). If monit needs to
> start/stop after/before other services, these should be enumerated
> explicitly.

monit can monitor arbitrary services, so that I suppose that it
doesn't know in advance. A solution would be to have a way to
enumerate all the available services on the system, and add them there
dynamically at system start up, but isn't this equivalent to $all?

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




More information about the Pkg-systemd-maintainers mailing list