Commit 729164d0 authored by Iustin Pop's avatar Iustin Pop
Browse files

burnin: do not use offline nodes

This patch makes burnin skip the offline nodes in it's builtin node
selection. It also removes an extra line.

Reviewed-by: imsnah
parent 94a02bb5
......@@ -231,13 +231,13 @@ class Burner(object):
else:
names = []
try:
op = opcodes.OpQueryNodes(output_fields=["name"], names=names)
op = opcodes.OpQueryNodes(output_fields=["name", "offline"], names=names)
result = self.ExecOp(op)
except errors.GenericError, err:
err_code, msg = cli.FormatError(err)
Log(msg)
sys.exit(err_code)
self.nodes = [data[0] for data in result]
self.nodes = [data[0] for data in result if not data[1]]
result = self.ExecOp(opcodes.OpDiagnoseOS(output_fields=["name", "valid"],
names=[]))
......@@ -452,7 +452,6 @@ class Burner(object):
Log("- Remove instance %s" % instance)
self.ExecOp(op)
def Rename(self):
"""Rename the instances."""
rename = self.opts.rename
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment