From 9fc11a5c963bcf298b08c0bae1ebd58faf5b477d Mon Sep 17 00:00:00 2001 From: wvcollenburg <50706527+wvcollenburg@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:06:04 +0100 Subject: [PATCH] Fix for clusters without update history Newly installed clusters will not have a update status. This is generated during first update (/updat/update_status.json). When json file not found on all nodes in cluster the script will now assume there is no update history and continue. --- specific_task/HyperCoreDynamicBalancer/HyperCore_balancer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specific_task/HyperCoreDynamicBalancer/HyperCore_balancer.py b/specific_task/HyperCoreDynamicBalancer/HyperCore_balancer.py index 5859bf2..dcaea38 100644 --- a/specific_task/HyperCoreDynamicBalancer/HyperCore_balancer.py +++ b/specific_task/HyperCoreDynamicBalancer/HyperCore_balancer.py @@ -225,12 +225,12 @@ def is_update_active(self, all_nodes): print(f" - Info: Node {node_ip} unreachable for update check.") if is_primary: primary_check_failed = True except (requests.exceptions.RequestException, json.JSONDecodeError) as e: - print(f" - WARN: Failed get/parse update status from {node_ip}: {e}") + print(f" - Info: Failed get/parse update status from {node_ip}: {e}") if is_primary: primary_check_failed = True except Exception as e: print(f" - WARN: Unexpected error check update on {node_ip}: {e}") if is_primary: primary_check_failed = True - print(f" - WARN: Cannot determine update status from any node ({', '.join(nodes_to_check)}). Assuming active (fail-safe)."); return True + print(f" - Info: Cannot determine update status from any node. Assuming no update history present. Continue operations"); return False # --- Load Balancer Class ---