Check cluster health before trying to load roles for ES

This commit is contained in:
weslambert
2022-03-23 11:00:26 -04:00
committed by GitHub
parent a3f8a10eb9
commit 1f2bca599f

View File

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