From 2226b56941f179969f67d3049d6500cab1fad45c Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Tue, 1 Nov 2022 17:04:13 +0800 Subject: [PATCH] add log and modify timeout Signed-off-by: zhangxiaoyu (cherry picked from commit 1022c22aa6b830c9064e840a57363c507f82cb50) --- ...-timeout-wait-backend-to-frontend-complete.patch | 13 +++++++------ kubernetes.spec | 5 ++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/0009-timeout-wait-backend-to-frontend-complete.patch b/0009-timeout-wait-backend-to-frontend-complete.patch index cf23958..a410e17 100644 --- a/0009-timeout-wait-backend-to-frontend-complete.patch +++ b/0009-timeout-wait-backend-to-frontend-complete.patch @@ -1,24 +1,25 @@ -From 99ca0fbb527b3c3137d8ea16aa82db009517adf0 Mon Sep 17 00:00:00 2001 +From dda1aed8f9655c9cac813a3633b27bacdce9af88 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Tue, 1 Nov 2022 15:34:16 +0800 Subject: [PATCH] timeout wait backend to frontend complete Signed-off-by: zhangxiaoyu --- - pkg/kubelet/cri/streaming/remotecommand/proxy.go | 5 +++++ - 1 file changed, 5 insertions(+) + pkg/kubelet/cri/streaming/remotecommand/proxy.go | 6 ++++++ + 1 file changed, 6 insertions(+) diff --git a/pkg/kubelet/cri/streaming/remotecommand/proxy.go b/pkg/kubelet/cri/streaming/remotecommand/proxy.go -index f21629af..65860c87 100644 +index f21629af..c14ea8dd 100644 --- a/pkg/kubelet/cri/streaming/remotecommand/proxy.go +++ b/pkg/kubelet/cri/streaming/remotecommand/proxy.go -@@ -129,6 +129,11 @@ func ProxyToWebSocket(w http.ResponseWriter, r *http.Request, url *url.URL, opts +@@ -129,6 +129,12 @@ func ProxyToWebSocket(w http.ResponseWriter, r *http.Request, url *url.URL, opts case <-frontendResizeToBackendComplete: } + select { + case <-backendToFrontendComplete: -+ case <-time.Tick(5 * time.Second): ++ case <-time.Tick(300 * time.Second): ++ klog.Errorf("Wait backend to frontend complete timeout") + } + if errConnection != nil { diff --git a/kubernetes.spec b/kubernetes.spec index 6b60a29..89d4362 100644 --- a/kubernetes.spec +++ b/kubernetes.spec @@ -3,7 +3,7 @@ Name: kubernetes Version: 1.20.2 -Release: 11 +Release: 12 Summary: Container cluster management License: ASL 2.0 URL: https://k8s.io/kubernetes @@ -264,6 +264,9 @@ getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \ %systemd_postun kubelet kube-proxy %changelog +* Tue Nov 01 2022 zhangxiaoyu - 1.20.2-12 +- DESC: add log and modify timeout + * Tue Nov 01 2022 zhangxiaoyu - 1.20.2-11 - DESC: timeout wait backend to frontend complete -- Gitee