An error in the post-commit hooks could not be propagated correctly and could
result in e.g. the return code of gnt-cluster verify to be 0 even in presence of
an error in its output.

Fixes Issue 744.

Signed-off-by: Michele Tartara <[email protected]>
---
 lib/cmdlib/cluster.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py
index c8ab390..fa45eb6 100644
--- a/lib/cmdlib/cluster.py
+++ b/lib/cmdlib/cluster.py
@@ -3262,7 +3262,7 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
             feedback_fn("%s" % output)
             lu_result = False
 
-    return lu_result
+    return lu_result and not self.bad
 
 
 class LUClusterVerifyDisks(NoHooksLU):
-- 
1.9.0.279.gdc9e3eb

Reply via email to