From ff8cd194f1f2adc269d7aac2a71039256ea2bd37 Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Thu, 16 Nov 2023 11:21:34 -0500 Subject: [PATCH] Make sure kibana API is up --- salt/manager/tools/sbin/soup | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index 9a2ae890d..a4bd6a4d5 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -737,10 +737,21 @@ apply_hotfix() { /usr/sbin/so-elastic-fleet-integration-policy-elastic-defend elif [[ "$INSTALLEDVERSION" == "2.4.30" ]] ; then rm -f /opt/so/conf/elastic-fleet/integrations/endpoints-initial/elastic-defend-endpoints.json - so-kibana-restart + so-kibana-restart --force . /usr/sbin/so-elastic-fleet-common + + echo "Checking to make sure that Kibana API is up & ready..." + RETURN_CODE=0 + wait_for_web_response "http://localhost:5601/api/fleet/settings" "fleet" 300 "curl -K /opt/so/conf/elasticsearch/curl.config" + RETURN_CODE=$? + if [[ "$RETURN_CODE" != "0" ]]; then + echo "Kibana API not accessible, exiting script..." + exit 1 + fi + elastic_fleet_integration_remove endpoints-initial elastic-defend-endpoints /usr/sbin/so-elastic-fleet-integration-policy-elastic-defend + salt-call state.highstate else echo "No actions required. ($INSTALLEDVERSION/$HOTFIXVERSION)" fi