changed some error messages
This commit is contained in:
parent
0a6926c0d6
commit
1ad4690a2a
@ -74,7 +74,8 @@ if [[ "$diff_app" == "$diff_chart" || "$update_all_apps" == "true" ]]; then #con
|
|||||||
else # if status was not STOPPED, stop the app prior to updating
|
else # if status was not STOPPED, stop the app prior to updating
|
||||||
echo_array+=("\n$app_name")
|
echo_array+=("\n$app_name")
|
||||||
[[ "$verbose" == "true" ]] && echo_array+=("Stopping prior to update..")
|
[[ "$verbose" == "true" ]] && echo_array+=("Stopping prior to update..")
|
||||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && SECONDS=0 || echo_array+=("FAILED")
|
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null || echo_array+=("Error: Failed to stop $app_name")
|
||||||
|
SECONDS=0
|
||||||
while [[ "$status" != "STOPPED" ]]
|
while [[ "$status" != "STOPPED" ]]
|
||||||
do
|
do
|
||||||
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
|
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
|
||||||
@ -117,7 +118,8 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
|
|||||||
if [[ "$status" == "ACTIVE" ]]; then
|
if [[ "$status" == "ACTIVE" ]]; then
|
||||||
if [[ "$startstatus" == "STOPPED" ]]; then
|
if [[ "$startstatus" == "STOPPED" ]]; then
|
||||||
[[ "$verbose" == "true" ]] && echo_array+=("Returing to STOPPED state..")
|
[[ "$verbose" == "true" ]] && echo_array+=("Returing to STOPPED state..")
|
||||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && echo_array+=("Stopped")|| echo_array+=("FAILED")
|
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
|
break
|
||||||
else
|
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 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||||
@ -137,8 +139,8 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
|
|||||||
echo_array+=("If this is a slow starting application, set a higher timeout with -t")
|
echo_array+=("If this is a slow starting application, set a higher timeout with -t")
|
||||||
echo_array+=("If this applicaion is always DEPLOYING, you can disable all probes under the Healthcheck Probes Liveness section in the edit configuration")
|
echo_array+=("If this applicaion is always DEPLOYING, you can disable all probes under the Healthcheck Probes Liveness section in the edit configuration")
|
||||||
echo_array+=("Reverting update..")
|
echo_array+=("Reverting update..")
|
||||||
midclt call chart.release.rollback "$app_name" "{\"item_version\": \"$rollback_version\"}" &> /dev/null
|
midclt call chart.release.rollback "$app_name" "{\"item_version\": \"$rollback_version\"}" &> /dev/null || { echo_array+=("Error: Failed to rollback $app_name") ; break ; }
|
||||||
[[ "$startstatus" == "STOPPED" ]] && failed="true" && after_update_actions && unset failed #run back after_update_actions function if the app was stopped prior to update
|
[[ "$startstatus" == "STOPPED" ]] && failed="true" && after_update_actions #run back after_update_actions function if the app was stopped prior to update
|
||||||
echo "$app_name,$new_full_ver" >> failed.txt
|
echo "$app_name,$new_full_ver" >> failed.txt
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user