-
Notifications
You must be signed in to change notification settings - Fork 4
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
Kill megacron with the megacrond command #51
Comments
Proposal: (I'm going to take at implementing this within the next few days) kill with megacrond -k, edit main.py to take the -k command, and upon that we run read_pid_from_pidfile(/var/run/megacron.pid), then use os.kill(pid,SIGINT). |
Sounds good! I don't know if SIGINT on a single pid will take care of all of the instances (which may be desirable), but do some experimentation! |
I am unable to reproduce this issue. Why doesn't "killall megacrond" work? |
I received the message johns-mbp:megacron johntanner$ sudo killall On Wed, Apr 9, 2014 at 7:23 AM, Ben Zeghers [email protected]:
|
What are the steps to reproduce this issue? If the name of the process
|
Steps are:
NOTE The process belonging to johntanner is probably from an earlier, On Wed, Apr 9, 2014 at 9:59 AM, Ben Zeghers [email protected]:
|
This issue doesn't happen on megacron-one.wmflabs.org. It must be specific to OS X or your system. Does "sudo pkill -f megacrond" work for you? |
That works. I am on Mac OS X Mavericks 10.9.2 On Wed, Apr 9, 2014 at 10:52 AM, Ben Zeghers [email protected]:
|
I still think we should have a unified command for stopping the daemon. Is On Wed, Apr 9, 2014 at 11:00 AM, John Tanner [email protected] wrote:
|
It seems that killall and pkill only match the process name by default on OS X. Since our daemon is running though the Python interpreter the process name is python and megacrond is in the arguments. On Linux it will match the process name or the arguments and the -f flag for pkill will do this on OS X too. I just wanted to know what was causing this issue and why it was only happening sometimes before we decide how to solve it. Given what we now know if you still think that this is the best solution, then go ahead and implement it. As John mentioned before there is an issue with my daemon implementation that multiple can be run at a time. When multiple start they overwrite the PID file which isn't good. The library seems to have code that throws an error if the file already exists but it will have to be investigated why this isn't working. |
There should be a graceful way to kill megacron, as illustrated by John's issue with getting rid of the daemon.
The text was updated successfully, but these errors were encountered: