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

Re: [condor-users] Stop Job from matching to the same node

On Wed, 29 Oct 2003 17:19:15 -0800  Belay T Beshah wrote:

> Is there a way to ask the negotiator not to send the job back to the
> same machine.

yes.  condor keeps track of the last machine a job ran on in the
"LastRemoteHost" ClassAd attribute.  so, you can put this in your
Requirements expression:

Requirements = (Machine =!= LastRemoteHost) && (whatever you have now)

'LastRemoteHost' will evaluate to UNDEFINED the first time your job
runs, so you want to use meta-not-equals "=!=", not regular not-equals
"!=".  the first time your job tries to get a match, any value of
'Machine' from the startd ClassAd will not equal UNDEFINED, and the
whole first clause will be true.  then, once the job runs somewhere
and is evicted, 'LastRemoteHost' will be set to the host of the last
machine where it ran, and the first clause will prevent condor from
matching it with the same host.

unfortunately, if the job gets preempted again, 'LastRemoteHost' will
be updated to the host where it was just running, which means you'll
loose the info about the *first* host where the job ran.  so, in this
way, the job *might* end up back on the same machine again.  however,
at least the above trick will prevent it from going right back to the
same place, which should solve the problem most of the time.

we're working on adding support into the job classad for a list of
hosts where the job ran.  however, until we switch over to the new
version of the ClassAd language (which has native support for lists),
lists are very hard to deal with in "old ClassAds".  so, for now,
you'll have to get by with what i described above.  i hope it helps

good luck,
-derek wright (condor team)

Condor Support Information:
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>