#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
-# $Id: policy.py,v 1.4 2006/11/14 19:20:13 faiyaza Exp $
+# $Id: policy.py,v 1.6 2007/01/10 20:08:44 faiyaza Exp $
#
# Policy Engine.
POLSLEEP = 7200
# Where to email the summary
-SUMTO = "pupadm@lists.planet-lab.org"
+SUMTO = "faiyaza@cs.princeton.edu"
TECHEMAIL="tech-%s@sites.planet-lab.org"
PIEMAIL="pi-%s@sites.planet-lab.org"
SLICEMAIL="%s@slices.planet-lab.org"
#Thresholds (DAYS)
SPERDAY = 86400
-PITHRESH = 1 * SPERDAY
+PITHRESH = 2 * SPERDAY
SLICETHRESH = 5 * SPERDAY
# Days before attempting rins again
RINSTHRESH = 5 * SPERDAY
logger.info("POLICY: acted %s on %s days ago" % (node,
delta // SPERDAY))
+
+ # If no luck with tech, email PI
+ if (delta >= 1):
+ target.append(PIEMAIL % loginbase)
# If more than PI thresh, but less than slicethresh
if (delta >= PITHRESH) and (delta < SLICETHRESH):
- target.append(PIEMAIL % loginbase)
#remove slice creation if enough nodes arent up
if not self.enoughUp(loginbase):
slices = plc.slices(loginbase)