[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Running a HOOK_JOB_EXIT



On 06/16/2011 04:42 PM, Colin Leavett-Brown wrote:
Running Condor 7.6.1 under Scientific Linux 5.5

I am trying to run HOOK_JOB_EXIT at the conclusion of my job, but it
appears that the hook is never run. I have created a simple job whose
output file (x.out) accurately details my problem:

[crlb@elephant condor]$ cat x.out
1. The job script:
#!/bin/bash
echo 1. The job script:
cat condor_exec.exe

echo
echo 2. Hook config:
grep -i HOOK /etc/condor/condor_config

echo
echo 3. Permissions on the hook:
ls -l /usr/local/bin/munin-node-condor-job-exit

echo
echo 4. The hook:
cat /usr/local/bin/munin-node-condor-job-exit

echo
echo 5. Test run of the hook:
/usr/local/bin/munin-node-condor-job-exit

echo
echo 6. Job exit should produce a second line of output from the hook:

2. Hook config:
# Job hooks
HOOK_JOB_EXIT = /usr/local/bin/munin-node-condor-job-exit

3. Permissions on the hook:
-rwxr-xr-x 1 root root 102 Jun 16 13:18
/usr/local/bin/munin-node-condor-job-exit

4. The hook:
#!/usr/bin/perl
open(DD, ">>x.out");
print DD "Executing munin-node-condor-job-exit\n";
close(DD);

5. Test run of the hook:
Executing munin-node-condor-job-exit

6. Job exit should produce a second line of output from the hook:
[crlb@elephant condor]$

But it doesn't! Any suggestions greatly appreciated.

You should look in the StartLog/StarterLog to see if there is any indication that your hook was run. I would expect it is, unless there's a permissions issue (maybe a world writable dir in the script's path).

The second invocation of the hook may not be writing to the file you're expecting.

Best,


matt