-
Notifications
You must be signed in to change notification settings - Fork 42
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
Clean shutdown #60
Comments
That's pretty serious. I'll look into this the next time I have some free time. We intentionally don't use |
This may be less serious than it seemed. Looking at One small remaining concern is if mongod happens to take longer than 10s to shut down in some cases and gets killed instead. The log below is from an empty database that's not really being used. It only took 6ms to shut down. I also looked at another database under light load (2 APs and a couple dozen clients) and it took 200ms to shut down. Seems unlikely to be an issue for home use.
|
The Unifi Controller doesn't appear to get shut down cleanly and I'm concerned about database corruption (like happens on the 1st gen cloudkey).
It looks like docker-compose just sends a SIGTERM followed by a SIGKILL 10 seconds later:
The upstream unifi init script goes through a multi-phase shutdown process, starting with
jsvc
, then creating/var/run/unifi/server.stop
if jsvc fails, then finally killingace.jar
and telling mongodb to shut down. I've attached unifi.init (extracted from the .deb) since I can't find it anywhere else online.This project does it a slightly different way:
https://github.com/jacobalberty/unifi-docker#multi-process-container
https://github.com/jacobalberty/unifi-docker/blob/master/docker-entrypoint.sh#L9
Everything does exit cleanly if I run:
The text was updated successfully, but these errors were encountered: