From f39b695a38d891e17403c1c604d0246a5b2837b1 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Wed, 27 Jul 2011 18:02:46 +0200 Subject: [PATCH] Fix group verification of offline nodes Commit aef59ae7 reworked the file verification, but forgot to take into account offline nodes. The fact that this was not detected yet is due to the fact that we don't test clusters with offline nodes in QA :( Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 6b8da0c25..41ba0e49c 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -1988,7 +1988,7 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors): @param all_nvinfo: RPC results """ - node_names = frozenset(node.name for node in nodeinfo) + node_names = frozenset(node.name for node in nodeinfo if not node.offline) assert master_node in node_names assert (len(files_all | files_all_opt | files_mc | files_vm) == @@ -2007,6 +2007,9 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors): fileinfo = dict((filename, {}) for filename in file2nodefn.keys()) for node in nodeinfo: + if node.offline: + continue + nresult = all_nvinfo[node.name] if nresult.fail_msg or not nresult.payload: -- GitLab