From 234d8af066db708fa8d28af074cc9001cbfe4b45 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 19 May 2009 22:58:02 +0100
Subject: [PATCH] Don't consider offline nodes as N+1 failed

This is just a cosmetic (I hope) change; the nodes shouldn't be used
anyway, and we only correct the display message.
---
 Ganeti/HTools/Cluster.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ganeti/HTools/Cluster.hs b/Ganeti/HTools/Cluster.hs
index e3753cc16..4bbed2eab 100644
--- a/Ganeti/HTools/Cluster.hs
+++ b/Ganeti/HTools/Cluster.hs
@@ -203,7 +203,7 @@ those nodes.
 computeBadItems :: NodeList -> InstanceList ->
                    ([Node.Node], [Instance.Instance])
 computeBadItems nl il =
-  let bad_nodes = verifyN1 $ Container.elems nl
+  let bad_nodes = verifyN1 $ filter (not . Node.offline) $ Container.elems nl
       bad_instances = map (\idx -> Container.find idx il) $
                       sort $ nub $ concat $
                       map (\ n -> (Node.slist n) ++ (Node.plist n)) bad_nodes
-- 
GitLab