12.04.2017 22:09, Michael Biebl пишет: > 2017-04-12 20:24 GMT+02:00 Tomasz Torcz <to...@pipebreaker.pl>: >> On Wed, Apr 12, 2017 at 11:01:04AM -0700, Auke Kok wrote: >>> The right (or, better) solution IMHO would be for mysqld to signal to >>> systemd that it's running OK before recovery starts, using type=notify. >>> This way recovery can take as long as needed, and if it fails, it could >>> signal this failure as normal back to systemd. Then systemd would retry >>> the recovery a few times this way and finally give up. >> >> It wouldn't be good solution. READY=1 means clients can connect and >> talk to the database. Signalling readiness prematurely would break >> functionality.. > > Maybe we'd need a new state paramenter, like STARTING=1 which could be > sent by the daemon to systemd in regular intervals and would signal > systemd that the startup of the daemon is in process and the daemon is > not actually hung. >
You still need to upper bound it. Consider service that is run on shutdown. You cannot indefinitely wait for service that is stuck in STARTING state. So STARTING state is marginally useful to catch hung service, but at some point service manager still needs to decide how long it wants to wait. We are back at square one. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel