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

Re: [HTCondor-users] Job Transform question



Hi Todd,

 

That works perfectly, thank you!

 

Tom

 

From: Todd L Miller <tlmiller@xxxxxxxxxxx>
Date: Friday, 13 October 2023 at 17:53
To: Thomas Birkett - STFC UKRI via HTCondor-users <htcondor-users@xxxxxxxxxxx>
Cc: condor-users@xxxxxxxxxxx <condor-users@xxxxxxxxxxx>, Birkett, Thomas (STFC,RAL,SC) <thomas.birkett@xxxxxxxxxx>
Subject: Re: [HTCondor-users] Job Transform question

> This transform maps the DockerImage ClassAd to the name of the Docker
> image given the ClassAd NordugridQueue, this logic has workedfor when we
> have a single queue or two queues. However I wish to expand this logic
> in the future as we will likely have more than 2 NordugridQueueʼs. Is
> there a way to define more than 2 IfThenElse mapping statements or is
> there a more sensible logic to use in this example, almost like a
> mapping list? We wish to map different Docker images to different queues
> coming from our NorduGrid CEʼs.

         You can next ifThenElse()s:

ifThenElse( NordugridQueue =?= "EL7", "[name of docker image]",
         ifThenElse( NordugridQueue =?= "EL8", "[name of other image]", "" )
)

but this obviously gets tedious amazingly quickly.  You can instead use
mapfiles:

EVALSET DockerImage = usermap( "nordugrid_queues_map", NordugridQueue,
         "missing-default", ""
)

See https://htcondor.readthedocs.io/en/latest/classads/classad-mechanism.html
for details and how to configure HTCondor to know what the
"nordugrid_queues_map" is.  Because the usermap is intended to determine
which group a user is in, you should avoid commas in the right-most column
and not include the "missing-default" text anywhere in the mapfile; this
will ensure that the value you want -- the empty string -- is returned if
somebody specifies a NordugridQueue that's not in the map file.

-- ToddM