# clean up stray 'locfg' processes that hang around inappropriately...
ps ax | grep locfg | grep -v grep | awk '{print $1}' | xargs -r kill || :
+${MONITOR_SCRIPT_ROOT}/policy.py $DATE
+
echo "Archiving pkl files"
#########################
# Archive pkl files.
return True
# Read persistent flags, tagged on one week intervals.
- #pflags = PersistFlags(hostname, 3*60*60*24, db='debug_persistflags')
if config and not config.quiet: print "...downloading dmesg from %s" %hostname
dmesg = conn.get_dmesg()
def main():
meta_sites = ['canarie', 'rnp', 'jgn2', 'i2', 'tp', 'princeton', 'princetondsl', 'plcolo', 'wide']
l_blacklist = [ "grouse.hpl.hp.com", "planet1.att.nodes.planet-lab.org"]
- #l_blacklist = database.dbLoad("l_blacklist")
l_sitelist = []
count = 0
# for each prefix above
print "Found %d nodes" % count
print "Found %d sites " % len(l_sitelist)
- database.dbDump("l_blacklist")
if __name__=="__main__":
main()
from monitor import database
from monitor import parser as parsermodule
from monitor import reboot
+from monitor.database.info.model import *
from monitor.wrapper import plc
api = plc.getAuthAPI()
os.system("./findbad.py --cachenodes --increment --nodelist %s" % file)
# TODO: shouldn't we reload the node list now?
-l_blacklist = database.if_cached_else(1, "l_blacklist", lambda : [])
+q_blacklist = BlacklistRecord.query.all()
+l_blacklist = [ n.hostname for n in q_blacklist ]
# commands:
i = 1
count = 1
from monitor.wrapper import rt
from monitor.wrapper import plc
from monitor.policy import *
+from monitor.database.info.model import *
api = plc.getAuthAPI()
if len(l_nodes) == 0:
raise Exception("No such host: %s" % hostname)
- l_blacklist = database.if_cached_else(1, "l_blacklist", lambda : [])
- l_ticket_blacklist = database.if_cached_else(1,"l_ticket_blacklist",lambda : [])
+ q_blacklist = BlacklistRecord.query.all()
+ l_blacklist = [ n.hostname for n in q_blacklist ]
l_nodes = filter(lambda x : not x['hostname'] in l_blacklist, l_nodes)
if len(l_nodes) == 0:
raise Exception("Host removed via blacklist: %s" % hostname)