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

[HTCondor-users] Hibernate and dynamic slots



Hi,

we are a VFX shop, and we have a render farm with dedicated nodes and
workstations.

We have hibernation enabled and it works very well. The idea is to power
off computers after one hour of inactivity.

Here is the expression for hibernation:

TimeToWait = 3600
HibernateState = "S5"
ShouldHibernate = ( (State == "Unclaimed") && ($(StateTimer) > $(TimeToWait) ) )

HIBERNATE = ifThenElse ( $(ShouldHibernate), $(HibernateState), "NONE" )



But now I also enabled dynamic slots on a test setup. It was easy and
works well.


My problem is that the StateTimer of the parent slot does not get reset
when a slot gets created or deleted. So computers get powered off as
soon as all the dynamic are removed. So the ShouldHibernate expression
is not accurate anymore.


I noticed the ClassAd for the machines get extra attributes related to
child slots :

NumDynamicSlots = 10
TotalSlots = 11
ChildEnteredCurrentState = { 1671125066,1671125076,[...],1671125055 }
ChildName = { "slot1_10@xxxxxxxxxxxxxxxxxxxxxx","slot1_11@xxxxxxxxxxxxxxxxxxxxxx", [...],"slot1_9@xxxxxxxxxxxxxxxxxxxxxx" }
ChildState = { "Claimed","Claimed",[...],"Claimed" }
ChildActivity = { "Busy","Busy",[...],"Busy" }


But I have two problems:

- first, I don't know how to use arrays in expressions
- second, since these attributes disappear when a slot is done, I can't use
them in an expression anyway.


What would be a nice way to detect if a machine did nothing on any slot
for one hour ?


I'm running htcondor v10.0 on Debian Linux.


Thanks for any input,


-- 
Charles