From 039e003af6cb8ca0e1f8d87b340f91adf57aebaf Mon Sep 17 00:00:00 2001 From: Ta-Ching Chen Date: Sun, 11 Mar 2018 23:17:05 +0800 Subject: [PATCH] Always retry for function pod specialization when istio feature is enabled. (#536) --- executor/poolmgr/gp.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/executor/poolmgr/gp.go b/executor/poolmgr/gp.go index 7fe4df9d..9defde3b 100644 --- a/executor/poolmgr/gp.go +++ b/executor/poolmgr/gp.go @@ -445,14 +445,15 @@ func (gp *GenericPool) specializePod(pod *apiv1.Pod, metadata *metav1.ObjectMeta // Receive response with non-200 http code if err == nil { err = fission.MakeErrorFromHTTP(resp2) - // The istio-proxy block all http requests until it's ready - // to serve traffic. Retry if istio feature is enabled. - if gp.useIstio { - retry = true - } } - if retry { + // The istio-proxy block all http requests until it's ready + // to serve traffic. Retry if istio feature is enabled. + if gp.useIstio { + retry = true + } + + if retry && i < maxRetries-1 { time.Sleep(500 * time.Duration(2*i) * time.Millisecond) log.Printf("Error connecting to pod (%v), retrying", err) continue