From bfe7cf70e81ce59b2223e5e66d43b3379a65e0a0 Mon Sep 17 00:00:00 2001 From: Petr Balogh Date: Mon, 20 Jan 2025 17:56:27 +0100 Subject: [PATCH] Add info about failed MG to email report Signed-off-by: Petr Balogh --- ocs_ci/utility/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ocs_ci/utility/utils.py b/ocs_ci/utility/utils.py index a4e8dc1e012..fe1e4cbd552 100644 --- a/ocs_ci/utility/utils.py +++ b/ocs_ci/utility/utils.py @@ -1722,6 +1722,16 @@ def parse_html_for_email(soup): skipped[0].string.replace_with( f"{skipped_number} skipped ({skips_ceph_health_ratio * 100}% on Ceph health)" ) + from ocs.utils import mg_fail_count + + if mg_fail_count: + failed_mg_text = soup.new_tag("b") + failed_mg_text.string = ( + f"In this execution Must Gather collection has failed: {mg_fail_count} times!" + " Please check why this has happened!" + ) + main_header = soup.find("h1") + main_header.insert_after(failed_mg_text) main_header = soup.find("h1") main_header.string.replace_with("OCS-CI RESULTS")