mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
vendor: update agent client
Update agent client to improve CI stability. Changes: 660e61f Revert: client.go: HybridVSockDialer: Change Read EOT to recv peek 6cfb75d Revert: client.go: HybridVSockDialer: Check return size n of unix.Recvfrom 54eb918 Revert: client.go: HybridVSockDialer: Close dup fd after receive packet 2f49115 agent: Fix mem-hotplug on x86 when ARCH_MEMORY_PROBE is set Fixes: #2397 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
09dfd79322
commit
c26ce18672
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -419,7 +419,7 @@
|
|||||||
revision = "ee21903287393441c7bb53a0b0d39b8fa4075221"
|
revision = "ee21903287393441c7bb53a0b0d39b8fa4075221"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:6da9487ef0cc0cca3eeb1a24e3bb018ce2e07b7c2fc4d50975b54efdcc942118"
|
digest = "1:903bfb87f41dc18a533d327b5b03fd2f562f34deafcbd0db93d4be3fa8d6099c"
|
||||||
name = "github.com/kata-containers/agent"
|
name = "github.com/kata-containers/agent"
|
||||||
packages = [
|
packages = [
|
||||||
"pkg/types",
|
"pkg/types",
|
||||||
@ -427,7 +427,7 @@
|
|||||||
"protocols/grpc",
|
"protocols/grpc",
|
||||||
]
|
]
|
||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "1b3628c43660cb198ec055d78e5c7b03809cba60"
|
revision = "686708d9a8be625f9350c925ae3f038c1530a423"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:58999a98719fddbac6303cb17e8d85b945f60b72f48e3a2df6b950b97fa926f1"
|
digest = "1:58999a98719fddbac6303cb17e8d85b945f60b72f48e3a2df6b950b97fa926f1"
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
[[constraint]]
|
[[constraint]]
|
||||||
name = "github.com/kata-containers/agent"
|
name = "github.com/kata-containers/agent"
|
||||||
revision = "1b3628c43660cb198ec055d78e5c7b03809cba60"
|
revision = "686708d9a8be625f9350c925ae3f038c1530a423"
|
||||||
|
|
||||||
[[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,19 +9,16 @@ 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"
|
||||||
@ -410,24 +407,12 @@ func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive the packet from the connection without removing it from
|
// Read EOT (End of transmission) byte
|
||||||
// the receive queue (MSG_PEEK), ensuring the connection is usable.
|
eot := make([]byte, 32)
|
||||||
if uc, ok := conn.(*net.UnixConn); ok {
|
if _, err = conn.Read(eot); err != nil {
|
||||||
file, err := uc.File()
|
// Just close the connection, gRPC will dial again
|
||||||
if err != nil {
|
// without errors
|
||||||
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