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

RE: [Condor-users] Examples or Docs for new ClassAd functions?



> I would like to make specific machines in my pool members of custom
> groups that I specify.  I'm thinking the best way to do this is to set
> the following in each condor_config.local file:
> 
> GROUPS = "SLOW", "DELL", "BLADE"
> 
> And then I would like to set a requirement in my submission files that
> tests GROUPS for any one of the contained strings, such as "DELL".  I
> read that there are some new string parsing functions in ClassAds and
> was hoping they were available and if someone could point me towards
> docs or examples of these.  I'm running version 6.7.7

Unfortunately this is not possible with any current implementation of
Condor.

You can get around it in a few ways. First, you can have N custom class
ad attribs that are your group list. This is fine you don't think you'll
ever need more than, say, three groups. So on your machine's startd
you'd have advertised:

MyGroup1 = "slow"
MyGroup2 = "dell"
MyGroup3 = "blade"

And then in your job submission ticket you could write:

Requirements = Group1 =?= "dell" || Group2 =?= "dell" || Group3 =?=
"dell"

And then your jobs would only run on machines that were in the "dell"
group. Boy is that ever ugly though! And for N > 5 or 6 you really are
entering into a world of pain when writing your requirements expression.

Maybe the better approach is to use custom attribs that aren't generic
like in the above example. So instead of "Group1 = "dell"" you have an
attrib that says "I am a dell". On your machine's startd you'd have
advertised then:

MyIsADell = (True | False)
MyIsSlow = (True | False )
MyIsBlade = (True | False )

And then you could do:

Requirements = MyIsADell =?= true

And you'd only run on things tagged as dell. If a new startd was added
to your pool and the MyIsADell tag was omitted from it's advertised
attributes this requirements statement would default that to false -- so
omitting means it isn't a dell.

Hope that helps.

- Ian