From a1b51d9165ae4bc4768deb3cc433f925ecb44020 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 29 Jan 2015 15:50:46 -0800 Subject: [PATCH] Maybe make services e2e test more resilient to GCE errors --- cluster/gce/util.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 35fc22e72da..73b04772b9f 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -727,7 +727,11 @@ function test-teardown { function ssh-to-node { local node="$1" local cmd="$2" - gcloud compute ssh --ssh-flag="-o LogLevel=quiet" --project "${PROJECT}" --zone="${ZONE}" "${node}" --command "${cmd}" + for try in $(seq 1 5); do + if gcloud compute ssh --ssh-flag="-o LogLevel=quiet" --project "${PROJECT}" --zone="${ZONE}" "${node}" --command "${cmd}"; then + break + fi + done } # Restart the kube-proxy on a node ($1)