On 19/09/2015 14:52, James Powell wrote:
I don't see it, rc_parallel, as entirely broken, that is if you follow proper scripting techniques and create the proper dependency prestarts.
Even if you do, it's not guaranteed to work as long as you don't have a way to notify readiness. In the serial case, OpenRC starts a subprocess to start a service, and readiness is assumed when the subprocess exits. That defers readiness test to the subprocess, which is perfectly reasonable. With rc_parallel, you just don't wait for the subprocess to exit. I haven't studied the code in detail, but without any readiness notification system, there's no way it's going to respect the dependency graph. It's basically "start everything at the same time, and yolo". Which defeats the purpose of a dependency-based service manager.
I've often wondered if services started via OpenRC could be ran wrapped to s6, such as instead of scripting to start the daemon normally via direct execution, you start it wrapped via OpenRC by executing the s6 run script and stopped by the finish script within the OpenRC script acting as a manager layer.
I think that's what the "supervisor=s6" variable does. See https://github.com/OpenRC/openrc/blob/master/s6-guide.md -- Laurent
