-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Exit with error if program goes fatal #733
Comments
@mcd-php I was able to achieve something similar by using an event listener as described here. My only issue now is that supervisord exits with status 0 and causes the container to exit with the same status. I was expecting status code > 128 when the listener killed supervisord. Let me know if this works for you. |
Any update on this, facing the same issue as mentioned by @misakwa |
+1 |
This is actually quite easy to achieve with a little python script:
/usr/local/bin/manage-supervisord:
For a complete Docker image doing exactly that, check my repo out: https://github.com/opsbears/docker-supervisord |
In the container world, this is a very typical scenario (i.e. you want an aborting container if anything goes wrong). Thus, I think a supervisord option like “exit if one program could not be launched” would be very helpful. |
Duplicate of #712 |
Sorry to write in an old issue but I think this could be useful to others bumping into this problem. @janoszen's script above could be replaced with:
This saves you from having a separate file and from installing Python if you don't need it from anything else. |
postgresql + filebeat + cron + supervisord = dead postgresql for whatever error in it, but still live Docker container
Is it possible to gracefully exit with error code and proper messages, if some program goes to fatal state ?
Read docs thoroughly, not found.
The text was updated successfully, but these errors were encountered: