mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-07-10 19:11:38 +02:00
give the elasticfleet state a few chances to complete successfully before exiting 1 causing so-setup to fail
This commit is contained in:
@@ -245,10 +245,17 @@ printf '%s\n'\
|
||||
|
||||
# Call Elastic-Fleet Salt State
|
||||
printf "\nApplying elasticfleet state\n"
|
||||
if ! salt-call state.apply elasticfleet queue=True; then
|
||||
printf "\nFailure(s) in elasticfleet state... Exiting...\n"
|
||||
exit 1
|
||||
fi
|
||||
for state_attempt in {1..3}; do
|
||||
if salt-call state.apply elasticfleet queue=True; then
|
||||
break
|
||||
elif [[ $state_attempt -lt 3 ]]; then
|
||||
printf "\nElasticfleet state did not complete successfully... Attempt (%s/3). Retrying...\n" "$state_attempt"
|
||||
sleep 10
|
||||
else
|
||||
printf "\nFailure(s) in elasticfleet state... Exiting...\n"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Generate installers & install Elastic Agent on the node
|
||||
for agent_gen_attempt in {1..3}; do
|
||||
|
||||
Reference in New Issue
Block a user