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

Re: [HTCondor-users] JOB TRANSFORM Questions

There isn't any need to use evalset for TestAcctGroup.  If you set it as an expression, it will still get set before
the evalset of TestAccountingGroup, and will thus be defined. 

That being said,  you may not want to shove an expression into the job.  In that case you need to control the order of
the evalset statements.  You can control the order of evaluation by using the native transform syntax directly. 

Have a look at the Schedd log on startup, and you will see that you transform is being converted
into native syntax.    That syntax is evaluated top down, unlike the job-router style syntax that you
are currently using. 

If your transform does not start with [  then it will be parsed as the native syntax. So your config could look like this

JOB_TRANSFORM_AssignGroup @=end
        NAME AssignGroup
        COPY Owner TestAcctGroupUser
        COPY TestAcctGroup RequestedAcctGroup
        SET TestPartition "group_LOCAL"
        EVALSET TestAcctGroup usermap("Groups",TestAcctGroupUser,TestAcctGroup)
        EVALSET TestAccountingGroup strcat(TestPartition, ".", TestAcctGroup, ".",  TestAcctGroupUser)

The native syntax is described in a bit more detail by the condor_transform_ads tool.  run

condor_transform_ads -help rules

to see the rules. 


-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Chris Brew - UKRI STFC
Sent: Wednesday, October 16, 2019 8:47 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] JOB TRANSFORM Questions


Iâm trying to our horrible nested IfThenElse statements that set up our hierarchical accounting groups with a nice clean JOB_TRANSFORM.

Naively I started with:

 JOB_TRANSFORM_AssignGroup @=end
set_TestPartition = "group_LOCAL";
eval_set_TestAcctGroup = usermap("Groups",TestAcctGroupUser,TestAcctGroup); 
eval_set_TestAccountingGroup = strcat(TestPartition, ".", TestAcctGroup, ".", TestAcctGroupUser);

but TestAccountingGroup always got set to âundefinedâ because TestAcctGroup was âundefinedâ when it was evaluated.

Iâve âsolvedâ it by setting TestAccountingGroup in a second transform, but is there a cleaner way of controlling which order the eval_sets get evaluated?

That works to set TestAccountingGroup to the default for that user but if I try to select a non-default group I still get the default:

The config is:

CLASSAD_USER_MAPFILE_Groups = /etc/condor/maps/local_user_map
# Assign groups automatically
JOB_TRANSFORM_AssignGroup @=end
set_TestPartition = "group_LOCAL";
eval_set_TestAcctGroup = usermap("Groups",TestAcctGroupUser,TestAcctGroup);

JOB_TRANSFORM_AccountingGroup @=end
eval_set_TestAccountingGroup = strcat(TestPartition, ".", TestAcctGroup, ".", TestAcctGroupUser);

The map file has:

$ grep brew /etc/condor/maps/local_user_map
 *  brew CMS,ATLAS

The Job definition has:

$ grep TestAcctGroup testjob
+TestAcctGroup         = "ATLAS"

But the eventual job classad has:

RequestedAcctGroup = "ATLAS"
TestAccountingGroup = "group_LOCAL.CMS.brew"
TestAcctGroup = "CMS"
TestAcctGroupUser = "brew"
TestPartition = "group_LOCAL"

Can anyone see what Iâve done wrong?

Many Thanks,

Dr Chris Brew
Scientific Computing Manager
Particle Physics Department
UKRI - STFC - Rutherford Appleton Laboratory
Harwell Oxford,
OX11 0QX
+44 1235 446326 

HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: