[gridengine users] Signal sent to processes on requeue
Hugh Macdonald
hugh.macdonald at nvizible.com
Wed Feb 1 10:21:29 UTC 2012
Thanks Ben and Reuti,
I think (and I was reading up more on this after sending my initial
email) that using prologs and epilogs will actually do exactly what I'm
after - it's not so much specific job cleanup, as sending messages for
job start/finish, which needs to happen on absolutely everything.
One question I did have about prolog/epilog scripts was how they deal
with exit codes... The prolog script would, on the whole, exit with a
code of 0, but how about the epilog? If the main job script exits with,
say, 99, will the epilog run, and should that also return 99, or will
Grid see the job script's 99 exit code, and still reschedule, even
though the epilog script returns 0?
Hugh Macdonald
*n**vizible**– **VISUAL EFFECTS*
hugh.macdonald at nvizible.com <mailto:hugh.macdonald at nvizible.com>
+44(0) 20 3167 3860
+44(0) 7773 764 708
www.nvizible.com <http://www.nvizible.com/>
On 31/01/12 23:27, Reuti wrote:
> Am 31.01.2012 um 23:10 schrieb Ben De Luca:
>
>> http://gridscheduler.sourceforge.net/htmlman/htmlman5/queue_conf.html
>> terminate_method
> This will be used in case you issue `qdel`.
>
> Not for a normal termination.
>
> -- Reuti
>
>
>> looks like it might be simplest.
>>
>>
>>
>> On Tue, Jan 31, 2012 at 9:51 PM, Ben De Luca<bdeluca at gmail.com> wrote:
>>> Strangely im pondering this issue at the moment. If a python process
>>> is killed any process started with subprocess does not die.
>>>
>>> The two methods im following,
>>>
>>> 1. a reaper, the grid job starts a python process (parent) that starts
>>> two other jobs, the task, and the reaper.
>>> A. The task is the process I want to run.
>>> B. The reaper, sits waiting to see if the parent python process
>>> disappears, if it does it cleans up process A.
>>>
>>> When Parent sees A finishes normally it kills B.
>>> If Parent is killed B kills A.
>>>
>>> 2. I think an epilog can be run to clean up.
>>>
>>>
>>> On Tue, Jan 31, 2012 at 8:00 PM, Hugh Macdonald
>>> <hugh.macdonald at nvizible.com> wrote:
>>>> Hi,
>>>>
>>>> I've got a python script here that is run through Grid. When I requeue the
>>>> job, I want to catch the signal in the script, to do a bit of cleanup before
>>>> exiting. I don't seem to be able to catch the signal, making me assume that
>>>> it's SIGKILL that is being sent. Am I right in this assumption, and, if so,
>>>> is there any way to change it to SIGTERM?
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> Hugh Macdonald
>>>> nvizible – VISUAL EFFECTS
>>>>
>>>> hugh.macdonald at nvizible.com
>>>> +44(0) 20 3167 3860
>>>> +44(0) 7773 764 708
>>>>
>>>> www.nvizible.com
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at gridengine.org
>>>> https://gridengine.org/mailman/listinfo/users
>>>>
>> _______________________________________________
>> users mailing list
>> users at gridengine.org
>> https://gridengine.org/mailman/listinfo/users
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gridengine.org/pipermail/users/attachments/20120201/0fb6463e/attachment.html>
More information about the users
mailing list