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

Re: [Condor-users] Forbid SlotID use in submit files?

On Mon, Apr 20, 2009 at 08:40:42AM -0500, Matthew Farrellee wrote:
> >> If jobs do have a SlotID, you're golden. If not, and jobs only
> >> references the SlotID in their Requirements expressions, you have the
> >> right idea with TARGET but that specific use wouldn't work.
> > 
> > Could you please explain why?
> > 
> Because TARGET in a START expression gives you access to attributes on
> the Job. Cmd, Arguments, Owner and Requirements are attributes on a Job.
> SlotID isn't. SlotID is likely just used within your Requirements
> expressions. So you need to check for it there.

OK, now I got it. (I might have found out myself using condor_q -long.)

Here's an example:
# condor_q -long 385204.349 | grep -i slotid
Requirements = ((SlotID == 1)) && (Arch == "X86_64") && (OpSys == "LINUX") && ...
RemoteSlotID = 1

The existence of RemoteSlotID (and other Remote.* attributes) shows that the
job is already running... 

> >> You could use regexp instead, e.g. START = regexp(".*SlotID.*",
> >> Requirements), but that might get slow.
> You can disallow use of SlotID with the regexp in START, though be
> careful how general your expression is, .*SlotID.* will match a lot of
> things but won't match slotid.

You want to say 'Better use regexp(".*slotid.=.*", Requirements, "ix")'?
At least that would cope with lower/upper case, white space, and ==/!=,
and at the moment I don't fear false positives.

I'm going for
	START = (regexp(".*slotid.=.*", Requirements, "ix") == False)