-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
restarting supervisor fails #47
Comments
FYI this is the implementation of restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n "$DODTIME" ] && sleep $DODTIME
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;; As you can see, it calls |
I've updated my original proposal with the actual code to use. Should I make a PR for this? |
PR ready to be merged: #48 |
@tersmitten any chance this will be addressed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current handler implementation fails "sometimes" because Ansible will not call:
but will call something like this instead:
service supervisor stop && service supervisor start
This will fail "sometimes" because supervisor programs (and supervisor itself) are not completely stopped when
service supervisor stop
returns. Then, whenservice supervisor start
is called immediately, it will fail.See this post: https://stackoverflow.com/questions/32738415/supervisor-fails-to-restart-half-of-the-time
It can be fixed by rewriting the restart handler this way:
Edit: the proposal above does not work as expected yet. I'll edit it when I can confirm it works.Another solution might be to call
service supervisor restart
using the Ansibleshell
module.The text was updated successfully, but these errors were encountered: