From 01ca33b90a28b5bcb64ded68c13e4f608a35ec78 Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Thu, 3 Sep 2026 11:48:16 -0400 Subject: [PATCH] Run estshoot if cluster is not green --- salt/manager/tools/sbin/soup | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index b1d8c416e..a1302f6e8 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -331,15 +331,20 @@ check_pillar_items() { } check_cluster_health() { + # Require a 'green' cluster before upgrading echo "Checking Elasticsearch cluster health." - # Require a 'green' cluster before upgrading; anything less (yellow, red, or - # unreachable) blocks. Modeled on the wait used in so-elasticsearch-roles-load. if so-elasticsearch-query "_cluster/health?wait_for_status=green&timeout=120s" --fail > /dev/null 2>&1; then printf "\nThe Elasticsearch cluster is healthy (green). We can proceed with SOUP.\n\n" - else - printf "\nThe Elasticsearch cluster is not green. Please resolve the cluster health issue so the cluster is green before running SOUP again.\n\n" - exit 0 + return fi + + if command -v so-elasticsearch-troubleshoot > /dev/null 2>&1; then + printf "\nRunning so-elasticsearch-troubleshoot for additional detail.\n" + so-elasticsearch-troubleshoot || true + fi + + printf "\nThe Elasticsearch cluster is not green. Resolve the cluster health issue so the cluster is green before running SOUP again.\n\n" + exit 0 } check_fleet_server() {