bug fix in summary template
[monitor.git] / monitor / bootman.py
index 9fe28af..fdfadb2 100755 (executable)
@@ -488,6 +488,7 @@ class DebugInterface:
                for n in ["bminit-cfg-exception-nocfg-update-bootupdatefail-nonode-debug-done",
                                  "bminit-cfg-exception-update-bootupdatefail-nonode-debug-done",
                                  "bminit-cfg-exception-update-bootupdatefail-nonode-debug-validate-exception-done",
+                                 "bminit-cfg-exception-nocfg-update-bootupdatefail-nonode-debug-validate-exception-done",
                                  "bminit-cfg-auth-bootcheckfail-nonode-exception-update-bootupdatefail-nonode-debug-done",
                                ]:
                        sequences.update({n : "update_node_config_email"})
@@ -659,7 +660,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
        if fbnode['observed_category'] == "OLDBOOTCD":
                print "\t...Notify owner to update BootImage!!!"
 
-               if not found_within(recent_actions, 'newbootcd_notice', 3):
+               if not found_within(recent_actions, 'newbootcd_notice', 3.5):
                        sitehist.sendMessage('newbootcd_notice', hostname=hostname)
 
                        print "\tDisabling %s due to out-of-date BootImage" % hostname
@@ -701,7 +702,8 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        print "...Should investigate.  Skipping node."
                        # TODO: send message related to these errors.
 
-                       if not found_within(recent_actions, 'baddisk_notice', 3):
+                       if not found_within(recent_actions, 'baddisk_notice', 7):
+                               print "baddisk_notice not found recently"
 
                                log=conn.get_dmesg().read()
                                sitehist.sendMessage('baddisk_notice', hostname=hostname, log=log)
@@ -742,6 +744,8 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                args['sequence'] = s
                args['bmlog'] = conn.get_bootmanager_log().read()
                args['viart'] = False
+               args['saveact'] = True
+               args['ccemail'] = True
 
                sitehist.sendMessage('unknownsequence_notice', **args)
 
@@ -780,6 +784,8 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        args['sequence'] = s
                        args['bmlog'] = conn.get_bootmanager_log().read()
                        args['viart'] = False
+                       args['saveact'] = True
+                       args['ccemail'] = True
 
                        sitehist.sendMessage('unknownsequence_notice', **args)
                        conn.restart_bootmanager('boot')
@@ -787,7 +793,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                # TODO: differentiate this and the 'nodenetwork_email' actions.
                elif sequences[s] == "update_node_config_email":
 
-                       if not found_within(recent_actions, 'nodeconfig_notice', 3):
+                       if not found_within(recent_actions, 'nodeconfig_notice', 3.5):
                                args = {}
                                args['hostname'] = hostname
                                sitehist.sendMessage('nodeconfig_notice', **args)
@@ -795,7 +801,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
 
                elif sequences[s] == "nodenetwork_email":
 
-                       if not found_within(recent_actions, 'nodeconfig_notice', 3):
+                       if not found_within(recent_actions, 'nodeconfig_notice', 3.5):
                                args = {}
                                args['hostname'] = hostname
                                args['bmlog'] = conn.get_bootmanager_log().read()
@@ -804,7 +810,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
 
                elif sequences[s] == "update_bootcd_email":
 
-                       if not found_within(recent_actions, 'newalphacd_notice', 3):
+                       if not found_within(recent_actions, 'newalphacd_notice', 3.5):
                                args = {}
                                args.update(getconf.getconf(hostname)) # NOTE: Generates boot images for the user:
                                args['hostname'] = hostname
@@ -818,7 +824,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                        # require either an exception "/minhw" or other manual intervention.
                        # Definitely need to send out some more EMAIL.
                        # TODO: email notice of broken hardware
-                       if not found_within(recent_actions, 'baddisk_notice', 1):
+                       if not found_within(recent_actions, 'baddisk_notice', 7):
                                print "...NOTIFYING OWNERS OF BROKEN HARDWARE on %s!!!" % hostname
                                args = {}
                                args['hostname'] = hostname
@@ -828,7 +834,7 @@ def restore_basic(sitehist, hostname, config=None, forced_action=None):
                                conn.set_nodestate('disabled')
 
                elif sequences[s] == "update_hardware_email":
-                       if not found_within(recent_actions, 'minimalhardware_notice', 1):
+                       if not found_within(recent_actions, 'minimalhardware_notice', 7):
                                print "...NOTIFYING OWNERS OF MINIMAL HARDWARE FAILURE on %s!!!" % hostname
                                args = {}
                                args['hostname'] = hostname