Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] kill exprs with job props
- Date: Mon, 05 Dec 2005 15:16:20 -0600
- From: Derek Wright <wright@xxxxxxxxxxx>
- Subject: Re: [Condor-users] kill exprs with job props
On Mon, 5 Dec 2005 15:57:05 -0500 (EST) Douglas L Thain wrote:
> I want to do something like this:
> PREEMPT = ( if suspended ) && ( suspend time > JobMaxSuspend )
> Where JobMaxSuspend is defined in the *job's* classad.
right. no problem with that.
> Different users have different tolerances for suspension,
> so changing the machine's default suspend time doesn't help me.
that's why you're referring to a job attribute. that's how these
policy expressions were designed... you can refer to attributes from
either the machine or the job without doing anything special.
> Is there any hidden difficulty here?
>
> The only wrinkles that I see are:
>
> A - Users may decline to define +JobMaxSuspend=n in their submit files.
> This can be addressed by adding to SUBMIT_EXPRS in the local environment.
> Flocked users will run into trouble if they haven't defined it.
you could probably get it to use "(JobMaxSuspend =?= UNDEFINED)" to
avoid these troubles. something like:
PREEMPT = (if suspended) &&
( ((JobMaxSuspend =!= UNDEFINED) && (suspend time > JobMaxSuspend))
|| ((JobMaxSuspend =?= UNDEFINED) && (suspend time > ConfigMaxSuspend)) )
that way, you don't have to worry about SUBMIT_EXPRS or flocking.
> B - Users can "cheat" by defining arbitrarily long JobMaxSuspend times.
> To solve this, we need max() and min(), which require ?: conditionals
> from NewClassAds. However, the effects of such "cheating" are
> minimal (swap space and a few pids consumed) and can be monitored
> administratively.
indeed.
> Did I get that right, or is there something else to worry about?
seems you got it right. i can't think of any other problems...
good luck,
-derek