poise/supervisor — pull request #38 by alambike (2013-12-29 18:36:52+00:00)
Title: Wait to start or stop a service in correspondig action if it was in state of "STARTING" or "STOPPING"

When starting or stopping a service is possible that the service was in process to start (STARTING) or to stop (STOPPING).
With this commit the process waits until the service reaches the required state.

In my myql cookbook, when I'm trying to install mysql-server, supervised with supervisor, and create a database, the database creation fails because was unable to connect to socket.
This is because when "supervisord update" finds that a service that must be started is not, tries to start it, but not waits for this process to finish (https://github.com/Supervisor/supervisor/issues/214).