mzq-test
This commit is contained in:
13
vendor/github.com/containerd/ttrpc/client.go
generated
vendored
13
vendor/github.com/containerd/ttrpc/client.go
generated
vendored
@@ -109,7 +109,13 @@ func chainUnaryInterceptors(interceptors []UnaryClientInterceptor, final Invoker
|
||||
|
||||
// NewClient creates a new ttrpc client using the given connection
|
||||
func NewClient(conn net.Conn, opts ...ClientOpts) *Client {
|
||||
a := log.Fields{
|
||||
"mzq-test": true,
|
||||
"conn": fmt.Sprintf("%+v", conn),
|
||||
"opts": fmt.Sprintf("%+v", opts),
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
log.G(ctx).WithFields(a).Info("client.go NewClient")
|
||||
channel := newChannel(conn)
|
||||
c := &Client{
|
||||
codec: codec{},
|
||||
@@ -368,7 +374,12 @@ func (c *Client) receiveLoop() error {
|
||||
sid := streamID(msg.header.StreamID)
|
||||
s := c.getStream(sid)
|
||||
if s == nil {
|
||||
log.G(c.ctx).WithField("stream", sid).Error("ttrpc: received message on inactive stream")
|
||||
a := log.Fields{
|
||||
"mzq-test": true,
|
||||
"stream": sid,
|
||||
"c": fmt.Sprintf("%+v", c),
|
||||
}
|
||||
log.G(c.ctx).WithFields(a).Errorf("ttrpc: received message on inactive stream")
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
3
vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go
generated
vendored
3
vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go
generated
vendored
@@ -219,6 +219,7 @@ func (conn *Conn) Open(w http.ResponseWriter, req *http.Request) (string, []io.R
|
||||
serveHTTPComplete := make(chan struct{})
|
||||
// Ensure panic in spawned goroutine is propagated into the parent goroutine.
|
||||
panicChan := make(chan any, 1)
|
||||
klog.Infof("mzq-test, conn.go Open, req: %+v, req.Body: %+v, conn: %+v, timeout: %+v\n", req, req.Body, conn, conn.timeout.String())
|
||||
go func() {
|
||||
// If websocket server returns, propagate panic if necessary. Otherwise,
|
||||
// signal HTTPServe finished by closing "serveHTTPComplete".
|
||||
@@ -336,7 +337,7 @@ func (conn *Conn) handle(ws *websocket.Conn) {
|
||||
var data []byte
|
||||
if err := websocket.Message.Receive(ws, &data); err != nil {
|
||||
if err != io.EOF {
|
||||
klog.Errorf("Error on socket receive: %v", err)
|
||||
klog.Errorf("mzq-test, Error on socket receive: %v, ws: %+v, data: %v", err, ws, string(data))
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
1
vendor/k8s.io/kubelet/pkg/cri/streaming/portforward/websocket.go
generated
vendored
1
vendor/k8s.io/kubelet/pkg/cri/streaming/portforward/websocket.go
generated
vendored
@@ -114,6 +114,7 @@ func handleWebSocketStreams(req *http.Request, w http.ResponseWriter, portForwar
|
||||
},
|
||||
})
|
||||
conn.SetIdleTimeout(idleTimeout)
|
||||
klog.Infof("mzq-test, portforward/websocket.go, idleTimeout: %+v, req: %+v, req.body: %+v, podName: %v, uid: %v, opts: %+v, portForwarder: %+v, supportedPortForwardProtocols: %+v, streamCreationTimeout: %+v\n", idleTimeout.String(), req.Body, podName, uid, portForwarder, supportedPortForwardProtocols, streamCreationTimeout.String())
|
||||
_, streams, err := conn.Open(responsewriter.GetOriginal(w), req)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("unable to upgrade websocket connection: %v", err)
|
||||
|
||||
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/attach.go
generated
vendored
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/attach.go
generated
vendored
@@ -40,6 +40,7 @@ type Attacher interface {
|
||||
// ServeAttach handles requests to attach to a container. After creating/receiving the required
|
||||
// streams, it delegates the actual attaching to attacher.
|
||||
func ServeAttach(w http.ResponseWriter, req *http.Request, attacher Attacher, podName string, uid types.UID, container string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) {
|
||||
fmt.Println("mzq-test, remotecommand/attach.go ServeAttach")
|
||||
ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout)
|
||||
if !ok {
|
||||
// error is handled by createStreams
|
||||
|
||||
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/exec.go
generated
vendored
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/exec.go
generated
vendored
@@ -43,6 +43,7 @@ type Executor interface {
|
||||
// creating/receiving the required streams, it delegates the actual execution
|
||||
// to the executor.
|
||||
func ServeExec(w http.ResponseWriter, req *http.Request, executor Executor, podName string, uid types.UID, container string, cmd []string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) {
|
||||
fmt.Println("mzq-test, remotecommand/exec.go ServeExec")
|
||||
ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout)
|
||||
if !ok {
|
||||
// error is handled by createStreams
|
||||
|
||||
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/websocket.go
generated
vendored
1
vendor/k8s.io/kubelet/pkg/cri/streaming/remotecommand/websocket.go
generated
vendored
@@ -95,6 +95,7 @@ func createWebSocketStreams(req *http.Request, w http.ResponseWriter, opts *Opti
|
||||
},
|
||||
})
|
||||
conn.SetIdleTimeout(idleTimeout)
|
||||
fmt.Printf("mzq-test, remotecommand/websocket.go createWebSocketStreams, req: %+v, req.Body: %+v, opts: %+v, idleTime: %+v, conn:%+v\n", req, req.Body, opts, idleTimeout.String(), conn)
|
||||
negotiatedProtocol, streams, err := conn.Open(responsewriter.GetOriginal(w), req)
|
||||
if err != nil {
|
||||
runtime.HandleError(fmt.Errorf("unable to upgrade websocket connection: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user