From ceb76b36bf554e7ecce86fd09491cf2b388ab765 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 10 Apr 2008 10:18:43 +0000
Subject: [PATCH] Verify: remove useless check in _VerifyInstance

The list of instances passed to _VerifyInstance is the one coming from
self.cfg.GetInstanceList(). So there's no point, inside that function, in
checking whether the current instance is a member of that list. Moreover
orphaned instance verification is already done in a separate step.

Reviewed-by: imsnah
---
 lib/cmdlib.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 07f34e621..f8654d0e5 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -685,12 +685,6 @@ class LUVerifyCluster(NoHooksLU):
     """
     bad = False
 
-    instancelist = self.cfg.GetInstanceList()
-    if not instance in instancelist:
-      feedback_fn("  - ERROR: instance %s not in instance list %s" %
-                      (instance, instancelist))
-      bad = True
-
     node_current = instanceconfig.primary_node
 
     node_vol_should = {}
-- 
GitLab