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

Re: [HTCondor-users] easiest way for an user to override schedd configuration?



I think the problem you have is that you need to get the  $$() expression to parse as a classad expression
at submit time, so it can be substituted correctly when the jobs is matched.

That means unfortunately that  $$() expressions can only be used in strings. 

What you did looks ok to me, but I might change it to this

MachineScalingFactor = ifThenElse(isUndefined(TARGET.ScalingFactor), 1.00, TARGET.ScalingFactor)

It will still not get flattened to a single integer value in your job ad, since the value needs to change as you match different machines
but it will operate correctly. 

So what you did should work fine unless the intent is to *capture* the machine's ScalingFactor value and still be able to see it
after the job exits.

If that is what you want, you could just put "" around the $$() expression like this.
 
MachineScalingFactor = "$$([ifThenElse(isUndefined(ScalingFactor),1.00, ScalingFactor)])"

-tj


-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of jcaballero.hep@xxxxxxxxx
Sent: Tuesday, March 24, 2020 7:26 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] easiest way for an user to override schedd configuration?

El lun., 23 mar. 2020 a las 16:05, Todd L Miller
(<tlmiller@xxxxxxxxxxx>) escribiÃ:
>
> > what would be the recommended way for a user to override a given
> > variable in the schedd configuration at submit time?
> > Is still LOCAL_CONFIG_DIR a valid way to point to user specific setup?
>
>         The schedd's configuration is not (AFAIK) user-specific, even if
> it were changed at every submit, so no, not really.  Individual users can
> set configuration in ~/.condor/user_config*, and condor_submit will
> respect those seetings, but I don't think that will help.  What are you
> trying to accomplish?
>
> - ToddM
>
> *: the default value of USER_CONFIG_FILE
>


Hi

I will try to answer again. Yesterday, my message was blocked.

First, using ~/.condor/user_config worked.
We have a piece of configuration in one schedd that is preventing
users from submitting jobs, so I wanted to play with that variable,
but as an unprivileged account, not as root.
And here is the problem [1], in case someone has any tip, before I
open a ticket as suggested.
Indeed, I managed to submit a job by changing that variable a little
bit in my local file [2]. However, it is not resolved in the classad
[3]. Is that expected? Or that means it is still not being set
properly?

Cheers,
Jose


[1]
$ rpm -qa | grep condor
condor-8.6.13-1.el7.x86_64
condor-classads-8.6.13-1.el7.x86_64
condor-external-libs-8.6.13-1.el7.x86_64
condor-python-8.6.13-1.el7.x86_64
condor-procd-8.6.13-1.el7.x86_64
condor-classads-blah-patch-0.0.1-1.el7.centos.x86_64


$ condor_submit test.jdl
ERROR: Parse error in expression:
MachineScalingFactor = $$([ifThenElse(isUndefined(ScalingFactor),
1.00, ScalingFactor)])
Error in config file SUBMIT_ATTRS or SUBMIT_EXPRS value. Aborting submit.


$ condor_config_val -dump | grep ScalingFactor
MachineScalingFactor = $$([ifThenElse(isUndefined(ScalingFactor),1.00,
ScalingFactor)])
SUBMIT_EXPRS =  MachineScalingFactor,JobLeaseDuration


[2]
$ cat ~/.condor/user_config
MachineScalingFactor = ifThenElse(isUndefined(ScalingFactor), 1.00,
ScalingFactor)

[3]
$ condor_q -l 1.0 | grep ScalingFactor
MachineScalingFactor = ifThenElse(isUndefined(ScalingFactor),1.0,ScalingFactor)

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