X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=findbadpcu.py;h=8ebd8914806cd965cde1228b04f845a4d92a579f;hb=8e65cdcaaf08982f5f744297c009359ec74d31b5;hp=f7a3576130d33bd8c01538829f80e4cdff9aecf4;hpb=8e90984231a680415cc3f6a60f008b3029ad4548;p=monitor.git diff --git a/findbadpcu.py b/findbadpcu.py index f7a3576..8ebd891 100755 --- a/findbadpcu.py +++ b/findbadpcu.py @@ -13,9 +13,10 @@ import threadpool import threading import monitor -from monitor.pcu import reboot +from pcucontrol import reboot from monitor import config from monitor.database.info.model import FindbadPCURecordSync, FindbadPCURecord, session +from monitor import database from monitor import util from monitor.wrapper import plc, plccache from nodequery import pcu_select @@ -316,7 +317,7 @@ def checkAndRecordState(l_pcus, cohash): fbnodesync.flush() node_round = fbnodesync.round - if node_round < global_round: + if node_round < global_round or config.force: # recreate node stats when refreshed #print "%s" % nodename req = threadpool.WorkRequest(collectPingAndSSH, [pcuname, cohash], {}, @@ -415,6 +416,7 @@ if __name__ == '__main__': dbname="findbadpcus", cachenodes=False, refresh=False, + force=False, ) parser.add_option("-f", "--nodelist", dest="nodelist", metavar="FILE", help="Provide the input file for the node list") @@ -433,6 +435,8 @@ if __name__ == '__main__': help="Refresh the cached values") parser.add_option("-i", "--increment", action="store_true", dest="increment", help="Increment round number to force refresh or retry") + parser.add_option("", "--force", action="store_true", dest="force", + help="Force probe without incrementing global 'round'.") parser = parsermodule.getParser(['defaults'], parser) config = parsermodule.parse_args(parser) try: