From 22f0f71df15a8c9bd8b0697cf26c16eece398b64 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 10 Feb 2009 14:46:37 +0000 Subject: [PATCH] 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 --- lib/cmdlib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index a23594fb8..2434a5bb7 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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): -- GitLab