have soup wait_for_salt_minion() before running any highstate

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

View File

@@ -829,7 +829,8 @@ main() {
echo "Hotfix applied" echo "Hotfix applied"
update_version update_version
enable_highstate enable_highstate
salt-call state.highstate -l info queue=True wait_for_salt_minion "$MINIONID" "5" "$SOUP_LOG" || fail "Salt minion was not running or ready."
highstate
else else
echo "" echo ""
echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION." echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION."
@@ -927,7 +928,8 @@ main() {
echo "" echo ""
echo "Running a highstate. This could take several minutes." echo "Running a highstate. This could take several minutes."
set +e set +e
salt-call state.highstate -l info queue=True wait_for_salt_minion "$MINIONID" "5" "$SOUP_LOG" || fail "Salt minion was not running or ready."
highstate
set -e set -e
stop_salt_master stop_salt_master
@@ -942,7 +944,8 @@ main() {
set -e set -e
echo "Running a highstate to complete the Security Onion upgrade on this manager. This could take several minutes." echo "Running a highstate to complete the Security Onion upgrade on this manager. This could take several minutes."
salt-call state.highstate -l info queue=True wait_for_salt_minion "$MINIONID" "5" "$SOUP_LOG" || fail "Salt minion was not running or ready."
highstate
postupgrade_changes postupgrade_changes
[[ $is_airgap -eq 0 ]] && unmount_update [[ $is_airgap -eq 0 ]] && unmount_update