mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 23:38:31 +00:00
vendor: Update github.com/kata-containers/agent to handle hvsock issue
Update github.com/kata-containers/agent to handle hvsock issue. Shortlog: 33f3208 client.go: HybridVSockDialer: Close dup fd after receive packet 74a3b95 release: Kata Containers 1.10.0-rc0 afd0871 ci: install docker before configure c502552 client.go: HybridVSockDialer: Check return size n of unix.Recvfrom f8e4ce8 client.go: HybridVSockDialer: Change Read EOT to recv peek 5b64d42 agent: get current cpuset from /sys/devices/system/cpu/online 183a24a release: Kata Containers 1.10.0-alpha1 1ee8516 config: add option to control hotplug timeout of block devices 40567f6 release: Kata Containers 1.10.0-alpha0 19bee57 agent: connect debugging console in a specific vsock port 8361150 docs: Add enable services and installation steps for TRACING.md a4f7373 agent: fix pause bin on musl f9f129a docs: Add missing steps at TRACING.md d3e66bf tracing: Wrapper for tracing functions 7a7dba7 network: ensure parent directories exist 455f728 tracing: Generate an alias for opentracing.Span 5f302e5 agent: Revert "client: remove the parameter of 'enableYamux'" 717ee24 client: remove the parameter of 'enableYamux' d387c77 vendor: Update github.com/syndtr/gocapability/capability b3d737b vendor: update libcontainer to 1.0.0-rc9 6eac713 release: Kata Containers 1.9.0-rc0 Fixes: #2284 Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
parent
39d7a144a9
commit
a215f87e23
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -405,7 +405,7 @@
|
|||||||
revision = "8cba5a8e5f2816f26f9dc34b8ea968279a5a76eb"
|
revision = "8cba5a8e5f2816f26f9dc34b8ea968279a5a76eb"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:903bfb87f41dc18a533d327b5b03fd2f562f34deafcbd0db93d4be3fa8d6099c"
|
digest = "1:6da9487ef0cc0cca3eeb1a24e3bb018ce2e07b7c2fc4d50975b54efdcc942118"
|
||||||
name = "github.com/kata-containers/agent"
|
name = "github.com/kata-containers/agent"
|
||||||
packages = [
|
packages = [
|
||||||
"pkg/types",
|
"pkg/types",
|
||||||
@ -413,7 +413,7 @@
|
|||||||
"protocols/grpc",
|
"protocols/grpc",
|
||||||
]
|
]
|
||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "32c87e75c2e4c014961f104c3c59b87f2aee3384"
|
revision = "6182fa34c64ba6eb1b6028d8b6647a86844129c4"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/kata-containers/agent"
|
name = "github.com/kata-containers/agent"
|
||||||
revision = "32c87e75c2e4c014961f104c3c59b87f2aee3384"
|
revision = "6182fa34c64ba6eb1b6028d8b6647a86844129c4"
|
||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/containerd/cri-containerd"
|
name = "github.com/containerd/cri-containerd"
|
||||||
|
27
vendor/github.com/kata-containers/agent/protocols/client/client.go
generated
vendored
27
vendor/github.com/kata-containers/agent/protocols/client/client.go
generated
vendored
@ -9,16 +9,19 @@ package client
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
|
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
|
||||||
"github.com/hashicorp/yamux"
|
"github.com/hashicorp/yamux"
|
||||||
"github.com/mdlayher/vsock"
|
"github.com/mdlayher/vsock"
|
||||||
opentracing "github.com/opentracing/opentracing-go"
|
opentracing "github.com/opentracing/opentracing-go"
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
grpcStatus "google.golang.org/grpc/status"
|
grpcStatus "google.golang.org/grpc/status"
|
||||||
@ -407,12 +410,24 @@ func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read EOT (End of transmission) byte
|
// Receive the packet from the connection without removing it from
|
||||||
eot := make([]byte, 32)
|
// the receive queue (MSG_PEEK), ensuring the connection is usable.
|
||||||
if _, err = conn.Read(eot); err != nil {
|
if uc, ok := conn.(*net.UnixConn); ok {
|
||||||
// Just close the connection, gRPC will dial again
|
file, err := uc.File()
|
||||||
// without errors
|
if err != nil {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
eot := make([]byte, 1)
|
||||||
|
n, _, err := unix.Recvfrom(int(file.Fd()), eot, syscall.MSG_PEEK)
|
||||||
|
file.Close()
|
||||||
|
if err != nil || n == 0 {
|
||||||
|
conn.Close()
|
||||||
|
if err == nil {
|
||||||
|
err = io.EOF
|
||||||
|
}
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return conn, nil
|
return conn, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user