Commit 22f0f71d authored by Iustin Pop's avatar Iustin Pop
Browse files

cluster verify: show correctly drained nodes

This patch changes slightly the output of gnt-cluster verify for drained
nodes, and also adds a note with the total number of drained nodes
(similar to the offline nodes note).

Reviewed-by: imsnah
parent 5bf07049
......@@ -903,6 +903,7 @@ class LUVerifyCluster(LogicalUnit):
i_non_redundant = [] # Non redundant instances
i_non_a_balanced = [] # Non auto-balanced instances
n_offline = [] # List of offline nodes
n_drained = [] # List of nodes being drained
node_volume = {}
node_instance = {}
node_info = {}
......@@ -955,6 +956,9 @@ class LUVerifyCluster(LogicalUnit):
ntype = "master"
elif node_i.master_candidate:
ntype = "master candidate"
elif node_i.drained:
ntype = "drained"
n_drained.append(node)
else:
ntype = "regular"
feedback_fn("* Verifying node %s (%s)" % (node, ntype))
......@@ -1107,6 +1111,9 @@ class LUVerifyCluster(LogicalUnit):
if n_offline:
feedback_fn(" - NOTICE: %d offline node(s) found." % len(n_offline))
if n_drained:
feedback_fn(" - NOTICE: %d drained node(s) found." % len(n_drained))
return not bad
def HooksCallBack(self, phase, hooks_results, feedback_fn, lu_result):
......
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