thwart wrong reporting
This commit is contained in:
parent
5a90763961
commit
e91fd6d2d2
@ -256,21 +256,23 @@ if [[ $rollback == "true" ]]; then
|
|||||||
else
|
else
|
||||||
if [[ "$startstatus" == "STOPPED" ]]; then
|
if [[ "$startstatus" == "STOPPED" ]]; then
|
||||||
status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' | grep ""$app_name"," | awk -F ',' '{print $2}')
|
status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' | grep ""$app_name"," | awk -F ',' '{print $2}')
|
||||||
while [[ "$status" != "STOPPED" ]]
|
while [[ "0" != "1" ]]
|
||||||
do
|
do
|
||||||
(( count++ ))
|
(( count++ ))
|
||||||
[[ "$count" -ge 2 ]] && status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' | grep ""$app_name"," | awk -F ',' '{print $2}') #Skip first status check, due to the one directly above it.
|
[[ "$count" -ge 2 ]] && status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' | grep ""$app_name"," | awk -F ',' '{print $2}') #Skip first status check, due to the one directly above it.
|
||||||
if [[ "$status" == "STOPPED" ]]; then
|
if [[ "$status" == "STOPPED" ]]; then
|
||||||
echo "Stopped"
|
[[ "$count" -le 1 ]] && echo "Verifying Stopped.." && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
||||||
|
[[ "$count" -ge 2 ]] && echo "Stopped" && break #assume actually stopped anytime AFTER the first loop
|
||||||
break
|
break
|
||||||
elif [[ "$status" == "ACTIVE" ]]; then
|
elif [[ "$status" == "ACTIVE" ]]; then
|
||||||
|
[[ "$count" -le 1 ]] && echo "Verifying Active.." && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||||
[[ "$verbose" == "true" ]] && echo "Returing to STOPPED state.."
|
[[ "$verbose" == "true" ]] && echo "Returing to STOPPED state.."
|
||||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && echo "Stopped"|| echo "FAILED"
|
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && echo "Stopped"|| echo "FAILED"
|
||||||
break
|
break
|
||||||
elif [[ "$SECONDS" -ge "$timeout" ]]; then
|
elif [[ "$SECONDS" -ge "$timeout" ]]; then
|
||||||
echo "Error: Run Time($SECONDS) has exceeded Timeout($timeout)"
|
echo "Error: Run Time($SECONDS) has exceeded Timeout($timeout)"
|
||||||
break
|
break
|
||||||
elif [[ "$status" != "STOPPED" ]]; then
|
else
|
||||||
[[ "$verbose" == "true" ]] && echo "Waiting $((timeout-SECONDS)) more seconds for $app_name to be ACTIVE"
|
[[ "$verbose" == "true" ]] && echo "Waiting $((timeout-SECONDS)) more seconds for $app_name to be ACTIVE"
|
||||||
sleep 10
|
sleep 10
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user