BM now recognizes two distinct forms of 'debug' mode.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 21 Apr 2008 18:34:24 +0000 (18:34 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Mon, 21 Apr 2008 18:34:24 +0000 (18:34 +0000)
1) 'dbg' comes from failing to reach 'boot' state.
2) 'diag' comes from an admin explicitly setting the node to
'diagnostic'/'debug' mode.

Previously there was no way to tell the diff.  And, users trying to
reconfigure their machines, would reboot the node, but not reset the boot
state through the gui.  The result would be that the machine would pull the
current boot state from PLC (which happened to be debug from previous
failures) and the node would appear to the user to still be broken.  THis adds
unnecessary time to the support@ list in mis-understanding what's going on for the
user, when everything is actually in place on the node; it's just in the wrong
boot state.

Thus, having BM automatically try to perform the 'bootRun()' when in 'dbg'
state will prevent a correct configuration from stalling the node from coming
online.  In this way, we have moved the requirement for setting the boot state
through the GUI by the user to BM.

I think this is preferrable.

source/BootManager.py

index 6429af5..1d59243 100755 (executable)
@@ -253,7 +253,7 @@ class BootManager:
         NodeRunStates['inst'] = _newRun
         NodeRunStates['rins'] = _rinsRun
         NodeRunStates['boot'] = _bootRun
-        NodeRunStates['dbg']  = _debugRun
+        NodeRunStates['dbg']  = _bootRun   # should always try to boot.
         NodeRunStates['diag']  = lambda : _debugRun('diag')
         NodeRunStates['disable']  = lambda : _debugRun('disable')
 
@@ -307,8 +307,8 @@ def main(argv):
                      'inst':None,
                      'rins':None,
                      'boot':None,
-                                        'diag':None,
-                                        'disable':None,
+                     'diag':None,
+                     'disable':None,
                      'dbg':None}
 
     # set to 1 if error occurred