remove warning for ext services chart
This commit is contained in:
parent
aca0c15ecd
commit
9111b7b490
@ -186,19 +186,19 @@ update_apps(){
|
||||
if [[ $stop_before_update == "true" ]]; then # Check to see if user is using -S or not
|
||||
if [[ "$status" == "STOPPED" ]]; then # if status is already stopped, skip while loop
|
||||
echo -e "\n$app_name"
|
||||
[[ "$verbose" == "true" ]] && echo "Updating..."
|
||||
[[ "$verbose" == "true" ]] && echo "Updating.."
|
||||
cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null && echo -e "Updated\n$old_full_ver\n$new_full_ver" && after_update_actions || echo "FAILED"
|
||||
continue
|
||||
else # if status was not STOPPED, stop the app prior to updating
|
||||
echo -e "\n"$app_name""
|
||||
[[ "$verbose" == "true" ]] && echo "Stopping prior to update..."
|
||||
[[ "$verbose" == "true" ]] && echo "Stopping prior to update.."
|
||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && SECONDS=0 || echo -e "FAILED"
|
||||
while [[ "$status" != "STOPPED" ]]
|
||||
do
|
||||
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}')
|
||||
if [[ "$status" == "STOPPED" ]]; then
|
||||
echo "Stopped"
|
||||
[[ "$verbose" == "true" ]] && echo "Updating..."
|
||||
[[ "$verbose" == "true" ]] && echo "Updating.."
|
||||
cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null && echo -e "Updated\n$old_full_ver\n$new_full_ver" && after_update_actions || echo "Failed to update"
|
||||
break
|
||||
elif [[ "$SECONDS" -ge "$timeout" ]]; then
|
||||
@ -213,7 +213,7 @@ update_apps(){
|
||||
fi
|
||||
else #user must not be using -S, just update
|
||||
echo -e "\n$app_name"
|
||||
[[ "$verbose" == "true" ]] && echo "Updating..."
|
||||
[[ "$verbose" == "true" ]] && echo "Updating.."
|
||||
cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null && echo -e "Updated\n$old_full_ver\n$new_full_ver" && after_update_actions || { echo "FAILED"; continue; }
|
||||
fi
|
||||
else
|
||||
@ -237,7 +237,7 @@ if [[ $rollback == "true" ]]; then
|
||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && echo "Stopped"|| echo "FAILED"
|
||||
break
|
||||
elif [[ "$SECONDS" -ge "$timeout" && "$status" == "DEPLOYING" && "$failed" != "true" ]]; then
|
||||
echo -e "Error: Run Time($SECONDS) for $app_name has exceeded Timeout($timeout)\nIf this is a slow starting application, set a higher timeout with -t\nIf this applicaion is always DEPLOYING, you can disable all probes under the Healthcheck Probes Liveness section in the edit configuration\nReverting update..."
|
||||
echo -e "Error: Run Time($SECONDS) for $app_name has exceeded Timeout($timeout)\nIf this is a slow starting application, set a higher timeout with -t\nIf this applicaion is always DEPLOYING, you can disable all probes under the Healthcheck Probes Liveness section in the edit configuration\nReverting update.."
|
||||
midclt call chart.release.rollback "$app_name" "{\"item_version\": \"$rollback_version\"}" &> /dev/null
|
||||
[[ "$startstatus" == "STOPPED" ]] && failed="true" && after_update_actions && unset failed #run back after_update_actions function if the app was stopped prior to update
|
||||
break
|
||||
@ -245,10 +245,12 @@ if [[ $rollback == "true" ]]; then
|
||||
echo -e "Error: Run Time($SECONDS) for $app_name has exceeded Timeout($timeout)\nThe application failed to be ACTIVE even after a rollback,\nManual intervention is required\nAbandoning"
|
||||
break
|
||||
elif [[ "$status" == "STOPPED" ]]; then
|
||||
[[ "$count" -le 1 ]] && echo "Verifying Stopped.." && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
||||
echo "Error: Application appears to be stuck in stopped state" && break #if reports stopped any time after the first loop, assume its broken.
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo "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
|
||||
echo "Stopped" && break #if reports stopped any time after the first loop, assume its extermal services.
|
||||
elif [[ "$status" == "ACTIVE" ]]; then
|
||||
[[ "$count" -le 1 ]] && echo "Verifying Active.." && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo "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
|
||||
echo "Active" && break #if reports active any time after the first loop, assume actually active.
|
||||
else
|
||||
[[ "$verbose" == "true" ]] && echo "Waiting $((timeout-SECONDS)) more seconds for $app_name to be ACTIVE"
|
||||
@ -263,11 +265,13 @@ else
|
||||
(( count++ ))
|
||||
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
|
||||
[[ "$count" -le 1 ]] && echo "Verifying Stopped.." && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo "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
|
||||
echo "Stopped" && break #assume actually stopped anytime AFTER the first loop
|
||||
break
|
||||
elif [[ "$status" == "ACTIVE" ]]; then
|
||||
[[ "$count" -le 1 ]] && echo "Verifying Active.." && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo "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
|
||||
[[ "$verbose" == "true" ]] && echo "Returing to STOPPED state.."
|
||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null && echo "Stopped"|| echo "FAILED"
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user