god
god copied to clipboard
clean_pid_file behavior seems too naive
I am not sure what the expected behavior is, but if you restart a god-monitored process that uses :clean_pid_file directly (rather than thru god), basically what happens is that the direct restart command works, but god will immediately notice the :process_exit as well, and clean the pid file and try to restart. For some reason the restart fails, but the pid cleaning succeeds, and you end up with a running server with no pid file. Thus subsequent direct or god-based restarts of the service will FAIL as "stop" will fail since there's no valid pid file.
I'm not sure if the answer here is to have god expect that external restarts might happen and to have some kind of grace period for process_exit to see if it comes back up without intervention from god, or what.
Any advice would be appreciated; I might be able to make a patch with some more direction on the expected behavior in this situation.
I should note I am using keepalive; maybe that's part of the problem is that the default keepalive handlers don't expect this.