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

[HTCondor-users] JOB TRANSFORM Questions



Hi,

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
[
copy_Owner="TestAcctGroupUser";
copy_TestAcctGroup="RequestedAcctGroup";
set_TestPartition = "group_LOCAL";
eval_set_TestAcctGroup = usermap("Groups",TestAcctGroupUser,TestAcctGroup); 
eval_set_TestAccountingGroup = strcat(TestPartition, ".", TestAcctGroup, ".", TestAcctGroupUser);
]
@end

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:

SCHEDD_CLASSAD_USER_MAP_NAMES = $(SCHEDD_CLASSAD_USER_MAP_NAMES) Groups
CLASSAD_USER_MAPFILE_Groups = /etc/condor/maps/local_user_map
# Assign groups automatically
JOB_TRANSFORM_NAMES = $(JOB_TRANSFORM_NAMES) AssignGroup AccountingGroup
JOB_TRANSFORM_AssignGroup @=end
[
copy_Owner="TestAcctGroupUser";
copy_TestAcctGroup="RequestedAcctGroup";
set_TestPartition = "group_LOCAL";
eval_set_TestAcctGroup = usermap("Groups",TestAcctGroupUser,TestAcctGroup);
]
@end

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

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,
Chris.

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