Bug #9091
closedThe "rudder" init script tries to stop slapd before jetty
Description
See:
root@amnesiac:~# service rudder stop Stopping Rudder services: * rudder-slapd...>HERE<OK * postgresql... OK * rudder-jetty... OK * rudder-agent... OK
The symptom here is that I tried to stop Rudder on a quite busy system, and the script stopped at the ">HERE<" on the previous sample.
The reason was that when we run service rudder-slapd stop (it is the case here), the script runs a slapcat to backup the configuration before halting slapd. In this case, the slapcat seemed to be stuck (hogging a lot of CPU ressources), but as soon as I brutally killed rudder-jetty, it completed and carried on with the other steps.
I assume that the slapcat does not handle well heavy concurrent access to the database, and I feel that the solution here is quite simple: we should never stop a provider (database) before its consumers (Jetty). The reason is, that the provider may get stuck waiting for the consumer to stop sending requests before halting to halt in a clean / consistent way.
We should probably stop rudder-jetty and rudder-agent before rudder-slapd and postgresql ?