Hi all, I hope you are all keeping well. I’m looking at modernising some of our Job transform processes to help support future token work as well as removing large if statements. Currently we have the following [1] that selects an Accounting Group
based on some Regex query. I have attempted to replicate and simplify this config [2] however I get the following error: Parse_config if error: 'HighPrioAcctGroup == "group_HIGHPRIO" is not a valid if condition because complex conditionals are not supported' I have separated the high priority job query and standard job priority query as they are being queried against different ClassAds (Owner and x509UserProxyVOName respectively)
I have attempted to also use EVALMACRO however I don’t get much success and end up with RalAcctGroup being undefined. Also mapping form my mapfiles [3] Any help would be very gratefully received. [1] RalAcctGroup = ifThenElse(regexp("ttcms048",Owner), "group_HIGHPRIO", \ ifThenElse(regexp("pcms060",Owner), "group_HIGHPRIO", \ ifThenElse(regexp("cmssgm",Owner), "group_HIGHPRIO", \ ifThenElse(regexp("plhcb024",Owner), "group_HIGHPRIO", \ ifThenElse(regexp("tatls016",Owner), "group_HIGHPRIO", \ ifThenElse(isPreemptable =?= true, "group_PREEMPTABLE", \ ifThenElse(x509UserProxyVOName =?= "alice", "group_ALICE", \ ifThenElse(x509UserProxyVOName =?= "atlas", "group_ATLAS", \ ifThenElse(x509UserProxyVOName =?= "cms", "group_CMS", \ ifThenElse(x509UserProxyVOName =?= "lhcb", "group_LHCB", \ ifThenElse(x509UserProxyVOName =?= "dteam", "group_DTEAM_OPS", \ ifThenElse(x509UserProxyVOName =?= "ops", "group_DTEAM_OPS", \ ifThenElse(regexp("nagios",Owner), "group_OTHER", \ "group_NONLHC"))))))))))))) [2] SCHEDD_CLASSAD_USER_MAP_NAMES = $(SCHEDD_CLASSAD_USER_MAP_NAMES) HighPrioAccountMap VOAcctGroupMap VOAcctSubGroupMap CLASSAD_USER_MAPFILE_HighPrioAccountMap = /etc/condor/maps/high_prio_account_map CLASSAD_USER_MAPFILE_VOAcctGroupMap = /etc/condor/maps/vo_map CLASSAD_USER_MAPFILE_VOAcctSubGroupMap = /etc/condor/maps/vo_role_map JOB_TRANSFORM_NAMES = $(JOB_TRANSFORM_NAMES) AssignGroup JOB_TRANSFORM_AssignGroup @=end NAME AssignGroup # If job uses x509 authentication IF defined MY.x509UserProxyVOName # Start by mapping high priority users EVALSET HighPrioAcctGroup usermap("HighPrioAccountMap",Owner) IF HighPrioAcctGroup == "group_HIGHPRIO" SET RalAcctGroup HighPrioAcctGroup ELSE EVALSET RalAcctGroup usermap("VOAcctGroupMap",x509UserProxyVOName) ENDIF ENDIF @end [3] /etc/condor/maps/high_prio_account_map # Map data for high priority users * ttcms048 group_HIGHPRIO * pcms060 group_HIGHPRIO * cmssgm group_HIGHPRIO * plhcb024 group_HIGHPRIO * tatls016 group_HIGHPRIO /etc/condor/maps/vo_map # Mapping data for VO group assignment * alice group_ALICE * atlas group_ATLAS * cms group_CMS * lhcb group_LHCB * dteam group_DTEAM_OPS * ops group_DTEAM_OPS * /.*/ group_NONLHC Many thanks, Thomas Birkett Senior Systems Administrator Scientific Computing Department Science and Technology Facilities Council (STFC) Rutherford Appleton Laboratory, Chilton, Didcot |