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

After terminating god, restart it using Upstart #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhaylock
Copy link

@mhaylock mhaylock commented Aug 6, 2015

During the 'god:restart' task god terminate is run - when this completes Upstart will detect this and restart god automatically. The current implementation then tries to start a non-daemonized god process (i.e. runs god -c /etc/god/god.conf) which then conflicts with the socket already reserved by the daemonized process started by Upstart.

Due to this my log file would have entries like:

Socket drbunix:///tmp/god.17165.sock already in use by another instance of god

In this PR I've change it to use start god || true which instructs Upstart to start the process if it hasn't already, and ignore it if it has already started it. With this fix in place god restart cleanly without any error messages.

This avoids Upstart trying to restart god after the `god terminate` then conflicting with the previously used direct instantiation of god (which wasn't daemonized anyway).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant