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

Re: [HTCondor-users] Copying Token attributes

Is the intent here to cause expressions to be evaluated?


You might try this


 REQUIREMENTS AuthTokenSubject =!= undefined
 EVALSET AuthTokenId $(MY.AuthTokenId)
 EVALSET AuthTokenIssuer $(MY.AuthTokenIssuer)
 EVALSET AuthTokenSubject $(MY.AuthTokenSubject)



for instance, if the job has


 AuthTokenSubject = strcat(Owner," subject")
Owner = "bob"


before the transform,  then the transform will expand to


EVALSET AuthTokenSubject strcat(Owner,"foo")

And will have


 AuthTokenSubject = "bob subject"


after the transform




From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Stefano Dal Pra
Sent: Monday, March 21, 2022 5:29 AM
To: htcondor-users <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Copying Token attributes



I'm using the following JOB_ROUTER_PRE_ROUTE_TRANSFORM in a HTCondor-CE to copy the AuthToken* attributes
into the Classad of the routedjob:

 REQUIREMENTS MY.AuthTokenSubject =!= undefined
 EVALSET RAuthTokenId AuthTokenId  
 EVALSET RAuthTokenIssuer AuthTokenIssuer  
 EVALSET RAuthTokenSubject AuthTokenSubject  
 EVALSET RAuthTokenIssuer AuthTokenIssuer  

Note the capital R in RAuthTokenId and the others. Fact is that i wasn't able to just copy the attribute with
its original name, so i had to alter the attribute names.

All the attempts i made did fail:
EVALSET AuthTokenSubject AuthTokenSubject
EVALSET AuthTokenSubject MY.AuthTokenSubject

EVALSET TARGET.AuthTokenSubject MY.AuthTokenSubject

EVALSET TARGET.AuthTokenSubject AuthTokenSubject

Is there any way to keep the original name?