X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=policy.py;h=77cf76e2b6097110d53a56ba73efc86cc3de27ee;hb=40884a302bf204a7f42044b72d87f9431ad6dd35;hp=fe54863c8d41a6a4198d378cd232ce7b9eed6ce3;hpb=32e64e33bc81735e22024c5a44510848bb3c88df;p=monitor.git diff --git a/policy.py b/policy.py index fe54863..77cf76e 100755 --- a/policy.py +++ b/policy.py @@ -91,6 +91,7 @@ def main(hostnames, sitenames): # if it is offline and HAS a PCU, then try to use it. if nodehist.haspcu and nodehist.status in ['offline', 'down'] and \ changed_greaterthan(nodehist.last_changed,1.0) and \ + not nodehist.firewall and \ not found_between(recent_actions, 'try_reboot', 3.5, 1): sitehist.attemptReboot(host) @@ -100,6 +101,7 @@ def main(hostnames, sitenames): # will be false for a day after the above condition is satisfied if nodehist.haspcu and nodehist.status in ['offline', 'down'] and \ changed_greaterthan(nodehist.last_changed,1.5) and \ + not nodehist.firewall and \ found_between(recent_actions, 'try_reboot', 3.5, 1) and \ not found_within(recent_actions, 'pcufailed_notice', 3.5): @@ -108,7 +110,7 @@ def main(hostnames, sitenames): sitehist.sendMessage('pcufailed_notice', hostname=host) print "send message for host %s PCU Failure" % host - if nodehist.status == 'monitordebug' and \ + if nodehist.status == 'failboot' and \ changed_greaterthan(nodehist.last_changed, 1) and \ not found_between(recent_actions, 'bootmanager_restore', 0.5, 0): # send down node notice @@ -127,7 +129,7 @@ def main(hostnames, sitenames): if nodehist.firewall and not found_within(recent_actions, 'firewall_notice', 3.5): # send down node notice - email_exception(host, "firewall_notice") + #email_exception(host, "firewall_notice") sitehist.sendMessage('firewall_notice', hostname=host) print "send message for host %s down" % host