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

[Condor-users] Classads and matchmakiing



Hi,

My question relates to how one can set a job classad to select a subset of machines, when that subset may be different on a rescheduled job to what it was on original job submission. Consider this scenario: I have two groups of machines, which I define to be "RED" or BLUE". In the condor_config.local of those machines I put:

TEST_TYPE = "RED"  # or "BLUE"
STARTD_ATTRS = $(STARTD_ATTRS), TEST_TYPE

I now want to submit a job that initially can pick out either a RED or BLUE machine (but it must be one of these, not one without a TEST_TYPE defined). Furthermore, I want to make sure that if my job was to get preempted from a machine, then it can only be rescheduled to run on machine of the same TEST_TYPE that it started off on. So if it started it on a RED machine, then it can only be re-run on a RED machine, etc.

My (unsuccessful) attempt at a submit script to do this has:

+testType = "$$([TEST_TYPE])"
Requirements = (TEST_TYPE =!= UNDEFINED) && ((MY.testType =?= "") || (MY.testType =?= UNDEFINED) || (MY.testType == TEST_TYPE))

The problem is that this never matches. I was hoping that since the $$() construct only evaluates after a match has been made then either (MY.testType =?= "") or (MY.testType =?= UNDEFINED) would evaluate to true on the initial submission, with (MY.testType == TEST_TYPE) becoming true for a specific TEST_TYPE in any subsequent rescheduled event.

Apparently I'm doing something silly, so would any kind soul like to point out my mistake?

Best regards,
Mark