From cf6309dfa96470ac08eec419425e63e6587b1273 Mon Sep 17 00:00:00 2001 From: Aleksei Burlakov Date: Mon, 21 Oct 2024 13:10:44 +0200 Subject: [PATCH] Fix: hahealth: return fail when report failed (bsc#1231840) (#1589) This will help external applications (e.g. hawk) better understand the result of the 'crm script run health' execution. --- scripts/health/hahealth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/health/hahealth.py b/scripts/health/hahealth.py index f9a2e1dee..3c7797ece 100755 --- a/scripts/health/hahealth.py +++ b/scripts/health/hahealth.py @@ -22,7 +22,7 @@ def create_report(): if not create_report(): - crm.exit_ok({'status': 'Failed to create report'}) + crm.exit_fail({'status': 'Failed to create report'}) def extract_report(): @@ -31,7 +31,7 @@ def extract_report(): if not extract_report(): - crm.exit_ok({'status': 'Failed to extract report'}) + crm.exit_fail({'status': 'Failed to extract report'}) analysis = '' if os.path.isfile('health-report/analysis.txt'):