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

Re: [HTCondor-users] regexp in if clauses and Group* information availability



Hello Thomas,
apparently you have a spurious blank here: '? :'


-bash-4.2$ condor_status -lim 1 -comp -af 'regexp("\/cms\/Role=lcgadmin","\/cms\/Role=lcgadmin" ?: "")'
false
-bash-4.2$ condor_status -lim 1 -comp -af 'regexp("\/cms\/Role=lcgadmin","/cms/Role=lcgadmin" ?: "")' ÂÂ
true


Stefano

On 18/03/22 14:42, Thomas Hartmann wrote:
Hi all,

I am currently refactoring our grid cluster's accounting & GROUP_SORT
code and just stumbled over two things.

Apparently, a regexp() _expression_ cannot be used in a transform's
if-clause directly, or? I tried to use the function like in [1] but run
into an error

 > (1370.0) job_transforms: ERROR applying transform DESYAccounting
(err=-3,rval=-1,msg=regexp("\/cms\/Role=lcgadmin",x509UserProxyFQAN ? :
"") is not a valid if condition)

I guess that the _expression_ would have to be stored first in an ad, or?
(btw: how can I actually use a boolean as a case condition? `if boolad`
or `if eval(boolad)` seem not to work)

The other thing is, that I tried to prepare the GROUP_SORT ranking
already in the job transformation, but the evaluation of the Group*
details returns an error.
The current usage ads like `GroupResourcesInUse` or `GroupQuota` make
probably no sense in a transformation, as they exists only during the
matching cycle, or?

Cheers,
  Thomas


[1]

JOB_TRANSFORM_AcctTuning @=end

...

if regexp("\/cms\/Role=lcgadmin",x509UserProxyFQAN ? : "")
  SET DESYAcctGroup = "group_OPS"
  SET GROUP_SORT_EXPR = 0.001
  SET GROUPFOO = eval(GroupResourcesInUse/GroupQuota + 3.0)

...

@end

_______________________________________________
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/