From 3bc0def02af00ab5741f903722f8316e68d3bfe1 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 24 May 2021 16:45:05 -0400 Subject: [PATCH] Add failure message to salt-master check --- salt/common/tools/sbin/soup | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index eb15305aa..d2b96b194 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -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