!76 add log and modify timeout
From: @zh_xiaoyu Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
e860737b58
@ -1,24 +1,25 @@
|
||||
From 99ca0fbb527b3c3137d8ea16aa82db009517adf0 Mon Sep 17 00:00:00 2001
|
||||
From dda1aed8f9655c9cac813a3633b27bacdce9af88 Mon Sep 17 00:00:00 2001
|
||||
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||
Date: Tue, 1 Nov 2022 15:34:16 +0800
|
||||
Subject: [PATCH] timeout wait backend to frontend complete
|
||||
|
||||
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||
---
|
||||
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 {
|
||||
|
||||
@ -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 <zhangxiaoyu58@huawei.com> - 1.20.2-12
|
||||
- DESC: add log and modify timeout
|
||||
|
||||
* Tue Nov 01 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 1.20.2-11
|
||||
- DESC: timeout wait backend to frontend complete
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user