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

Re: [HTCondor-users] Behaviour of DAGMAN_ALWAYS_RUN_POST in absence of PRE



Brian Candler wrote:

 
> Please can I just clarify from this:

http://research.cs.wisc.edu/htcondor/manual/v8.5/2_10DAGMan_Applications.html

> Suppose you don't have a PRE script, but you do have a POST script. 
Let's say DAGMAN_ALWAYS_RUN_POST is False (which is the default from 8.5.4).

DAGMAN_ALWAYS_RUN_POST only applies when a PRE script fails, so it's not relevant in this case.

> Is it true that if the DAG node fails, the POST script will still be
run? And if the POST script returns 0, the node will be treated as
successful?

Yes, that's correct.  That has been the case as long as POST scripts have existed in DAGMan.

> What I'm looking for is a simple way to say "if the DAG node fails, then
don't run the POST script, and make sure DAGman treats the node as
failed too".

Hmm -- at the present time there's no way to tell DAGMan to do that.

> At the moment, as far as I can tell, it's necessary to pass $RETURN to
the POST script, and the POST script must exit with this value if it's
non-zero.  Is that correct?

Yes, that's right.  (Actually, the POST script could exit with any non-zero exit code; it wouldn't have to be the same one as the node job exited with.)

I guess maybe we could add an option to not run the POST script if the node job fails, if enough people would find this useful.  My inclination at this point would be to make it something specified within the DAG file, rather than another config option.  And it could be specified on a per-node basis, because the "ALL_NODES" option would make it easy to specify that behavior for all nodes in your DAG if that was what you wanted.

So any other users who would find this option useful, please chime in!  The more people who want it, the higher priority it will be...

Kent Wenger
CHTC Team