X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=bootman.py;h=e8dc7b89dae9d55d71115a520c8587e7a980ec5c;hb=90b2e8e7cb145cb1f6b3780867617084441b6ca9;hp=0e13517d64ebd738b76742c031e826116179747e;hpb=421b55faed17105ea5a139fac6f5f09263b1de06;p=monitor.git diff --git a/bootman.py b/bootman.py index 0e13517..e8dc7b8 100755 --- a/bootman.py +++ b/bootman.py @@ -36,13 +36,6 @@ from Rpyc import SocketConnection, Async from Rpyc.Utils import * fb = None -def get_fbnode(node): - global fb - if fb is None: - fb = database.dbLoad("findbad") - fbnode = fb['nodes'][node]['values'] - return fbnode - class NodeConnection: def __init__(self, connection, node, config): self.node = node @@ -314,7 +307,7 @@ def reboot(hostname, config=None, forced_action=None): # NOTE: Nothing works if the bootcd is REALLY old. # So, this is the first step. - fbnode = get_fbnode(hostname) + fbnode = FindbadNodeRecord.get_latest_by(hostname=hostname).to_dict() if fbnode['category'] == "OLDBOOTCD": print "...NOTIFY OWNER TO UPDATE BOOTCD!!!" args = {}