Merge pull request #7629 from Security-Onion-Solutions/fix/roles_load_check_cluster_health

Check ES cluster health before trying to load roles
This commit is contained in:
weslambert
2022-03-23 11:07:24 -04:00
committed by GitHub

View File

@@ -33,6 +33,8 @@ while [[ "$COUNT" -le 240 ]]; do
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
ELASTICSEARCH_CONNECTED="yes" ELASTICSEARCH_CONNECTED="yes"
echo "connected!" echo "connected!"
# Check cluster health once connected
so-elasticsearch-query _cluster/health?wait_for_status=yellow > /dev/null 2>&1
break break
else else
((COUNT+=1)) ((COUNT+=1))