Hi again,
I rewrote the job transform as [1] and it should do the job.
Cheers
Thomas
[1]
JOB_TRANSFORM_NAMES = $(JOB_TRANSFORM_NAMES), ATLASX509
JOB_TRANSFORM_ATLASX509 @=end
COPY Environment OrgEnv
if isString(x509UserProxyVOName)
if regexp("atlas",unparse(x509UserProxyVOName) )
SET Environment "$(MY.OrgEnv)
TESTVAR='/cvmfs/grid.cern.ch/etc/grid-security/'"
endif
endif
@end
On 28/08/2020 15.03, Thomas Hartmann wrote:
> Hi all,
>
> I wonder, if I can run a (class ad) job transform where expresssions are
> only optionally evaluated depending on conditions.
>
> E.g., I want to set an environment variable (ideally a concatenation
> with any existing environment="new/old" ad) - but I want to inject it
> only for certain DNs.
>
> (eval) setting a fix environment like in [1] works - where to comply
> with the Else-case I set fall back to "".
>
> In the end, I am more looking for some kind of 'continue' ala [2.a] -
> but I am not sure, if it is actually possible?
>
> I tried also evaluating the condition into different expressions as in
> [2.b], but Condor complained about the transformation being malformed.
> So, I am suspecting, that it might be a limitation of the class ad
> transformation style?
> (going to try to rewrite it as native condor)
>
> Cheers,
> Thomas
>
>
> [1]
> JOB_TRANSFORM_NAMES = $(JOB_TRANSFORM_NAMES), CMSX509
> JOB_TRANSFORM_CMSX509 @=end
> [
> eval_set_environment = ifThenElse( \
> x509UserProxyVOName == "cms", \
> ("X509_CERT_DIR=/cvmfs/grid.cern.ch/etc/grid-security/"), \
> "" \
> );
> ]
> @end
>
>
>
> [2.a]
> [
> ifThenElse(\
> x509UserProxyVOName == "cms", \
>
> eval_set_environment=("X509_CERT_DIR_IF=/cvmfs/grid.cern.ch/etc/grid-security/"),\
> CONTINUE \
> );
> ]
>
> [2.b]
> [
> ifThenElse(\
> x509UserProxyVOName == "cms", \
> eval_set_environment =
> ("X509_CERT_DIR_IF=/cvmfs/grid.cern.ch/etc/grid-security/"), \
> eval_set_environment =
> ("X509_CERT_DIR_ELSE=/cvmfs/grid.cern.ch/etc/grid-security/") \
> );
> ]
>
>
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/
>
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature