summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-07-07 16:39:07 +0200
committerLuke Meyer <lmeyer@redhat.com>2017-07-11 13:33:24 -0400
commitc630e6dbd29e80ad57cb230244fe1cb830a891aa (patch)
tree1f83c33efdc1c46db87c8512dc746c10903b9e80
parente1c3499ad16f332d7684fb2eb896f980740c95b7 (diff)
downloadopenshift-c630e6dbd29e80ad57cb230244fe1cb830a891aa.tar.gz
openshift-c630e6dbd29e80ad57cb230244fe1cb830a891aa.tar.bz2
openshift-c630e6dbd29e80ad57cb230244fe1cb830a891aa.tar.xz
openshift-c630e6dbd29e80ad57cb230244fe1cb830a891aa.zip
Only store failures that were not ignored.
In the past, health checks were implemented with ignore_errors: True in the playbook level, requiring us to store all failures, ignored or not, so that we could report on all failed checks. Now checks are run from a single action plugin entry point, without ignoring errors (all errors are aggregated via the action plugin). Since the integration of the openshift_health_checker role with the install playbook, failure summaries are part of the output of a lot more calls to ansible-playbook. We shall report only failures that caused the execution to stop, as ignored failures in the summary only serve to confuse users.
-rw-r--r--roles/openshift_health_checker/callback_plugins/zz_failure_summary.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py b/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
index 64c29a8d9..443b76ea1 100644
--- a/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
+++ b/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
@@ -39,7 +39,8 @@ class CallbackModule(CallbackBase):
def v2_runner_on_failed(self, result, ignore_errors=False):
super(CallbackModule, self).v2_runner_on_failed(result, ignore_errors)
- self.__failures.append(dict(result=result, ignore_errors=ignore_errors))
+ if not ignore_errors:
+ self.__failures.append(dict(result=result, ignore_errors=ignore_errors))
def v2_playbook_on_stats(self, stats):
super(CallbackModule, self).v2_playbook_on_stats(stats)