burnin: do not use drained nodes
authorIustin Pop <iustin@google.com>
Tue, 10 Feb 2009 14:46:15 +0000 (14:46 +0000)
committerIustin Pop <iustin@google.com>
Tue, 10 Feb 2009 14:46:15 +0000 (14:46 +0000)
This patch updates burnin not to use drained nodes (similar to the
handling of offline nodes).

Reviewed-by: imsnah

tools/burnin

index 4af980b..e4924ea 100755 (executable)
@@ -323,13 +323,13 @@ class Burner(object):
     else:
       names = []
     try:
-      op = opcodes.OpQueryNodes(output_fields=["name", "offline"],
+      op = opcodes.OpQueryNodes(output_fields=["name", "offline", "drained"],
                                 names=names, use_locking=True)
       result = self.ExecOp(op)
     except errors.GenericError, err:
       err_code, msg = cli.FormatError(err)
       Err(msg, exit_code=err_code)
-    self.nodes = [data[0] for data in result if not data[1]]
+    self.nodes = [data[0] for data in result if not (data[1] or data[2])]
 
     result = self.ExecOp(opcodes.OpDiagnoseOS(output_fields=["name", "valid"],
                                               names=[]))