Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

UDX-7058_start_script_hangs_if_pod_fails_to_restart #45

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions k8_cortx_cloud/start-cortx-cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ while true; do
IFS=" " read -r -a pod_status <<< "$line"
IFS="/" read -r -a ready_status <<< "${pod_status[1]}"
if [[ "${pod_status[2]}" != "Running" || "${ready_status[0]}" != "${ready_status[1]}" ]]; then
if [[ "${pod_status[2]}" == "Error" || "${pod_status[2]}" == "Init:Error" ]]; then
printf "\n'${pod_status[0]}' pod failed to start. Exit early.\n"
exit 1
fi
break
fi
count=$((count+1))
Expand Down Expand Up @@ -67,6 +71,10 @@ while true; do
IFS=" " read -r -a pod_status <<< "$line"
IFS="/" read -r -a ready_status <<< "${pod_status[1]}"
if [[ "${pod_status[2]}" != "Running" || "${ready_status[0]}" != "${ready_status[1]}" ]]; then
if [[ "${pod_status[2]}" == "Error" || "${pod_status[2]}" == "Init:Error" ]]; then
printf "\n'${pod_status[0]}' pod failed to start. Exit early.\n"
exit 1
fi
break
fi
count=$((count+1))
Expand Down Expand Up @@ -100,6 +108,10 @@ while true; do
IFS=" " read -r -a pod_status <<< "$line"
IFS="/" read -r -a ready_status <<< "${pod_status[1]}"
if [[ "${pod_status[2]}" != "Running" || "${ready_status[0]}" != "${ready_status[1]}" ]]; then
if [[ "${pod_status[2]}" == "Error" || "${pod_status[2]}" == "Init:Error" ]]; then
printf "\n'${pod_status[0]}' pod failed to start. Exit early.\n"
exit 1
fi
break
fi
count=$((count+1))
Expand Down Expand Up @@ -133,6 +145,10 @@ while true; do
IFS=" " read -r -a pod_status <<< "$line"
IFS="/" read -r -a ready_status <<< "${pod_status[1]}"
if [[ "${pod_status[2]}" != "Running" || "${ready_status[0]}" != "${ready_status[1]}" ]]; then
if [[ "${pod_status[2]}" == "Error" || "${pod_status[2]}" == "Init:Error" ]]; then
printf "\n'${pod_status[0]}' pod failed to start. Exit early.\n"
exit 1
fi
break
fi
count=$((count+1))
Expand Down Expand Up @@ -174,6 +190,10 @@ if [[ $num_motr_client -gt 0 ]]; then
IFS=" " read -r -a pod_status <<< "$line"
IFS="/" read -r -a ready_status <<< "${pod_status[1]}"
if [[ "${pod_status[2]}" != "Running" || "${ready_status[0]}" != "${ready_status[1]}" ]]; then
if [[ "${pod_status[2]}" == "Error" || "${pod_status[2]}" == "Init:Error" ]]; then
printf "\n'${pod_status[0]}' pod failed to start. Exit early.\n"
exit 1
fi
break
fi
count=$((count+1))
Expand Down