Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] Programmatically setting START expr
- Date: Fri, 8 Apr 2005 10:28:17 +0100
- From: Matt Hope <matthew.hope@xxxxxxxxx>
- Subject: Re: [Condor-users] Programmatically setting START expr
On Apr 8, 2005 10:00 AM, filipdef@xxxxxxxxxxxxxxxxx
<filipdef@xxxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I would like to put something in my gui that allows people
> to switch between different start policies of condor
> (typical use when doing some rush renders and wanting
> to be able to set a machine to always on so that
> when you bump the mouse you don't accidentally kick
> off a render / you can open up task manager and take
> a look from time to time).
>
> I tried the following:
>
> cirque-1:~ # /opt/condor/6_7_5/bin/condor_config_val Start
> True
> cirque-1:~ # /opt/condor/6_7_5/bin/condor_config_val -rset "Start = FALSE"
> Successfully set configuration "Start = FALSE" on master
> cirque-1.cirquedigital.com <127.0.0.2:1978>.
>
> But it doesn't seem to update the value, not even
> after condor_reconfig:
>
> cirque-1:~ # /opt/condor/6_7_5/bin/condor_config_val Start
> True
> cirque-1:~ # /opt/condor/6_7_5/sbin/condor_reconfig
> Sent "Reconfig" command to local master
> cirque-1:~ # /opt/condor/6_7_5/bin/condor_config_val Start
> True
>
> Does anybody know how to do this ?
try
condor_config_val -startd -rset "Start = FALSE"
It's not terribly clear if the reconfig is needed for rset? or if it
works for persisted values
if not then you could try something like:
condor_config_val -startd -set "OldStart = ${START}"
condor_reconfig
condor_config_val -startd -set "START = <whatever>"
condor_reconfig
the later
condor_config_val -startd -set "START = ${OldStart}"
This may not work though since you may simply end up with the line
OldStart = Start
rather than
OldStart = <whatever start was>
This could be worked around with a script which evaluated START,
copied the result X to another command condor_config_val -set
"OldStart = ${X}"
depends how complicated you want to make it.
I set up my team with the following condor_config.local settings
# work between 8am and 8pm Monday to Friday
AllowJobOverrun = True
HappyToRunAlways = False
OnHoliday = False
WorkHours = (( (ClockMin >= 480 && ClockMin < 1200) && (ClockDay > 0
&& ClockDay < 6) ) && ( $(OnHoliday) == False ))
START = $(START) && ( $(HappyToRunAlways) || $(WorkHours) == False )
PREEMPT= ( ($(HappyToRunAlways) == False ) && ( $(AllowJobOverrun) ==
False) && $(WorkHours) )
then they simply alter AllowJobOverrun, HappyToRunAlways, OnHoliday as needed
and issue a condor_reconfig...
Matt