Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Job Transform question
- Date: Fri, 13 Oct 2023 11:52:49 -0500 (CDT)
- From: Todd L Miller <tlmiller@xxxxxxxxxxx>
- 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