From e52b0aa0ddab557f71fffcd4ab031cecfedf5478 Mon Sep 17 00:00:00 2001 From: Madhura Mande Date: Wed, 17 Aug 2022 04:03:17 -0600 Subject: [PATCH] CORTX-33787: [v0.9.0][2.0.0-880] Kafka errors UNKNOWN_TOPIC_OR_PART during build deployment - re-raise the exception in order to properly propagate the script return code to caller Signed-off-by: Madhura Mande --- ha/k8s_setup/ha_setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ha/k8s_setup/ha_setup.py b/ha/k8s_setup/ha_setup.py index 32636731..f1b4f120 100644 --- a/ha/k8s_setup/ha_setup.py +++ b/ha/k8s_setup/ha_setup.py @@ -337,15 +337,19 @@ def process(self): except TypeError as type_err: Log.error(f'HA config command failed: Type mismatch: {type_err}.\n') sys.stderr.write(f'HA config command failed: Type mismatch: {type_err}.\n') + raise except yaml.YAMLError as exc: Log.error(f'HA config command failed: Invalid yaml configuration: {exc}.\n') sys.stderr.write(f'Ha config failed. Invalid yaml configuration: {exc}.\n') + raise except OSError as os_err: Log.error(f'HA config command failed: OS_error: {os_err}.\n') sys.stderr.write(f'HA Config failed. OS_error: {os_err}.\n') + raise except Exception as c_err: Log.error(f'HA config command failed: {c_err}.\n') sys.stderr.write(f'HA config command failed: {c_err}.\n') + raise def _add_cluster_component_health(self) -> None: """