Commit 5ca33f51 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #47773 from caesarxuchao/fix-upgrade

Automatic merge from submit-queue fix validate-cluster.sh attempt to fix #47379. Without this fix, the validate-cluster.sh never retries if `kubectl-retry get cs` fails. cc @dchen1107
parents 8316bbc1 986164e7
...@@ -153,7 +153,7 @@ while true; do ...@@ -153,7 +153,7 @@ while true; do
componentstatuses=$(echo "${cs_status}" | grep -c 'Healthy:') || true componentstatuses=$(echo "${cs_status}" | grep -c 'Healthy:') || true
healthy=$(echo "${cs_status}" | grep -c 'Healthy:True') || true healthy=$(echo "${cs_status}" | grep -c 'Healthy:True') || true
if ((componentstatuses > healthy)); then if ((componentstatuses > healthy)) || ((componentstatuses == 0)); then
if ((attempt < 5)); then if ((attempt < 5)); then
echo -e "${color_yellow}Cluster not working yet.${color_norm}" echo -e "${color_yellow}Cluster not working yet.${color_norm}"
attempt=$((attempt+1)) attempt=$((attempt+1))
...@@ -170,7 +170,7 @@ while true; do ...@@ -170,7 +170,7 @@ while true; do
done done
echo "Validate output:" echo "Validate output:"
kubectl_retry get cs kubectl_retry get cs || true
if [ "${return_value}" == "0" ]; then if [ "${return_value}" == "0" ]; then
echo -e "${color_green}Cluster validation succeeded${color_norm}" echo -e "${color_green}Cluster validation succeeded${color_norm}"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment