Don't consider offline nodes as N+1 failed
authorIustin Pop <iustin@google.com>
Tue, 19 May 2009 21:58:02 +0000 (22:58 +0100)
committerIustin Pop <iustin@google.com>
Tue, 19 May 2009 21:59:10 +0000 (22:59 +0100)
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

index e3753cc..4bbed2e 100644 (file)
@@ -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