Skip to content
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

OwnCloud doesn't automatically start with Rock-On service restart #1132

Closed
schakrava opened this Issue Jan 27, 2016 · 2 comments

Comments

Projects
None yet
1 participant

@schakrava schakrava added the bug label Jan 27, 2016

@schakrava schakrava self-assigned this Jan 27, 2016

@schakrava schakrava added this to the Kilauea Iki milestone Jan 27, 2016

@schakrava

This comment has been minimized.

Copy link
Member Author

schakrava commented Feb 12, 2016

The reason is combination of the docker restart policy we use and how apps exit out. Here's the doc about restart-policies: https://docs.docker.com/engine/reference/run/#restart-policies-restart

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.

@schakrava

This comment has been minimized.

Copy link
Member Author

schakrava commented Feb 12, 2016

Change default restart policy to unless-stopped

@schakrava schakrava closed this in d16ae59 Feb 18, 2016

schakrava added a commit that referenced this issue Feb 18, 2016

Merge pull request #1170 from schakrava/1132_docker_restart_policy
change docker restart policy to unless-stopped. Fixes #1132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.