Add failure message to salt-master check

This commit is contained in:
William Wernert
2021-05-24 16:45:05 -04:00
parent ffd5bfc480
commit 3bc0def02a

View File

@@ -890,8 +890,10 @@ main() {
echo "Starting Salt Master service."
systemctl start salt-master
# Testing that that salt-master is up by checking that is it connected to itself
retry 50 10 "salt-call state.show_top -l error"
# Testing that salt-master is up by checking that is it connected to itself
set +e
retry 50 10 "salt-call state.show_top -l error" || fail "salt-master could not be reached. Check /root/soup.log for details."
set -e
echo ""
echo "Ensuring python modules for Salt are installed and patched."
@@ -924,9 +926,11 @@ main() {
echo "Starting Salt Master service."
systemctl start salt-master
# Testing that that salt-master is up by checking that is it connected to itself
retry 50 10 "salt-call state.show_top -l error"
# Testing that salt-master is up by checking that is it connected to itself
set +e
retry 50 10 "salt-call state.show_top -l error" || fail "salt-master could not be reached. Check /root/soup.log for details."
set -e
echo "Running a highstate. This could take several minutes."
salt-call state.highstate -l info queue=True
postupgrade_changes