You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we use on-failure:5. So when the docker service starts, if a container exited with non-zero code, it will be restarted up to 5 times or until it starts successfully -- whichever happens first. This doesn't seem to be working well because the exit code is set by the app and so, not standardized. For example, say owncloud and btsync rock-ons are both running. If the service is stopped, owncloud is gracefully exits with exitcode 0, where as btsync exits with 137. And when the service started again, the current restart policy start btsync but not owncloud, because of it's graceful exit(even as we just turn off the docker/rock-on service).
On the other extreme, we have btsync which always seem to exit with exitcode 137, whether it's stopped explicitly or if the service is stopped. So btsync always starts up upon docker service start.
I think a better docker restart policy to use is unless-stopped. This policy is independent of exit codes that are set by individual apps. And those that are explicitly stopped will not be attempted to start again on docker service start whereas those that were not stopped explicitly will be. The one side effect to note is that, docker will attempt restart forever, though doubling pause time between each attempt. I think this is fine.
See (2) in http://forum.rockstor.com/t/rock-on-service-restart-issues/979
The text was updated successfully, but these errors were encountered: