From 6d7b472ad8d3c2f563037a3e56c4b1f1d4c6196a Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 9 Mar 2010 15:15:40 +0100
Subject: [PATCH] Fix typo that makes cluster verify to ignore hooks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The return from LUVerifyCluster should be True (or equivalent) for pass,
and False (or equivalent) for fail. The HooksCallBack function uses '1'
(= True) when a hook fails, which is exactly the opposite of what we
want - it will make failed hooks to reset the result to success,
overriding actual failures in cluster verify.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenΓ© Nussbaumer <rn@google.com>
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 87cbf86a4..693736fbc 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -1629,7 +1629,7 @@ class LUVerifyCluster(LogicalUnit):
           if test:
             output = indent_re.sub('      ', output)
             feedback_fn("%s" % output)
-            lu_result = 1
+            lu_result = 0
 
       return lu_result
 
-- 
GitLab