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

[HTCondor-users] (calss ad) job transform conditionals



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/") \
);
]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature