Skip to content

Commit f340218

Browse files
authored
fix case where 1 min unintended delay is added when checking for tunnel interface to come ip in pod (#472)
1 parent 82410c1 commit f340218

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/controllers/proxy/network_services_controller.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,10 +972,16 @@ func (ln *linuxNetworking) prepareEndpointForDsr(containerId string, endpointIP
972972
// TODO: this is ugly, but ran into issue multiple times where interface did not come up quickly.
973973
// need to find the root cause
974974
for retry := 0; retry < 60; retry++ {
975-
time.Sleep(1000 * time.Millisecond)
975+
time.Sleep(100 * time.Millisecond)
976976
tunIf, err = netlink.LinkByName(KUBE_TUNNEL_IF)
977+
if err == nil {
978+
break
979+
}
977980
if err != nil && err.Error() == IFACE_NOT_FOUND {
978981
continue
982+
glog.V(3).Infof("Waiting for tunnel interface %s to come up in the pod, retrying", KUBE_TUNNEL_IF)
983+
} else {
984+
break
979985
}
980986
}
981987

0 commit comments

Comments
 (0)