From e2fbe59b7c6ee956739b64edab1b8e8691c591c3 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 14 Aug 2020 10:30:01 -0400 Subject: [PATCH] additional logging --- setup/so-functions | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 14c0fd671..2a34dd0a9 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1374,12 +1374,14 @@ check_service_status() { local service_name=$1 echo "Checking service $service_name status" >> "$setup_log" 2>&1 - systemctl status $service_name >> "$setup_log" 2>&1 + systemctl status $service_name > /dev/null 2>&1 local status=$? #true service is running false if not if [ $status -gt 0 ]; then + echo "$service_name is running" >> "$setup_log" 2>&1 status=1 else + echo "$service_name is not running" >> "$setup_log" 2>&1 status=0 fi @@ -1389,10 +1391,11 @@ check_service_status() { check_salt_master_status() { echo "Checking if we can talk to the salt master" >> "$setup_log" 2>&1 - salt-call state.show_top >> "$setup_log" 2>&1 + salt-call state.show_top > /dev/null 2>&1 local status=$? #true if there is an issue talking to salt master if [ $status -gt 0 ]; then + echo "Cannot talk to salt master" >> "$setup_log" 2>&1 status=1 else status=0 @@ -1408,6 +1411,7 @@ check_salt_minion_status() { local status=$? #true if there is an issue getting a job response from the minion if [ $status -gt 0 ]; then + echo "Not receiving job response from salt minion" >> "$setup_log" 2>&1 status=1 else status=0 @@ -1459,6 +1463,8 @@ salt_checkin() { done + #sleep 15; + LOOP_COUNT=0 while ! check_salt_master_status; do echo "salt minion cannot talk to salt master" >> "$setup_log" 2>&1