From 934bf51fe9a7c2275d52db283384033c5f10cb03 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 11 Feb 2015 12:41:11 -0500 Subject: [PATCH] Fix polling in e2e-suite/update.sh: exit if we time out Also reduce the number of iterations to 20 --- hack/e2e-suite/update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hack/e2e-suite/update.sh b/hack/e2e-suite/update.sh index c147492e48c..b37e0be9ef0 100755 --- a/hack/e2e-suite/update.sh +++ b/hack/e2e-suite/update.sh @@ -42,9 +42,14 @@ function validate() { # Container turn up on a clean cluster can take a while for the docker image pull. local num_running=0 local i=0 - while [[ ${num_running} -ne ${num_replicas} && ${i} -ne 100 ]]; do + while [[ ${num_running} -ne ${num_replicas} ]]; do ((i++)) || true - echo "Waiting for all containers in pod to come up. Currently: ${num_running}/${num_replicas}" + if [[ ${i} -eq 20 ]]; then + echo "Timed out waiting for all containers in pod to come up. (Reached ${num_running}/${num_replicas})" + exit -1 + fi + + echo "Waiting for all containers in pod to come up. Currently: ${num_running}/${num_replicas} @ attempt ${i}" sleep 2 local pod_id_list