global sleep to 10, proper loop check for stopped
This commit is contained in:
parent
984b51e6b0
commit
5511cbde46
@ -172,19 +172,21 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
|
||||
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
|
||||
if [[ "$status" == "ACTIVE" ]]; then
|
||||
if [[ "$startstatus" == "STOPPED" ]]; then
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$verbose" == "true" ]] && echo_array+=("Returing to STOPPED state..")
|
||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null || { echo_array+=("Error: Failed to stop $app_name") ; break ; }
|
||||
echo_array+=("Stopped")
|
||||
break
|
||||
else
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||
echo_array+=("Active")
|
||||
break #if reports active any time after the first loop, assume actually active.
|
||||
fi
|
||||
elif [[ "$status" == "STOPPED" ]]; then
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Stopped..") && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Stopped..") && sleep 10 && continue #if reports stopped on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports stopped on FIRST time through loop, double check
|
||||
echo_array+=("Stopped")
|
||||
break #if reports stopped any time after the first loop, assume its extermal services.
|
||||
elif [[ "$SECONDS" -ge "$timeout" && "$status" == "DEPLOYING" ]]; then
|
||||
@ -212,7 +214,7 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
|
||||
fi
|
||||
else
|
||||
[[ "$verbose" == "true" ]] && echo_array+=("Waiting $((timeout-SECONDS)) more seconds for $app_name to be ACTIVE")
|
||||
sleep 15
|
||||
sleep 5
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user