update call to wait_for_salt_minion with new options in so-functions

This commit is contained in:
m0duspwnens
2023-10-19 15:58:50 -04:00
parent 37e803917e
commit dfcbbfd157

View File

@@ -1258,7 +1258,7 @@ generate_ssl() {
# if the install type is a manager then we need to wait for the minion to be ready before trying
# to run the ssl state since we need the minion to sign the certs
if [[ "$install_type" =~ ^(EVAL|MANAGER|MANAGERSEARCH|STANDALONE|IMPORT|HELIXSENSOR)$ ]]; then
wait_for_salt_minion
wait_for_salt_minion "$MINION_ID" "5" "$setup_log" || fail_setup
fi
info "Applying SSL state"
logCmd "salt-call state.apply ssl -l info"
@@ -2494,20 +2494,6 @@ wait_for_file() {
return 1
}
wait_for_salt_minion() {
retry 60 5 "journalctl -u salt-minion.service | grep 'Minion is ready to receive requests'" >> "$setup_log" 2>&1 || fail_setup
local attempt=0
# each attempts would take about 15 seconds
local maxAttempts=20
until check_salt_minion_status; do
attempt=$((attempt+1))
if [[ $attempt -gt $maxAttempts ]]; then
fail_setup
fi
sleep 10
done
}
verify_setup() {
info "Verifying setup"
set -o pipefail