X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=policy.py;h=7525c0d4e62933797e5022dc9011b4a8242dc966;hb=8814d16dc60e8027c9a30963b47dd77b54efcdbf;hp=7ce85db590acbb6f9db7eb2d7df113d7fa4cd169;hpb=334378a14103c3fd02332b6ce3767553f1fe11d2;p=monitor.git diff --git a/policy.py b/policy.py index 7ce85db..7525c0d 100755 --- a/policy.py +++ b/policy.py @@ -33,7 +33,7 @@ api = plc.getAuthAPI() def logic(): - plc.nodeBootState(host, 'rins') + plc.nodeBootState(host, 'reinstall') node_end_record(host) def main(hostnames, sitenames): @@ -81,12 +81,12 @@ def main(hostnames, sitenames): # if a node is offline and doesn't have a PCU, remind the user that they should have one. - if not nodehist.haspcu and nodehist.status in ['offline', 'down'] and \ - changed_greaterthan(nodehist.last_changed,1.0) and \ - not found_within(recent_actions, 'pcumissing_notice', 7.0): - - sitehist.sendMessage('pcumissing_notice', hostname=host) - print "send message for host %s pcumissing_notice" % host + #if not nodehist.haspcu and nodehist.status in ['offline', 'down'] and \ + # changed_greaterthan(nodehist.last_changed,1.0) and \ + # not found_within(recent_actions, 'pcumissing_notice', 7.0): + # + # sitehist.sendMessage('pcumissing_notice', hostname=host) + # print "send message for host %s pcumissing_notice" % host # if it is offline and HAS a PCU, then try to use it. if nodehist.haspcu and nodehist.status in ['offline', 'down'] and \