Skip to content

Commit

Permalink
Merge pull request #47773 from caesarxuchao/fix-upgrade
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kubernetes Submit Queue authored Jun 21, 2017
2 parents 8316bbc + 986164e commit 5ca33f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cluster/validate-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ while true; do
componentstatuses=$(echo "${cs_status}" | grep -c 'Healthy:') || true
healthy=$(echo "${cs_status}" | grep -c 'Healthy:True') || true

if ((componentstatuses > healthy)); then
if ((componentstatuses > healthy)) || ((componentstatuses == 0)); then
if ((attempt < 5)); then
echo -e "${color_yellow}Cluster not working yet.${color_norm}"
attempt=$((attempt+1))
Expand All @@ -170,7 +170,7 @@ while true; do
done

echo "Validate output:"
kubectl_retry get cs
kubectl_retry get cs || true
if [ "${return_value}" == "0" ]; then
echo -e "${color_green}Cluster validation succeeded${color_norm}"
else
Expand Down

0 comments on commit 5ca33f5

Please sign in to comment.