From 309dcf99778eb9e6fa204be3e4525b802a2504db Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 25 Oct 2018 09:36:43 -0700 Subject: [PATCH 1/2] vendor: Update the agent vendoring based on pkg/types Some agent types definition that were generic enough to be reused everywhere, have been split from the initial grpc package. This prevents from importing the entire protobuf package through the grpc one, and prevents binaries such as kata-netmon to stay in sync with the types definitions. Fixes #856 Signed-off-by: Sebastien Boeuf --- Gopkg.lock | 10 +- Gopkg.toml | 4 +- cli/network.go | 10 +- cli/network_test.go | 12 +- .../agent/pkg/types/types.pb.go | 1093 +++++++++++ .../agent/protocols/client/client.go | 24 + .../agent/protocols/grpc/agent.pb.go | 1745 ++++++----------- .../agent/protocols/grpc/health.pb.go | 30 +- .../agent/protocols/grpc/oci.pb.go | 310 ++- .../runtime-spec/specs-go/config.go | 80 +- .../runtime-spec/specs-go/version.go | 2 +- virtcontainers/agent.go | 9 +- virtcontainers/api.go | 14 +- virtcontainers/api_test.go | 6 +- virtcontainers/hyperstart_agent.go | 9 +- virtcontainers/implementation.go | 12 +- virtcontainers/interfaces.go | 22 +- virtcontainers/kata_agent.go | 13 +- virtcontainers/kata_agent_test.go | 11 +- virtcontainers/network.go | 18 +- virtcontainers/network_test.go | 8 +- virtcontainers/noop_agent.go | 9 +- virtcontainers/pkg/vcmock/mock.go | 12 +- virtcontainers/pkg/vcmock/mock_test.go | 12 +- virtcontainers/pkg/vcmock/sandbox.go | 12 +- virtcontainers/pkg/vcmock/types.go | 12 +- virtcontainers/sandbox.go | 13 +- 27 files changed, 2220 insertions(+), 1292 deletions(-) create mode 100644 vendor/github.com/kata-containers/agent/pkg/types/types.pb.go diff --git a/Gopkg.lock b/Gopkg.lock index 8b460be24d..df588a0cbf 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -130,14 +130,15 @@ revision = "e82e8498c5a214b24ac75e0a05ace556bf91a9ab" [[projects]] - digest = "1:672470f31bc4e50f9ba09a1af7ab6035bf8b1452db64dfd79b1a22614bb30710" + digest = "1:e96806ae1b041a36386249b22ef9eaf5af1788c0f86f686c6296e5a9caf53df8" name = "github.com/kata-containers/agent" packages = [ + "pkg/types", "protocols/client", "protocols/grpc", ] pruneopts = "NUT" - revision = "7e8e20b10b71fe3044a24175b8a686421e9d2c24" + revision = "dd8f32c7a2e6e7effed9d12bac97e7d48473e684" [[projects]] digest = "1:04054595e5c5a35d1553a7f3464d18577caf597445d643992998643df56d4afd" @@ -173,11 +174,11 @@ revision = "0351df1c5a66838d0c392b4ac4cf9450de844e2d" [[projects]] - digest = "1:57234a321bf1f8f98a8a9a5122a2404cc60d0800516f4ab7a7b2375e4b2d19ea" + digest = "1:0d447d4961f4f9270457fbc20d0261bba8d3056f395efd2e2480e2dfa4487a60" name = "github.com/opencontainers/runtime-spec" packages = ["specs-go"] pruneopts = "NUT" - revision = "4e3b9264a330d094b0386c3703c5f379119711e8" + revision = "5806c35637336642129d03657419829569abc5aa" [[projects]] digest = "1:7da29c22bcc5c2ffb308324377dc00b5084650348c2799e573ed226d8cc9faf0" @@ -406,6 +407,7 @@ "github.com/gogo/protobuf/proto", "github.com/gogo/protobuf/types", "github.com/intel/govmm/qemu", + "github.com/kata-containers/agent/pkg/types", "github.com/kata-containers/agent/protocols/client", "github.com/kata-containers/agent/protocols/grpc", "github.com/kubernetes-incubator/cri-o/pkg/annotations", diff --git a/Gopkg.toml b/Gopkg.toml index 33f4c84bc1..9453be42d4 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -24,7 +24,7 @@ [[constraint]] name = "github.com/opencontainers/runtime-spec" - revision = "4e3b9264a330d094b0386c3703c5f379119711e8" + revision = "5806c35637336642129d03657419829569abc5aa" [[constraint]] name = "github.com/stretchr/testify" @@ -56,7 +56,7 @@ [[constraint]] name = "github.com/kata-containers/agent" - revision = "7e8e20b10b71fe3044a24175b8a686421e9d2c24" + revision = "dd8f32c7a2e6e7effed9d12bac97e7d48473e684" [[constraint]] name = "github.com/containerd/cri-containerd" diff --git a/cli/network.go b/cli/network.go index 2c16a581e1..86745ed994 100644 --- a/cli/network.go +++ b/cli/network.go @@ -17,7 +17,7 @@ import ( "golang.org/x/sys/unix" "github.com/containernetworking/plugins/pkg/ns" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/sirupsen/logrus" "github.com/urfave/cli" @@ -158,7 +158,7 @@ func networkModifyCommand(ctx context.Context, containerID, input string, opType } switch opType { case interfaceType: - var inf, resultingInf *grpc.Interface + var inf, resultingInf *types.Interface if err = json.NewDecoder(f).Decode(&inf); err != nil { return err } @@ -177,7 +177,7 @@ func networkModifyCommand(ctx context.Context, containerID, input string, opType } json.NewEncoder(output).Encode(resultingInf) case routeType: - var routes, resultingRoutes []*grpc.Route + var routes, resultingRoutes []*types.Route if err = json.NewDecoder(f).Decode(&routes); err != nil { return err } @@ -215,7 +215,7 @@ func networkListCommand(ctx context.Context, containerID string, opType networkT switch opType { case interfaceType: - var interfaces []*grpc.Interface + var interfaces []*types.Interface interfaces, err = vci.ListInterfaces(ctx, sandboxID) if err != nil { kataLog.WithField("existing-interfaces", fmt.Sprintf("%+v", interfaces)). @@ -223,7 +223,7 @@ func networkListCommand(ctx context.Context, containerID string, opType networkT } json.NewEncoder(file).Encode(interfaces) case routeType: - var routes []*grpc.Route + var routes []*types.Route routes, err = vci.ListRoutes(ctx, sandboxID) if err != nil { kataLog.WithField("resulting-routes", fmt.Sprintf("%+v", routes)). diff --git a/cli/network_test.go b/cli/network_test.go index b8c8337e2a..389b9df7c9 100644 --- a/cli/network_test.go +++ b/cli/network_test.go @@ -18,25 +18,25 @@ import ( "golang.org/x/sys/unix" "github.com/containernetworking/plugins/pkg/ns" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/stretchr/testify/assert" ) var ( - testAddInterfaceFuncReturnNil = func(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { + testAddInterfaceFuncReturnNil = func(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { return nil, nil } - testRemoveInterfaceFuncReturnNil = func(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { + testRemoveInterfaceFuncReturnNil = func(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { return nil, nil } - testListInterfacesFuncReturnNil = func(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) { + testListInterfacesFuncReturnNil = func(ctx context.Context, sandboxID string) ([]*types.Interface, error) { return nil, nil } - testUpdateRoutsFuncReturnNil = func(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) { + testUpdateRoutsFuncReturnNil = func(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) { return nil, nil } - testListRoutesFuncReturnNil = func(ctx context.Context, sandboxID string) ([]*grpc.Route, error) { + testListRoutesFuncReturnNil = func(ctx context.Context, sandboxID string) ([]*types.Route, error) { return nil, nil } ) diff --git a/vendor/github.com/kata-containers/agent/pkg/types/types.pb.go b/vendor/github.com/kata-containers/agent/pkg/types/types.pb.go new file mode 100644 index 0000000000..a501a7879d --- /dev/null +++ b/vendor/github.com/kata-containers/agent/pkg/types/types.pb.go @@ -0,0 +1,1093 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pkg/types/types.proto + +/* + Package types is a generated protocol buffer package. + + It is generated from these files: + pkg/types/types.proto + + It has these top-level messages: + IPAddress + Interface + Route +*/ +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type IPFamily int32 + +const ( + IPFamily_v4 IPFamily = 0 + IPFamily_v6 IPFamily = 1 +) + +var IPFamily_name = map[int32]string{ + 0: "v4", + 1: "v6", +} +var IPFamily_value = map[string]int32{ + "v4": 0, + "v6": 1, +} + +func (x IPFamily) String() string { + return proto.EnumName(IPFamily_name, int32(x)) +} +func (IPFamily) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } + +type IPAddress struct { + Family IPFamily `protobuf:"varint,1,opt,name=family,proto3,enum=types.IPFamily" json:"family,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Mask string `protobuf:"bytes,3,opt,name=mask,proto3" json:"mask,omitempty"` +} + +func (m *IPAddress) Reset() { *m = IPAddress{} } +func (m *IPAddress) String() string { return proto.CompactTextString(m) } +func (*IPAddress) ProtoMessage() {} +func (*IPAddress) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } + +func (m *IPAddress) GetFamily() IPFamily { + if m != nil { + return m.Family + } + return IPFamily_v4 +} + +func (m *IPAddress) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *IPAddress) GetMask() string { + if m != nil { + return m.Mask + } + return "" +} + +type Interface struct { + Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + IPAddresses []*IPAddress `protobuf:"bytes,3,rep,name=IPAddresses" json:"IPAddresses,omitempty"` + Mtu uint64 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"` + HwAddr string `protobuf:"bytes,5,opt,name=hwAddr,proto3" json:"hwAddr,omitempty"` + // pciAddr is the PCI address in the format "bridgeAddr/deviceAddr". + // Here, bridgeAddr is the address at which the bridge is attached on the root bus, + // while deviceAddr is the address at which the network device is attached on the bridge. + PciAddr string `protobuf:"bytes,6,opt,name=pciAddr,proto3" json:"pciAddr,omitempty"` +} + +func (m *Interface) Reset() { *m = Interface{} } +func (m *Interface) String() string { return proto.CompactTextString(m) } +func (*Interface) ProtoMessage() {} +func (*Interface) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } + +func (m *Interface) GetDevice() string { + if m != nil { + return m.Device + } + return "" +} + +func (m *Interface) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Interface) GetIPAddresses() []*IPAddress { + if m != nil { + return m.IPAddresses + } + return nil +} + +func (m *Interface) GetMtu() uint64 { + if m != nil { + return m.Mtu + } + return 0 +} + +func (m *Interface) GetHwAddr() string { + if m != nil { + return m.HwAddr + } + return "" +} + +func (m *Interface) GetPciAddr() string { + if m != nil { + return m.PciAddr + } + return "" +} + +type Route struct { + Dest string `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` + Gateway string `protobuf:"bytes,2,opt,name=gateway,proto3" json:"gateway,omitempty"` + Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` + Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` + Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"` +} + +func (m *Route) Reset() { *m = Route{} } +func (m *Route) String() string { return proto.CompactTextString(m) } +func (*Route) ProtoMessage() {} +func (*Route) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } + +func (m *Route) GetDest() string { + if m != nil { + return m.Dest + } + return "" +} + +func (m *Route) GetGateway() string { + if m != nil { + return m.Gateway + } + return "" +} + +func (m *Route) GetDevice() string { + if m != nil { + return m.Device + } + return "" +} + +func (m *Route) GetSource() string { + if m != nil { + return m.Source + } + return "" +} + +func (m *Route) GetScope() uint32 { + if m != nil { + return m.Scope + } + return 0 +} + +func init() { + proto.RegisterType((*IPAddress)(nil), "types.IPAddress") + proto.RegisterType((*Interface)(nil), "types.Interface") + proto.RegisterType((*Route)(nil), "types.Route") + proto.RegisterEnum("types.IPFamily", IPFamily_name, IPFamily_value) +} +func (m *IPAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IPAddress) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Family != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Family)) + } + if len(m.Address) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i += copy(dAtA[i:], m.Address) + } + if len(m.Mask) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Mask))) + i += copy(dAtA[i:], m.Mask) + } + return i, nil +} + +func (m *Interface) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Interface) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Device) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Device))) + i += copy(dAtA[i:], m.Device) + } + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.IPAddresses) > 0 { + for _, msg := range m.IPAddresses { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Mtu != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Mtu)) + } + if len(m.HwAddr) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.HwAddr))) + i += copy(dAtA[i:], m.HwAddr) + } + if len(m.PciAddr) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.PciAddr))) + i += copy(dAtA[i:], m.PciAddr) + } + return i, nil +} + +func (m *Route) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Route) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Dest) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Dest))) + i += copy(dAtA[i:], m.Dest) + } + if len(m.Gateway) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Gateway))) + i += copy(dAtA[i:], m.Gateway) + } + if len(m.Device) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Device))) + i += copy(dAtA[i:], m.Device) + } + if len(m.Source) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Source))) + i += copy(dAtA[i:], m.Source) + } + if m.Scope != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Scope)) + } + return i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *IPAddress) Size() (n int) { + var l int + _ = l + if m.Family != 0 { + n += 1 + sovTypes(uint64(m.Family)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Mask) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Interface) Size() (n int) { + var l int + _ = l + l = len(m.Device) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.IPAddresses) > 0 { + for _, e := range m.IPAddresses { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Mtu != 0 { + n += 1 + sovTypes(uint64(m.Mtu)) + } + l = len(m.HwAddr) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.PciAddr) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Route) Size() (n int) { + var l int + _ = l + l = len(m.Dest) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Gateway) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Device) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Source) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Scope != 0 { + n += 1 + sovTypes(uint64(m.Scope)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IPAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Family", wireType) + } + m.Family = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Family |= (IPFamily(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mask", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mask = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Interface) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Interface: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Interface: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPAddresses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IPAddresses = append(m.IPAddresses, &IPAddress{}) + if err := m.IPAddresses[len(m.IPAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mtu", wireType) + } + m.Mtu = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mtu |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HwAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HwAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PciAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PciAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Route) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Route: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Dest = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateway = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Source = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + m.Scope = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Scope |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipTypes(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("pkg/types/types.proto", fileDescriptorTypes) } + +var fileDescriptorTypes = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xcf, 0x4e, 0xc2, 0x40, + 0x10, 0xc6, 0x5d, 0x4a, 0xab, 0x1d, 0xfc, 0xd3, 0x6c, 0x94, 0x6c, 0x3c, 0x90, 0x86, 0x8b, 0x8d, + 0x07, 0x4c, 0xd0, 0x78, 0xd7, 0x83, 0x09, 0x37, 0xb2, 0x6f, 0xb0, 0xb4, 0x03, 0x12, 0x2c, 0x6d, + 0xba, 0x0b, 0x84, 0xf8, 0x50, 0xbe, 0x86, 0x47, 0x1f, 0xc1, 0xf0, 0x24, 0x66, 0x67, 0x17, 0x82, + 0x97, 0x76, 0x7e, 0x3b, 0xf3, 0x75, 0xbe, 0xaf, 0x0b, 0x37, 0xf5, 0x62, 0xf6, 0x60, 0xb6, 0x35, + 0x6a, 0xf7, 0x1c, 0xd4, 0x4d, 0x65, 0x2a, 0x1e, 0x12, 0xf4, 0x27, 0x10, 0x8f, 0xc6, 0x2f, 0x45, + 0xd1, 0xa0, 0xd6, 0xfc, 0x0e, 0xa2, 0xa9, 0x2a, 0xe7, 0x1f, 0x5b, 0xc1, 0x52, 0x96, 0x5d, 0x0e, + 0xaf, 0x06, 0x4e, 0x31, 0x1a, 0xbf, 0xd1, 0xb1, 0xf4, 0x6d, 0x2e, 0xe0, 0x54, 0x39, 0x8d, 0x68, + 0xa5, 0x2c, 0x8b, 0xe5, 0x1e, 0x39, 0x87, 0x76, 0xa9, 0xf4, 0x42, 0x04, 0x74, 0x4c, 0x75, 0xff, + 0x8b, 0x41, 0x3c, 0x5a, 0x1a, 0x6c, 0xa6, 0x2a, 0x47, 0xde, 0x85, 0xa8, 0xc0, 0xf5, 0x3c, 0x47, + 0x5a, 0x12, 0x4b, 0x4f, 0x56, 0xb9, 0x54, 0x25, 0xfa, 0x0f, 0x52, 0xcd, 0x87, 0xd0, 0x39, 0xb8, + 0x43, 0x2d, 0x82, 0x34, 0xc8, 0x3a, 0xc3, 0xe4, 0xe0, 0xca, 0x77, 0xe4, 0xf1, 0x10, 0x4f, 0x20, + 0x28, 0xcd, 0x4a, 0xb4, 0x53, 0x96, 0xb5, 0xa5, 0x2d, 0xed, 0xc6, 0xf7, 0x8d, 0x1d, 0x10, 0xa1, + 0xdb, 0xe8, 0xc8, 0xa6, 0xa8, 0xf3, 0x39, 0x35, 0x22, 0x97, 0xc2, 0x63, 0xff, 0x13, 0x42, 0x59, + 0xad, 0x0c, 0x99, 0x2a, 0x50, 0x1b, 0x6f, 0x95, 0x6a, 0x2b, 0x9b, 0x29, 0x83, 0x1b, 0xb5, 0xdd, + 0x87, 0xf7, 0x78, 0x14, 0x2d, 0xf8, 0x17, 0xad, 0x0b, 0x91, 0xae, 0x56, 0x4d, 0x8e, 0xe4, 0x2a, + 0x96, 0x9e, 0xf8, 0x35, 0x84, 0x3a, 0xaf, 0x6a, 0x24, 0x5f, 0x17, 0xd2, 0xc1, 0xfd, 0x2d, 0x9c, + 0xed, 0x7f, 0x38, 0x8f, 0xa0, 0xb5, 0x7e, 0x4a, 0x4e, 0xe8, 0xfd, 0x9c, 0xb0, 0xd7, 0xf3, 0xef, + 0x5d, 0x8f, 0xfd, 0xec, 0x7a, 0xec, 0x77, 0xd7, 0x63, 0x93, 0x88, 0xae, 0xf2, 0xf1, 0x2f, 0x00, + 0x00, 0xff, 0xff, 0x91, 0x8a, 0xea, 0xe6, 0xe3, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/kata-containers/agent/protocols/client/client.go b/vendor/github.com/kata-containers/agent/protocols/client/client.go index 451beab07f..a0431301dc 100644 --- a/vendor/github.com/kata-containers/agent/protocols/client/client.go +++ b/vendor/github.com/kata-containers/agent/protocols/client/client.go @@ -165,6 +165,26 @@ func parse(sock string) (string, *url.URL, error) { return grpcAddr, addr, nil } +// This function is meant to run in a go routine since it will send ping +// commands every second. It behaves as a heartbeat to maintain a proper +// communication state with the Yamux server in the agent. +func heartBeat(session *yamux.Session) { + if session == nil { + return + } + + for { + if session.IsClosed() { + break + } + + session.Ping() + + // 1 Hz heartbeat + time.Sleep(time.Second) + } +} + func agentDialer(addr *url.URL, enableYamux bool) dialer { var d dialer switch addr.Scheme { @@ -196,11 +216,15 @@ func agentDialer(addr *url.URL, enableYamux bool) dialer { sessionConfig := yamux.DefaultConfig() // Disable keepAlive since we don't know how much time a container can be paused sessionConfig.EnableKeepAlive = false + sessionConfig.ConnectionWriteTimeout = time.Second session, err = yamux.Client(conn, sessionConfig) if err != nil { return nil, err } + // Start the heartbeat in a separate go routine + go heartBeat(session) + var stream net.Conn stream, err = session.Open() if err != nil { diff --git a/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go b/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go index ea680f03d9..d71cbbda19 100644 --- a/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go +++ b/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go @@ -42,10 +42,7 @@ TtyWinResizeRequest CreateSandboxRequest DestroySandboxRequest - IPAddress - Interface Interfaces - Route Routes UpdateInterfaceRequest AddInterfaceRequest @@ -55,6 +52,7 @@ ListRoutesRequest OnlineCPUMemRequest ReseedRandomDevRequest + AgentDetails GuestDetailsRequest GuestDetailsResponse Storage @@ -100,6 +98,7 @@ package grpc import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import types "github.com/kata-containers/agent/pkg/types" import google_protobuf2 "github.com/gogo/protobuf/types" import context "golang.org/x/net/context" @@ -118,27 +117,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -type IPFamily int32 - -const ( - IPFamily_v4 IPFamily = 0 - IPFamily_v6 IPFamily = 1 -) - -var IPFamily_name = map[int32]string{ - 0: "v4", - 1: "v6", -} -var IPFamily_value = map[string]int32{ - "v4": 0, - "v6": 1, -} - -func (x IPFamily) String() string { - return proto.EnumName(IPFamily_name, int32(x)) -} -func (IPFamily) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0} } - type CreateContainerRequest struct { ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecId string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` @@ -1087,6 +1065,9 @@ type CreateSandboxRequest struct { // one sandbox per agent and implicitly require that CreateSandbox is // called before other sandbox/network calls. SandboxId string `protobuf:"bytes,5,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` + // This field, if non-empty, designates an absolute path to a directory + // that the agent will search for OCI hooks to run within the guest. + GuestHookPath string `protobuf:"bytes,6,opt,name=guest_hook_path,json=guestHookPath,proto3" json:"guest_hook_path,omitempty"` } func (m *CreateSandboxRequest) Reset() { *m = CreateSandboxRequest{} } @@ -1129,6 +1110,13 @@ func (m *CreateSandboxRequest) GetSandboxId() string { return "" } +func (m *CreateSandboxRequest) GetGuestHookPath() string { + if m != nil { + return m.GuestHookPath + } + return "" +} + type DestroySandboxRequest struct { } @@ -1137,171 +1125,32 @@ func (m *DestroySandboxRequest) String() string { return proto.Compac func (*DestroySandboxRequest) ProtoMessage() {} func (*DestroySandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{31} } -type IPAddress struct { - Family IPFamily `protobuf:"varint,1,opt,name=family,proto3,enum=grpc.IPFamily" json:"family,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Mask string `protobuf:"bytes,3,opt,name=mask,proto3" json:"mask,omitempty"` -} - -func (m *IPAddress) Reset() { *m = IPAddress{} } -func (m *IPAddress) String() string { return proto.CompactTextString(m) } -func (*IPAddress) ProtoMessage() {} -func (*IPAddress) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{32} } - -func (m *IPAddress) GetFamily() IPFamily { - if m != nil { - return m.Family - } - return IPFamily_v4 -} - -func (m *IPAddress) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *IPAddress) GetMask() string { - if m != nil { - return m.Mask - } - return "" -} - -type Interface struct { - Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - IPAddresses []*IPAddress `protobuf:"bytes,3,rep,name=IPAddresses" json:"IPAddresses,omitempty"` - Mtu uint64 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"` - HwAddr string `protobuf:"bytes,5,opt,name=hwAddr,proto3" json:"hwAddr,omitempty"` - // pciAddr is the PCI address in the format "bridgeAddr/deviceAddr". - // Here, bridgeAddr is the address at which the bridge is attached on the root bus, - // while deviceAddr is the address at which the network device is attached on the bridge. - PciAddr string `protobuf:"bytes,6,opt,name=pciAddr,proto3" json:"pciAddr,omitempty"` -} - -func (m *Interface) Reset() { *m = Interface{} } -func (m *Interface) String() string { return proto.CompactTextString(m) } -func (*Interface) ProtoMessage() {} -func (*Interface) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{33} } - -func (m *Interface) GetDevice() string { - if m != nil { - return m.Device - } - return "" -} - -func (m *Interface) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Interface) GetIPAddresses() []*IPAddress { - if m != nil { - return m.IPAddresses - } - return nil -} - -func (m *Interface) GetMtu() uint64 { - if m != nil { - return m.Mtu - } - return 0 -} - -func (m *Interface) GetHwAddr() string { - if m != nil { - return m.HwAddr - } - return "" -} - -func (m *Interface) GetPciAddr() string { - if m != nil { - return m.PciAddr - } - return "" -} - type Interfaces struct { - Interfaces []*Interface `protobuf:"bytes,1,rep,name=Interfaces" json:"Interfaces,omitempty"` + Interfaces []*types.Interface `protobuf:"bytes,1,rep,name=Interfaces" json:"Interfaces,omitempty"` } func (m *Interfaces) Reset() { *m = Interfaces{} } func (m *Interfaces) String() string { return proto.CompactTextString(m) } func (*Interfaces) ProtoMessage() {} -func (*Interfaces) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{34} } +func (*Interfaces) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{32} } -func (m *Interfaces) GetInterfaces() []*Interface { +func (m *Interfaces) GetInterfaces() []*types.Interface { if m != nil { return m.Interfaces } return nil } -type Route struct { - Dest string `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` - Gateway string `protobuf:"bytes,2,opt,name=gateway,proto3" json:"gateway,omitempty"` - Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` - Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"` -} - -func (m *Route) Reset() { *m = Route{} } -func (m *Route) String() string { return proto.CompactTextString(m) } -func (*Route) ProtoMessage() {} -func (*Route) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{35} } - -func (m *Route) GetDest() string { - if m != nil { - return m.Dest - } - return "" -} - -func (m *Route) GetGateway() string { - if m != nil { - return m.Gateway - } - return "" -} - -func (m *Route) GetDevice() string { - if m != nil { - return m.Device - } - return "" -} - -func (m *Route) GetSource() string { - if m != nil { - return m.Source - } - return "" -} - -func (m *Route) GetScope() uint32 { - if m != nil { - return m.Scope - } - return 0 -} - type Routes struct { - Routes []*Route `protobuf:"bytes,1,rep,name=Routes" json:"Routes,omitempty"` + Routes []*types.Route `protobuf:"bytes,1,rep,name=Routes" json:"Routes,omitempty"` } func (m *Routes) Reset() { *m = Routes{} } func (m *Routes) String() string { return proto.CompactTextString(m) } func (*Routes) ProtoMessage() {} -func (*Routes) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{36} } +func (*Routes) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{33} } -func (m *Routes) GetRoutes() []*Route { +func (m *Routes) GetRoutes() []*types.Route { if m != nil { return m.Routes } @@ -1309,15 +1158,15 @@ func (m *Routes) GetRoutes() []*Route { } type UpdateInterfaceRequest struct { - Interface *Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` + Interface *types.Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` } func (m *UpdateInterfaceRequest) Reset() { *m = UpdateInterfaceRequest{} } func (m *UpdateInterfaceRequest) String() string { return proto.CompactTextString(m) } func (*UpdateInterfaceRequest) ProtoMessage() {} -func (*UpdateInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{37} } +func (*UpdateInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{34} } -func (m *UpdateInterfaceRequest) GetInterface() *Interface { +func (m *UpdateInterfaceRequest) GetInterface() *types.Interface { if m != nil { return m.Interface } @@ -1325,15 +1174,15 @@ func (m *UpdateInterfaceRequest) GetInterface() *Interface { } type AddInterfaceRequest struct { - Interface *Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` + Interface *types.Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` } func (m *AddInterfaceRequest) Reset() { *m = AddInterfaceRequest{} } func (m *AddInterfaceRequest) String() string { return proto.CompactTextString(m) } func (*AddInterfaceRequest) ProtoMessage() {} -func (*AddInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{38} } +func (*AddInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{35} } -func (m *AddInterfaceRequest) GetInterface() *Interface { +func (m *AddInterfaceRequest) GetInterface() *types.Interface { if m != nil { return m.Interface } @@ -1341,15 +1190,15 @@ func (m *AddInterfaceRequest) GetInterface() *Interface { } type RemoveInterfaceRequest struct { - Interface *Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` + Interface *types.Interface `protobuf:"bytes,1,opt,name=interface" json:"interface,omitempty"` } func (m *RemoveInterfaceRequest) Reset() { *m = RemoveInterfaceRequest{} } func (m *RemoveInterfaceRequest) String() string { return proto.CompactTextString(m) } func (*RemoveInterfaceRequest) ProtoMessage() {} -func (*RemoveInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{39} } +func (*RemoveInterfaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{36} } -func (m *RemoveInterfaceRequest) GetInterface() *Interface { +func (m *RemoveInterfaceRequest) GetInterface() *types.Interface { if m != nil { return m.Interface } @@ -1363,7 +1212,7 @@ type UpdateRoutesRequest struct { func (m *UpdateRoutesRequest) Reset() { *m = UpdateRoutesRequest{} } func (m *UpdateRoutesRequest) String() string { return proto.CompactTextString(m) } func (*UpdateRoutesRequest) ProtoMessage() {} -func (*UpdateRoutesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{40} } +func (*UpdateRoutesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{37} } func (m *UpdateRoutesRequest) GetRoutes() *Routes { if m != nil { @@ -1378,7 +1227,7 @@ type ListInterfacesRequest struct { func (m *ListInterfacesRequest) Reset() { *m = ListInterfacesRequest{} } func (m *ListInterfacesRequest) String() string { return proto.CompactTextString(m) } func (*ListInterfacesRequest) ProtoMessage() {} -func (*ListInterfacesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{41} } +func (*ListInterfacesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{38} } type ListRoutesRequest struct { } @@ -1386,7 +1235,7 @@ type ListRoutesRequest struct { func (m *ListRoutesRequest) Reset() { *m = ListRoutesRequest{} } func (m *ListRoutesRequest) String() string { return proto.CompactTextString(m) } func (*ListRoutesRequest) ProtoMessage() {} -func (*ListRoutesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{42} } +func (*ListRoutesRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{39} } type OnlineCPUMemRequest struct { // Wait specifies if the caller waits for the agent to online all resources. @@ -1402,7 +1251,7 @@ type OnlineCPUMemRequest struct { func (m *OnlineCPUMemRequest) Reset() { *m = OnlineCPUMemRequest{} } func (m *OnlineCPUMemRequest) String() string { return proto.CompactTextString(m) } func (*OnlineCPUMemRequest) ProtoMessage() {} -func (*OnlineCPUMemRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{43} } +func (*OnlineCPUMemRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{40} } func (m *OnlineCPUMemRequest) GetWait() bool { if m != nil { @@ -1433,7 +1282,7 @@ type ReseedRandomDevRequest struct { func (m *ReseedRandomDevRequest) Reset() { *m = ReseedRandomDevRequest{} } func (m *ReseedRandomDevRequest) String() string { return proto.CompactTextString(m) } func (*ReseedRandomDevRequest) ProtoMessage() {} -func (*ReseedRandomDevRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{44} } +func (*ReseedRandomDevRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{41} } func (m *ReseedRandomDevRequest) GetData() []byte { if m != nil { @@ -1442,6 +1291,61 @@ func (m *ReseedRandomDevRequest) GetData() []byte { return nil } +// AgentDetails provides information to the client about the running agent. +type AgentDetails struct { + // Semantic version of agent (see https://semver.org). + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Set if the agent is running as PID 1. + InitDaemon bool `protobuf:"varint,2,opt,name=init_daemon,json=initDaemon,proto3" json:"init_daemon,omitempty"` + // List of available device handlers. + DeviceHandlers []string `protobuf:"bytes,3,rep,name=device_handlers,json=deviceHandlers" json:"device_handlers,omitempty"` + // List of available storage handlers. + StorageHandlers []string `protobuf:"bytes,4,rep,name=storage_handlers,json=storageHandlers" json:"storage_handlers,omitempty"` + // Set only if the agent is built with seccomp support and the guest + // environment supports seccomp. + SupportsSeccomp bool `protobuf:"varint,5,opt,name=supports_seccomp,json=supportsSeccomp,proto3" json:"supports_seccomp,omitempty"` +} + +func (m *AgentDetails) Reset() { *m = AgentDetails{} } +func (m *AgentDetails) String() string { return proto.CompactTextString(m) } +func (*AgentDetails) ProtoMessage() {} +func (*AgentDetails) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{42} } + +func (m *AgentDetails) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *AgentDetails) GetInitDaemon() bool { + if m != nil { + return m.InitDaemon + } + return false +} + +func (m *AgentDetails) GetDeviceHandlers() []string { + if m != nil { + return m.DeviceHandlers + } + return nil +} + +func (m *AgentDetails) GetStorageHandlers() []string { + if m != nil { + return m.StorageHandlers + } + return nil +} + +func (m *AgentDetails) GetSupportsSeccomp() bool { + if m != nil { + return m.SupportsSeccomp + } + return false +} + type GuestDetailsRequest struct { // MemBlockSize asks server to return the system memory block size that can be used // for memory hotplug alignment. Typically the server returns what's in @@ -1452,7 +1356,7 @@ type GuestDetailsRequest struct { func (m *GuestDetailsRequest) Reset() { *m = GuestDetailsRequest{} } func (m *GuestDetailsRequest) String() string { return proto.CompactTextString(m) } func (*GuestDetailsRequest) ProtoMessage() {} -func (*GuestDetailsRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{45} } +func (*GuestDetailsRequest) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{43} } func (m *GuestDetailsRequest) GetMemBlockSize() bool { if m != nil { @@ -1463,13 +1367,14 @@ func (m *GuestDetailsRequest) GetMemBlockSize() bool { type GuestDetailsResponse struct { // MemBlockSizeBytes returns the system memory block size in bytes. - MemBlockSizeBytes uint64 `protobuf:"varint,1,opt,name=mem_block_size_bytes,json=memBlockSizeBytes,proto3" json:"mem_block_size_bytes,omitempty"` + MemBlockSizeBytes uint64 `protobuf:"varint,1,opt,name=mem_block_size_bytes,json=memBlockSizeBytes,proto3" json:"mem_block_size_bytes,omitempty"` + AgentDetails *AgentDetails `protobuf:"bytes,2,opt,name=agent_details,json=agentDetails" json:"agent_details,omitempty"` } func (m *GuestDetailsResponse) Reset() { *m = GuestDetailsResponse{} } func (m *GuestDetailsResponse) String() string { return proto.CompactTextString(m) } func (*GuestDetailsResponse) ProtoMessage() {} -func (*GuestDetailsResponse) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{46} } +func (*GuestDetailsResponse) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{44} } func (m *GuestDetailsResponse) GetMemBlockSizeBytes() uint64 { if m != nil { @@ -1478,6 +1383,13 @@ func (m *GuestDetailsResponse) GetMemBlockSizeBytes() uint64 { return 0 } +func (m *GuestDetailsResponse) GetAgentDetails() *AgentDetails { + if m != nil { + return m.AgentDetails + } + return nil +} + // Storage represents both the rootfs of the container, and any volume that // could have been defined through the Mount list of the OCI specification. type Storage struct { @@ -1511,7 +1423,7 @@ type Storage struct { func (m *Storage) Reset() { *m = Storage{} } func (m *Storage) String() string { return proto.CompactTextString(m) } func (*Storage) ProtoMessage() {} -func (*Storage) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{47} } +func (*Storage) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{45} } func (m *Storage) GetDriver() string { if m != nil { @@ -1594,7 +1506,7 @@ type Device struct { func (m *Device) Reset() { *m = Device{} } func (m *Device) String() string { return proto.CompactTextString(m) } func (*Device) ProtoMessage() {} -func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{48} } +func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{46} } func (m *Device) GetId() string { if m != nil { @@ -1640,7 +1552,7 @@ type StringUser struct { func (m *StringUser) Reset() { *m = StringUser{} } func (m *StringUser) String() string { return proto.CompactTextString(m) } func (*StringUser) ProtoMessage() {} -func (*StringUser) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{49} } +func (*StringUser) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{47} } func (m *StringUser) GetUid() string { if m != nil { @@ -1696,10 +1608,7 @@ func init() { proto.RegisterType((*TtyWinResizeRequest)(nil), "grpc.TtyWinResizeRequest") proto.RegisterType((*CreateSandboxRequest)(nil), "grpc.CreateSandboxRequest") proto.RegisterType((*DestroySandboxRequest)(nil), "grpc.DestroySandboxRequest") - proto.RegisterType((*IPAddress)(nil), "grpc.IPAddress") - proto.RegisterType((*Interface)(nil), "grpc.Interface") proto.RegisterType((*Interfaces)(nil), "grpc.Interfaces") - proto.RegisterType((*Route)(nil), "grpc.Route") proto.RegisterType((*Routes)(nil), "grpc.Routes") proto.RegisterType((*UpdateInterfaceRequest)(nil), "grpc.UpdateInterfaceRequest") proto.RegisterType((*AddInterfaceRequest)(nil), "grpc.AddInterfaceRequest") @@ -1709,12 +1618,12 @@ func init() { proto.RegisterType((*ListRoutesRequest)(nil), "grpc.ListRoutesRequest") proto.RegisterType((*OnlineCPUMemRequest)(nil), "grpc.OnlineCPUMemRequest") proto.RegisterType((*ReseedRandomDevRequest)(nil), "grpc.ReseedRandomDevRequest") + proto.RegisterType((*AgentDetails)(nil), "grpc.AgentDetails") proto.RegisterType((*GuestDetailsRequest)(nil), "grpc.GuestDetailsRequest") proto.RegisterType((*GuestDetailsResponse)(nil), "grpc.GuestDetailsResponse") proto.RegisterType((*Storage)(nil), "grpc.Storage") proto.RegisterType((*Device)(nil), "grpc.Device") proto.RegisterType((*StringUser)(nil), "grpc.StringUser") - proto.RegisterEnum("grpc.IPFamily", IPFamily_name, IPFamily_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -1753,9 +1662,9 @@ type AgentServiceClient interface { CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc1.CallOption) (*google_protobuf2.Empty, error) TtyWinResize(ctx context.Context, in *TtyWinResizeRequest, opts ...grpc1.CallOption) (*google_protobuf2.Empty, error) // networking - AddInterface(ctx context.Context, in *AddInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) - UpdateInterface(ctx context.Context, in *UpdateInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) - RemoveInterface(ctx context.Context, in *RemoveInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) + AddInterface(ctx context.Context, in *AddInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) + UpdateInterface(ctx context.Context, in *UpdateInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) + RemoveInterface(ctx context.Context, in *RemoveInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) UpdateRoutes(ctx context.Context, in *UpdateRoutesRequest, opts ...grpc1.CallOption) (*Routes, error) ListInterfaces(ctx context.Context, in *ListInterfacesRequest, opts ...grpc1.CallOption) (*Interfaces, error) ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc1.CallOption) (*Routes, error) @@ -1919,8 +1828,8 @@ func (c *agentServiceClient) TtyWinResize(ctx context.Context, in *TtyWinResizeR return out, nil } -func (c *agentServiceClient) AddInterface(ctx context.Context, in *AddInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) { - out := new(Interface) +func (c *agentServiceClient) AddInterface(ctx context.Context, in *AddInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) { + out := new(types.Interface) err := grpc1.Invoke(ctx, "/grpc.AgentService/AddInterface", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1928,8 +1837,8 @@ func (c *agentServiceClient) AddInterface(ctx context.Context, in *AddInterfaceR return out, nil } -func (c *agentServiceClient) UpdateInterface(ctx context.Context, in *UpdateInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) { - out := new(Interface) +func (c *agentServiceClient) UpdateInterface(ctx context.Context, in *UpdateInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) { + out := new(types.Interface) err := grpc1.Invoke(ctx, "/grpc.AgentService/UpdateInterface", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1937,8 +1846,8 @@ func (c *agentServiceClient) UpdateInterface(ctx context.Context, in *UpdateInte return out, nil } -func (c *agentServiceClient) RemoveInterface(ctx context.Context, in *RemoveInterfaceRequest, opts ...grpc1.CallOption) (*Interface, error) { - out := new(Interface) +func (c *agentServiceClient) RemoveInterface(ctx context.Context, in *RemoveInterfaceRequest, opts ...grpc1.CallOption) (*types.Interface, error) { + out := new(types.Interface) err := grpc1.Invoke(ctx, "/grpc.AgentService/RemoveInterface", in, out, c.cc, opts...) if err != nil { return nil, err @@ -2046,9 +1955,9 @@ type AgentServiceServer interface { CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf2.Empty, error) TtyWinResize(context.Context, *TtyWinResizeRequest) (*google_protobuf2.Empty, error) // networking - AddInterface(context.Context, *AddInterfaceRequest) (*Interface, error) - UpdateInterface(context.Context, *UpdateInterfaceRequest) (*Interface, error) - RemoveInterface(context.Context, *RemoveInterfaceRequest) (*Interface, error) + AddInterface(context.Context, *AddInterfaceRequest) (*types.Interface, error) + UpdateInterface(context.Context, *UpdateInterfaceRequest) (*types.Interface, error) + RemoveInterface(context.Context, *RemoveInterfaceRequest) (*types.Interface, error) UpdateRoutes(context.Context, *UpdateRoutesRequest) (*Routes, error) ListInterfaces(context.Context, *ListInterfacesRequest) (*Interfaces, error) ListRoutes(context.Context, *ListRoutesRequest) (*Routes, error) @@ -3935,6 +3844,12 @@ func (m *CreateSandboxRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintAgent(dAtA, i, uint64(len(m.SandboxId))) i += copy(dAtA[i:], m.SandboxId) } + if len(m.GuestHookPath) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.GuestHookPath))) + i += copy(dAtA[i:], m.GuestHookPath) + } return i, nil } @@ -3956,100 +3871,6 @@ func (m *DestroySandboxRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *IPAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IPAddress) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Family != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAgent(dAtA, i, uint64(m.Family)) - } - if len(m.Address) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Address))) - i += copy(dAtA[i:], m.Address) - } - if len(m.Mask) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Mask))) - i += copy(dAtA[i:], m.Mask) - } - return i, nil -} - -func (m *Interface) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Interface) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Device) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Device))) - i += copy(dAtA[i:], m.Device) - } - if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.IPAddresses) > 0 { - for _, msg := range m.IPAddresses { - dAtA[i] = 0x1a - i++ - i = encodeVarintAgent(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Mtu != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintAgent(dAtA, i, uint64(m.Mtu)) - } - if len(m.HwAddr) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.HwAddr))) - i += copy(dAtA[i:], m.HwAddr) - } - if len(m.PciAddr) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.PciAddr))) - i += copy(dAtA[i:], m.PciAddr) - } - return i, nil -} - func (m *Interfaces) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4080,53 +3901,6 @@ func (m *Interfaces) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *Route) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Route) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Dest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Dest))) - i += copy(dAtA[i:], m.Dest) - } - if len(m.Gateway) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Gateway))) - i += copy(dAtA[i:], m.Gateway) - } - if len(m.Device) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Device))) - i += copy(dAtA[i:], m.Device) - } - if len(m.Source) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAgent(dAtA, i, uint64(len(m.Source))) - i += copy(dAtA[i:], m.Source) - } - if m.Scope != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintAgent(dAtA, i, uint64(m.Scope)) - } - return i, nil -} - func (m *Routes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4372,6 +4146,80 @@ func (m *ReseedRandomDevRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *AgentDetails) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AgentDetails) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Version) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if m.InitDaemon { + dAtA[i] = 0x10 + i++ + if m.InitDaemon { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.DeviceHandlers) > 0 { + for _, s := range m.DeviceHandlers { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.StorageHandlers) > 0 { + for _, s := range m.StorageHandlers { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.SupportsSeccomp { + dAtA[i] = 0x28 + i++ + if m.SupportsSeccomp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + func (m *GuestDetailsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4420,6 +4268,16 @@ func (m *GuestDetailsResponse) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintAgent(dAtA, i, uint64(m.MemBlockSizeBytes)) } + if m.AgentDetails != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.AgentDetails.Size())) + n23, err := m.AgentDetails.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } return i, nil } @@ -5162,6 +5020,10 @@ func (m *CreateSandboxRequest) Size() (n int) { if l > 0 { n += 1 + l + sovAgent(uint64(l)) } + l = len(m.GuestHookPath) + if l > 0 { + n += 1 + l + sovAgent(uint64(l)) + } return n } @@ -5171,54 +5033,6 @@ func (m *DestroySandboxRequest) Size() (n int) { return n } -func (m *IPAddress) Size() (n int) { - var l int - _ = l - if m.Family != 0 { - n += 1 + sovAgent(uint64(m.Family)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.Mask) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - return n -} - -func (m *Interface) Size() (n int) { - var l int - _ = l - l = len(m.Device) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - if len(m.IPAddresses) > 0 { - for _, e := range m.IPAddresses { - l = e.Size() - n += 1 + l + sovAgent(uint64(l)) - } - } - if m.Mtu != 0 { - n += 1 + sovAgent(uint64(m.Mtu)) - } - l = len(m.HwAddr) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.PciAddr) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - return n -} - func (m *Interfaces) Size() (n int) { var l int _ = l @@ -5231,31 +5045,6 @@ func (m *Interfaces) Size() (n int) { return n } -func (m *Route) Size() (n int) { - var l int - _ = l - l = len(m.Dest) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.Gateway) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.Device) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - l = len(m.Source) - if l > 0 { - n += 1 + l + sovAgent(uint64(l)) - } - if m.Scope != 0 { - n += 1 + sovAgent(uint64(m.Scope)) - } - return n -} - func (m *Routes) Size() (n int) { var l int _ = l @@ -5345,6 +5134,34 @@ func (m *ReseedRandomDevRequest) Size() (n int) { return n } +func (m *AgentDetails) Size() (n int) { + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAgent(uint64(l)) + } + if m.InitDaemon { + n += 2 + } + if len(m.DeviceHandlers) > 0 { + for _, s := range m.DeviceHandlers { + l = len(s) + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.StorageHandlers) > 0 { + for _, s := range m.StorageHandlers { + l = len(s) + n += 1 + l + sovAgent(uint64(l)) + } + } + if m.SupportsSeccomp { + n += 2 + } + return n +} + func (m *GuestDetailsRequest) Size() (n int) { var l int _ = l @@ -5360,6 +5177,10 @@ func (m *GuestDetailsResponse) Size() (n int) { if m.MemBlockSizeBytes != 0 { n += 1 + sovAgent(uint64(m.MemBlockSizeBytes)) } + if m.AgentDetails != nil { + l = m.AgentDetails.Size() + n += 1 + l + sovAgent(uint64(l)) + } return n } @@ -9603,6 +9424,35 @@ func (m *CreateSandboxRequest) Unmarshal(dAtA []byte) error { } m.SandboxId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GuestHookPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GuestHookPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAgent(dAtA[iNdEx:]) @@ -9674,349 +9524,6 @@ func (m *DestroySandboxRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Family", wireType) - } - m.Family = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Family |= (IPFamily(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mask", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mask = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAgent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAgent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Interface) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Interface: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Interface: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Device = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPAddresses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IPAddresses = append(m.IPAddresses, &IPAddress{}) - if err := m.IPAddresses[len(m.IPAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mtu", wireType) - } - m.Mtu = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mtu |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HwAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HwAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PciAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PciAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAgent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAgent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Interfaces) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -10072,7 +9579,7 @@ func (m *Interfaces) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Interfaces = append(m.Interfaces, &Interface{}) + m.Interfaces = append(m.Interfaces, &types.Interface{}) if err := m.Interfaces[len(m.Interfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10098,191 +9605,6 @@ func (m *Interfaces) Unmarshal(dAtA []byte) error { } return nil } -func (m *Route) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Route: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Dest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateway = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Device = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAgent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Source = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - m.Scope = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAgent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Scope |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAgent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAgent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Routes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -10338,7 +9660,7 @@ func (m *Routes) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Routes = append(m.Routes, &Route{}) + m.Routes = append(m.Routes, &types.Route{}) if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10420,7 +9742,7 @@ func (m *UpdateInterfaceRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Interface == nil { - m.Interface = &Interface{} + m.Interface = &types.Interface{} } if err := m.Interface.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -10503,7 +9825,7 @@ func (m *AddInterfaceRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Interface == nil { - m.Interface = &Interface{} + m.Interface = &types.Interface{} } if err := m.Interface.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -10586,7 +9908,7 @@ func (m *RemoveInterfaceRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Interface == nil { - m.Interface = &Interface{} + m.Interface = &types.Interface{} } if err := m.Interface.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -10986,6 +10308,183 @@ func (m *ReseedRandomDevRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *AgentDetails) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AgentDetails: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AgentDetails: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InitDaemon", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InitDaemon = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceHandlers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceHandlers = append(m.DeviceHandlers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageHandlers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageHandlers = append(m.StorageHandlers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupportsSeccomp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupportsSeccomp = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GuestDetailsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -11104,6 +10603,39 @@ func (m *GuestDetailsResponse) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentDetails", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentDetails == nil { + m.AgentDetails = &AgentDetails{} + } + if err := m.AgentDetails.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAgent(dAtA[iNdEx:]) @@ -11789,159 +11321,158 @@ var ( func init() { proto.RegisterFile("agent.proto", fileDescriptorAgent) } var fileDescriptorAgent = []byte{ - // 2454 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0x1b, 0xc9, - 0x11, 0x0e, 0x7f, 0x44, 0x89, 0xc5, 0x1f, 0x89, 0x2d, 0x59, 0xe6, 0xd2, 0x8e, 0x57, 0x3b, 0x4e, - 0xbc, 0xca, 0x6e, 0x2c, 0x63, 0x65, 0x23, 0x59, 0xd8, 0x30, 0x1c, 0xeb, 0x27, 0xb2, 0xb2, 0xeb, - 0x98, 0x19, 0x59, 0x70, 0x80, 0x20, 0x20, 0x46, 0x33, 0x2d, 0xaa, 0xd7, 0x9c, 0xe9, 0xd9, 0xee, - 0x1e, 0x49, 0xdc, 0x05, 0x72, 0xcc, 0x5b, 0xe4, 0x05, 0x82, 0x20, 0x97, 0x9c, 0x72, 0xcf, 0x21, - 0xc7, 0x3c, 0x41, 0x10, 0xf8, 0x11, 0xf2, 0x04, 0x41, 0xff, 0xcd, 0x0f, 0x49, 0xc9, 0x89, 0x56, - 0x40, 0x2e, 0x64, 0x57, 0x75, 0x75, 0xd5, 0x57, 0xd5, 0xdd, 0x35, 0xd5, 0x05, 0x0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0xbe, 0x11, 0xfe, 0x21, 0xb4, 0x33, 0x61, 0x99, 0x7f, 0x0c, 0xde, 0x56, 0xca, 0x7d, 0x4d, - 0x42, 0xec, 0x9c, 0xaa, 0x58, 0xa9, 0x4d, 0x46, 0x9f, 0x42, 0x3d, 0x8b, 0x43, 0x49, 0x9d, 0x90, - 0xb6, 0x3e, 0x21, 0x36, 0x9c, 0xee, 0x42, 0x1a, 0x94, 0xa7, 0xb0, 0x28, 0x52, 0xe0, 0x83, 0xc0, - 0x13, 0x5e, 0xf1, 0x50, 0x15, 0xbd, 0x72, 0xdb, 0xa2, 0x40, 0x3b, 0x4f, 0xa0, 0xde, 0x27, 0x01, - 0xd7, 0x86, 0xbb, 0x30, 0xef, 0x27, 0x8c, 0xe1, 0x48, 0x58, 0x97, 0x0d, 0x89, 0x56, 0x60, 0x6e, - 0x44, 0x42, 0x22, 0x8c, 0x9b, 0x9a, 0x70, 0x28, 0xc0, 0x4b, 0x1c, 0x52, 0x36, 0x56, 0x01, 0x5b, - 0x81, 0xb9, 0xfc, 0xe6, 0x6a, 0x02, 0xdd, 0x82, 0x7a, 0xe8, 0x9d, 0xa7, 0x9b, 0x2a, 0x67, 0x16, - 0x42, 0xef, 0x5c, 0x83, 0xef, 0xc2, 0xfc, 0xb1, 0x47, 0x46, 0x7e, 0x24, 0x4c, 0x54, 0x2c, 0x99, - 0x19, 0xac, 0xe6, 0x0d, 0xfe, 0xad, 0x0c, 0x0d, 0x6d, 0x51, 0x03, 0x5e, 0x81, 0x39, 0xdf, 0xf3, - 0x4f, 0x52, 0x93, 0x8a, 0x40, 0xf7, 0x2c, 0x90, 0x72, 0x3e, 0x09, 0x67, 0x48, 0x2d, 0xb4, 0x07, - 0x00, 0xfc, 0xcc, 0x8b, 0x0d, 0xb6, 0xca, 0x05, 0xc2, 0x75, 0x29, 0xa3, 0xe1, 0x3e, 0x84, 0xa6, - 0x3e, 0x77, 0x66, 0x49, 0xf5, 0x82, 0x25, 0x0d, 0x2d, 0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x55, 0x38, 0xa8, - 0xff, 0x95, 0x86, 0x89, 0x22, 0xa3, 0x98, 0x47, 0xde, 0xaf, 0xe1, 0xa7, 0xd0, 0xcc, 0x57, 0x17, - 0x16, 0xff, 0x8c, 0x8a, 0xa3, 0x57, 0xa8, 0x30, 0xd0, 0x33, 0x68, 0x17, 0x2b, 0x0b, 0x94, 0xbb, - 0x94, 0x53, 0xf5, 0x46, 0x6f, 0x69, 0xc2, 0x30, 0x47, 0x0f, 0x01, 0xb2, 0x0a, 0xc4, 0xee, 0xdd, - 0x54, 0x4d, 0x32, 0x61, 0x75, 0x1b, 0x5a, 0x85, 0x17, 0x8b, 0xcd, 0x12, 0xb3, 0x9e, 0x31, 0x97, - 0x25, 0xf1, 0xe2, 0x0b, 0xc2, 0x42, 0x9f, 0xf9, 0xae, 0xb8, 0xec, 0xf4, 0xe4, 0xab, 0x25, 0x1b, - 0xba, 0x19, 0x15, 0xd4, 0x7b, 0x6e, 0x73, 0xbe, 0x22, 0xca, 0xdd, 0xe6, 0x19, 0x85, 0xd2, 0x85, - 0x8a, 0x5e, 0xc0, 0xe2, 0x1e, 0x16, 0xf9, 0x92, 0xc7, 0xc2, 0x99, 0x51, 0x43, 0xf5, 0x7a, 0xb3, - 0xa6, 0xf4, 0x95, 0xda, 0x6a, 0xfe, 0xfd, 0xdd, 0x9d, 0xd2, 0x3f, 0xde, 0xdd, 0x29, 0xfd, 0xeb, - 0xdd, 0x9d, 0xd2, 0x51, 0x4d, 0xd9, 0x79, 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x35, - 0xb4, 0xc7, 0xea, 0x1d, 0x00, 0x00, + // 2442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x49, 0x6f, 0x1c, 0xc7, + 0x15, 0xc6, 0x2c, 0x5c, 0xe6, 0xcd, 0xc6, 0x29, 0x52, 0xd4, 0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61, 0xc9, 0x4b, 0xe2, 0x18, 0x87, 0xdc, 0xb8, 0xac, 0x49, 0xb4, 0x06, + 0x0b, 0x23, 0x12, 0x10, 0xae, 0xdd, 0x54, 0x84, 0x45, 0x01, 0x9e, 0xe1, 0x80, 0xc6, 0x63, 0x19, + 0xb0, 0x35, 0x58, 0xc8, 0x2f, 0xae, 0x22, 0xd0, 0x1d, 0xa8, 0x05, 0xee, 0x65, 0xba, 0xa8, 0x62, + 0x64, 0x39, 0x70, 0x2f, 0x95, 0xf1, 0x5d, 0x58, 0x7a, 0xe5, 0x92, 0x91, 0x17, 0x72, 0x1d, 0x15, + 0x43, 0x66, 0x0a, 0xab, 0x79, 0x85, 0x7f, 0x2f, 0x43, 0x5d, 0x69, 0x54, 0x06, 0xaf, 0xc1, 0x82, + 0xe7, 0x7a, 0xc3, 0x54, 0xa5, 0x24, 0xd0, 0x7d, 0x63, 0x48, 0x39, 0x9f, 0x84, 0x33, 0x4b, 0x8d, + 0x69, 0x5b, 0x00, 0xec, 0xb5, 0x1b, 0x69, 0xdb, 0x2a, 0x73, 0x84, 0x6b, 0x42, 0x46, 0x99, 0xfb, + 0x10, 0x1a, 0x6a, 0xdf, 0xe9, 0x29, 0xd5, 0x39, 0x53, 0xea, 0x4a, 0x4a, 0x4d, 0xba, 0x07, 0xcd, + 0x84, 0x61, 0x67, 0x48, 0x70, 0xec, 0xc6, 0xde, 0x70, 0xdc, 0x5d, 0x50, 0x77, 0x64, 0xc2, 0xf0, + 0xa1, 0xe1, 0xa1, 0x6d, 0x58, 0x10, 0xe9, 0x8f, 0x75, 0x17, 0xe5, 0x75, 0xfc, 0x6e, 0x1e, 0x52, + 0xba, 0xda, 0x97, 0xdf, 0xfd, 0x90, 0xc7, 0x63, 0x5b, 0x89, 0xf6, 0x3e, 0x03, 0xc8, 0x98, 0x68, + 0x05, 0x2a, 0xe7, 0x78, 0xac, 0xcf, 0xa1, 0xf8, 0x15, 0xc1, 0xb9, 0x70, 0x47, 0x89, 0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x66, + 0x14, 0x59, 0xbd, 0xde, 0xac, 0x21, 0x75, 0xaa, 0x76, 0x1a, 0xdf, 0xbe, 0xb9, 0x5b, 0xfa, 0xc7, + 0x9b, 0xbb, 0xa5, 0x7f, 0xbf, 0xb9, 0x5b, 0x3a, 0x5b, 0x94, 0x7a, 0x1e, 0xfe, 0x37, 0x00, 0x00, + 0xff, 0xff, 0x5e, 0x1c, 0x23, 0x7f, 0xaa, 0x1d, 0x00, 0x00, } diff --git a/vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go b/vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go index 2126ae3259..7f3d4e72a5 100644 --- a/vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go +++ b/vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go @@ -108,7 +108,10 @@ func init() { } func (this *CheckRequest) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*CheckRequest) @@ -121,7 +124,10 @@ func (this *CheckRequest) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -132,7 +138,10 @@ func (this *CheckRequest) Equal(that interface{}) bool { } func (this *HealthCheckResponse) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*HealthCheckResponse) @@ -145,7 +154,10 @@ func (this *HealthCheckResponse) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -156,7 +168,10 @@ func (this *HealthCheckResponse) Equal(that interface{}) bool { } func (this *VersionCheckResponse) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*VersionCheckResponse) @@ -169,7 +184,10 @@ func (this *VersionCheckResponse) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } diff --git a/vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go b/vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go index 5296a082f2..cbfbab5870 100644 --- a/vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go +++ b/vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go @@ -1499,7 +1499,10 @@ func init() { } func (this *Spec) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Spec) @@ -1512,7 +1515,10 @@ func (this *Spec) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1560,7 +1566,10 @@ func (this *Spec) Equal(that interface{}) bool { } func (this *Process) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Process) @@ -1573,7 +1582,10 @@ func (this *Process) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1632,7 +1644,10 @@ func (this *Process) Equal(that interface{}) bool { } func (this *Box) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Box) @@ -1645,7 +1660,10 @@ func (this *Box) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1659,7 +1677,10 @@ func (this *Box) Equal(that interface{}) bool { } func (this *User) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*User) @@ -1672,7 +1693,10 @@ func (this *User) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1697,7 +1721,10 @@ func (this *User) Equal(that interface{}) bool { } func (this *LinuxCapabilities) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxCapabilities) @@ -1710,7 +1737,10 @@ func (this *LinuxCapabilities) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1758,7 +1788,10 @@ func (this *LinuxCapabilities) Equal(that interface{}) bool { } func (this *POSIXRlimit) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*POSIXRlimit) @@ -1771,7 +1804,10 @@ func (this *POSIXRlimit) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1788,7 +1824,10 @@ func (this *POSIXRlimit) Equal(that interface{}) bool { } func (this *Mount) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Mount) @@ -1801,7 +1840,10 @@ func (this *Mount) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1826,7 +1868,10 @@ func (this *Mount) Equal(that interface{}) bool { } func (this *Root) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Root) @@ -1839,7 +1884,10 @@ func (this *Root) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1853,7 +1901,10 @@ func (this *Root) Equal(that interface{}) bool { } func (this *Hooks) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Hooks) @@ -1866,7 +1917,10 @@ func (this *Hooks) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1898,7 +1952,10 @@ func (this *Hooks) Equal(that interface{}) bool { } func (this *Hook) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Hook) @@ -1911,7 +1968,10 @@ func (this *Hook) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -1941,7 +2001,10 @@ func (this *Hook) Equal(that interface{}) bool { } func (this *Linux) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Linux) @@ -1954,7 +2017,10 @@ func (this *Linux) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2036,7 +2102,10 @@ func (this *Linux) Equal(that interface{}) bool { } func (this *Windows) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Windows) @@ -2049,7 +2118,10 @@ func (this *Windows) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2060,7 +2132,10 @@ func (this *Windows) Equal(that interface{}) bool { } func (this *Solaris) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*Solaris) @@ -2073,7 +2148,10 @@ func (this *Solaris) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2084,7 +2162,10 @@ func (this *Solaris) Equal(that interface{}) bool { } func (this *LinuxIDMapping) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxIDMapping) @@ -2097,7 +2178,10 @@ func (this *LinuxIDMapping) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2114,7 +2198,10 @@ func (this *LinuxIDMapping) Equal(that interface{}) bool { } func (this *LinuxNamespace) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxNamespace) @@ -2127,7 +2214,10 @@ func (this *LinuxNamespace) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2141,7 +2231,10 @@ func (this *LinuxNamespace) Equal(that interface{}) bool { } func (this *LinuxDevice) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxDevice) @@ -2154,7 +2247,10 @@ func (this *LinuxDevice) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2183,7 +2279,10 @@ func (this *LinuxDevice) Equal(that interface{}) bool { } func (this *LinuxResources) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxResources) @@ -2196,7 +2295,10 @@ func (this *LinuxResources) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2235,7 +2337,10 @@ func (this *LinuxResources) Equal(that interface{}) bool { } func (this *LinuxMemory) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxMemory) @@ -2248,7 +2353,10 @@ func (this *LinuxMemory) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2277,7 +2385,10 @@ func (this *LinuxMemory) Equal(that interface{}) bool { } func (this *LinuxCPU) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxCPU) @@ -2290,7 +2401,10 @@ func (this *LinuxCPU) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2319,7 +2433,10 @@ func (this *LinuxCPU) Equal(that interface{}) bool { } func (this *LinuxWeightDevice) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxWeightDevice) @@ -2332,7 +2449,10 @@ func (this *LinuxWeightDevice) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2352,7 +2472,10 @@ func (this *LinuxWeightDevice) Equal(that interface{}) bool { } func (this *LinuxThrottleDevice) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxThrottleDevice) @@ -2365,7 +2488,10 @@ func (this *LinuxThrottleDevice) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2382,7 +2508,10 @@ func (this *LinuxThrottleDevice) Equal(that interface{}) bool { } func (this *LinuxBlockIO) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxBlockIO) @@ -2395,7 +2524,10 @@ func (this *LinuxBlockIO) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2449,7 +2581,10 @@ func (this *LinuxBlockIO) Equal(that interface{}) bool { } func (this *LinuxPids) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxPids) @@ -2462,7 +2597,10 @@ func (this *LinuxPids) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2473,7 +2611,10 @@ func (this *LinuxPids) Equal(that interface{}) bool { } func (this *LinuxDeviceCgroup) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxDeviceCgroup) @@ -2486,7 +2627,10 @@ func (this *LinuxDeviceCgroup) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2509,7 +2653,10 @@ func (this *LinuxDeviceCgroup) Equal(that interface{}) bool { } func (this *LinuxNetwork) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxNetwork) @@ -2522,7 +2669,10 @@ func (this *LinuxNetwork) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2541,7 +2691,10 @@ func (this *LinuxNetwork) Equal(that interface{}) bool { } func (this *LinuxHugepageLimit) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxHugepageLimit) @@ -2554,7 +2707,10 @@ func (this *LinuxHugepageLimit) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2568,7 +2724,10 @@ func (this *LinuxHugepageLimit) Equal(that interface{}) bool { } func (this *LinuxInterfacePriority) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxInterfacePriority) @@ -2581,7 +2740,10 @@ func (this *LinuxInterfacePriority) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2595,7 +2757,10 @@ func (this *LinuxInterfacePriority) Equal(that interface{}) bool { } func (this *LinuxSeccomp) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxSeccomp) @@ -2608,7 +2773,10 @@ func (this *LinuxSeccomp) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2635,7 +2803,10 @@ func (this *LinuxSeccomp) Equal(that interface{}) bool { } func (this *LinuxSeccompArg) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxSeccompArg) @@ -2648,7 +2819,10 @@ func (this *LinuxSeccompArg) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2668,7 +2842,10 @@ func (this *LinuxSeccompArg) Equal(that interface{}) bool { } func (this *LinuxSyscall) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxSyscall) @@ -2681,7 +2858,10 @@ func (this *LinuxSyscall) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } @@ -2708,7 +2888,10 @@ func (this *LinuxSyscall) Equal(that interface{}) bool { } func (this *LinuxIntelRdt) Equal(that interface{}) bool { if that == nil { - return this == nil + if this == nil { + return true + } + return false } that1, ok := that.(*LinuxIntelRdt) @@ -2721,7 +2904,10 @@ func (this *LinuxIntelRdt) Equal(that interface{}) bool { } } if that1 == nil { - return this == nil + if this == nil { + return true + } + return false } else if this == nil { return false } diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go index 71c9fa7731..9984bbce30 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go @@ -25,6 +25,8 @@ type Spec struct { Solaris *Solaris `json:"solaris,omitempty" platform:"solaris"` // Windows is platform-specific configuration for Windows based containers. Windows *Windows `json:"windows,omitempty" platform:"windows"` + // VM specifies configuration for virtual-machine-based containers. + VM *VM `json:"vm,omitempty" platform:"vm"` } // Process contains information to start a specific application inside the container. @@ -158,8 +160,8 @@ type Linux struct { ReadonlyPaths []string `json:"readonlyPaths,omitempty"` // MountLabel specifies the selinux context for the mounts in the container. MountLabel string `json:"mountLabel,omitempty"` - // IntelRdt contains Intel Resource Director Technology (RDT) information - // for handling resource constraints (e.g., L3 cache) for the container + // IntelRdt contains Intel Resource Director Technology (RDT) information for + // handling resource constraints (e.g., L3 cache, memory bandwidth) for the container IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"` } @@ -194,10 +196,10 @@ const ( // LinuxIDMapping specifies UID/GID mappings type LinuxIDMapping struct { - // HostID is the starting UID/GID on the host to be mapped to 'ContainerID' - HostID uint32 `json:"hostID"` // ContainerID is the starting UID/GID in the container ContainerID uint32 `json:"containerID"` + // HostID is the starting UID/GID on the host to be mapped to 'ContainerID' + HostID uint32 `json:"hostID"` // Size is the number of IDs to be mapped Size uint32 `json:"size"` } @@ -320,6 +322,14 @@ type LinuxNetwork struct { Priorities []LinuxInterfacePriority `json:"priorities,omitempty"` } +// LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11) +type LinuxRdma struct { + // Maximum number of HCA handles that can be opened. Default is "no limit". + HcaHandles *uint32 `json:"hcaHandles,omitempty"` + // Maximum number of HCA objects that can be created. Default is "no limit". + HcaObjects *uint32 `json:"hcaObjects,omitempty"` +} + // LinuxResources has container runtime resource constraints type LinuxResources struct { // Devices configures the device whitelist. @@ -336,6 +346,10 @@ type LinuxResources struct { HugepageLimits []LinuxHugepageLimit `json:"hugepageLimits,omitempty"` // Network restriction configuration Network *LinuxNetwork `json:"network,omitempty"` + // Rdma resource restriction configuration. + // Limits are a set of key value pairs that define RDMA resource limits, + // where the key is device name and value is resource limits. + Rdma map[string]LinuxRdma `json:"rdma,omitempty"` } // LinuxDevice represents the mknod information for a Linux special device file @@ -419,6 +433,8 @@ type SolarisAnet struct { type Windows struct { // LayerFolders contains a list of absolute paths to directories containing image layers. LayerFolders []string `json:"layerFolders"` + // Devices are the list of devices to be mapped into the container. + Devices []WindowsDevice `json:"devices,omitempty"` // Resources contains information for handling resource constraints for the container. Resources *WindowsResources `json:"resources,omitempty"` // CredentialSpec contains a JSON object describing a group Managed Service Account (gMSA) specification. @@ -433,6 +449,14 @@ type Windows struct { Network *WindowsNetwork `json:"network,omitempty"` } +// WindowsDevice represents information about a host device to be mapped into the container. +type WindowsDevice struct { + // Device identifier: interface class GUID, etc. + ID string `json:"id"` + // Device identifier type: "class", etc. + IDType string `json:"idType"` +} + // WindowsResources has container runtime resource constraints for containers running on Windows. type WindowsResources struct { // Memory restriction configuration. @@ -479,6 +503,8 @@ type WindowsNetwork struct { DNSSearchList []string `json:"DNSSearchList,omitempty"` // Name (ID) of the container that we will share with the network stack. NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"` + // name (ID) of the network namespace that will be used for the container. + NetworkNamespace string `json:"networkNamespace,omitempty"` } // WindowsHyperV contains information for configuring a container to run with Hyper-V isolation. @@ -487,6 +513,42 @@ type WindowsHyperV struct { UtilityVMPath string `json:"utilityVMPath,omitempty"` } +// VM contains information for virtual-machine-based containers. +type VM struct { + // Hypervisor specifies hypervisor-related configuration for virtual-machine-based containers. + Hypervisor VMHypervisor `json:"hypervisor,omitempty"` + // Kernel specifies kernel-related configuration for virtual-machine-based containers. + Kernel VMKernel `json:"kernel"` + // Image specifies guest image related configuration for virtual-machine-based containers. + Image VMImage `json:"image,omitempty"` +} + +// VMHypervisor contains information about the hypervisor to use for a virtual machine. +type VMHypervisor struct { + // Path is the host path to the hypervisor used to manage the virtual machine. + Path string `json:"path"` + // Parameters specifies parameters to pass to the hypervisor. + Parameters string `json:"parameters,omitempty"` +} + +// VMKernel contains information about the kernel to use for a virtual machine. +type VMKernel struct { + // Path is the host path to the kernel used to boot the virtual machine. + Path string `json:"path"` + // Parameters specifies parameters to pass to the kernel. + Parameters string `json:"parameters,omitempty"` + // InitRD is the host path to an initial ramdisk to be used by the kernel. + InitRD string `json:"initrd,omitempty"` +} + +// VMImage contains information about the virtual machine root image. +type VMImage struct { + // Path is the host path to the root image that the VM kernel would boot into. + Path string `json:"path"` + // Format is the root image format type (e.g. "qcow2", "raw", "vhd", etc). + Format string `json:"format"` +} + // LinuxSeccomp represents syscall restrictions type LinuxSeccomp struct { DefaultAction LinuxSeccompAction `json:"defaultAction"` @@ -561,10 +623,16 @@ type LinuxSyscall struct { Args []LinuxSeccompArg `json:"args,omitempty"` } -// LinuxIntelRdt has container runtime resource constraints -// for Intel RDT/CAT which introduced in Linux 4.10 kernel +// LinuxIntelRdt has container runtime resource constraints for Intel RDT +// CAT and MBA features which introduced in Linux 4.10 and 4.12 kernel type LinuxIntelRdt struct { + // The identity for RDT Class of Service + ClosID string `json:"closID,omitempty"` // The schema for L3 cache id and capacity bitmask (CBM) // Format: "L3:=;=;..." L3CacheSchema string `json:"l3CacheSchema,omitempty"` + + // The schema of memory bandwidth percentage per L3 cache id + // Format: "MB:=bandwidth0;=bandwidth1;..." + MemBwSchema string `json:"memBwSchema,omitempty"` } diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go index ff0cb6a80e..b920fc1b39 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go @@ -11,7 +11,7 @@ const ( VersionPatch = 1 // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "" + VersionDev = "-dev" ) // Version is the specification version that the package types support. diff --git a/virtcontainers/agent.go b/virtcontainers/agent.go index 9848ead4b8..f2e5e0ca2d 100644 --- a/virtcontainers/agent.go +++ b/virtcontainers/agent.go @@ -9,6 +9,7 @@ import ( "fmt" "syscall" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/agent/protocols/grpc" "github.com/mitchellh/mapstructure" specs "github.com/opencontainers/runtime-spec/specs-go" @@ -229,16 +230,16 @@ type agent interface { reseedRNG(data []byte) error // updateInterface will tell the agent to update a nic for an existed Sandbox. - updateInterface(inf *grpc.Interface) (*grpc.Interface, error) + updateInterface(inf *types.Interface) (*types.Interface, error) // listInterfaces will tell the agent to list interfaces of an existed Sandbox - listInterfaces() ([]*grpc.Interface, error) + listInterfaces() ([]*types.Interface, error) // updateRoutes will tell the agent to update route table for an existed Sandbox. - updateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) + updateRoutes(routes []*types.Route) ([]*types.Route, error) // listRoutes will tell the agent to list routes of an existed Sandbox - listRoutes() ([]*grpc.Route, error) + listRoutes() ([]*types.Route, error) // getGuestDetails will tell the agent to get some information of guest getGuestDetails(*grpc.GuestDetailsRequest) (*grpc.GuestDetailsResponse, error) diff --git a/virtcontainers/api.go b/virtcontainers/api.go index afdb8f0d9a..64e65f2c63 100644 --- a/virtcontainers/api.go +++ b/virtcontainers/api.go @@ -11,7 +11,7 @@ import ( "runtime" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" deviceApi "github.com/kata-containers/runtime/virtcontainers/device/api" deviceConfig "github.com/kata-containers/runtime/virtcontainers/device/config" specs "github.com/opencontainers/runtime-spec/specs-go" @@ -867,7 +867,7 @@ func AddDevice(ctx context.Context, sandboxID string, info deviceConfig.DeviceIn return s.AddDevice(info) } -func toggleInterface(ctx context.Context, sandboxID string, inf *grpc.Interface, add bool) (*grpc.Interface, error) { +func toggleInterface(ctx context.Context, sandboxID string, inf *types.Interface, add bool) (*types.Interface, error) { if sandboxID == "" { return nil, errNeedSandboxID } @@ -892,7 +892,7 @@ func toggleInterface(ctx context.Context, sandboxID string, inf *grpc.Interface, } // AddInterface is the virtcontainers add interface entry point. -func AddInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func AddInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { span, ctx := trace(ctx, "AddInterface") defer span.Finish() @@ -900,7 +900,7 @@ func AddInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (* } // RemoveInterface is the virtcontainers remove interface entry point. -func RemoveInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func RemoveInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { span, ctx := trace(ctx, "RemoveInterface") defer span.Finish() @@ -908,7 +908,7 @@ func RemoveInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) } // ListInterfaces is the virtcontainers list interfaces entry point. -func ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) { +func ListInterfaces(ctx context.Context, sandboxID string) ([]*types.Interface, error) { span, ctx := trace(ctx, "ListInterfaces") defer span.Finish() @@ -932,7 +932,7 @@ func ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, e } // UpdateRoutes is the virtcontainers update routes entry point. -func UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) { +func UpdateRoutes(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) { span, ctx := trace(ctx, "UpdateRoutes") defer span.Finish() @@ -956,7 +956,7 @@ func UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) ( } // ListRoutes is the virtcontainers list routes entry point. -func ListRoutes(ctx context.Context, sandboxID string) ([]*grpc.Route, error) { +func ListRoutes(ctx context.Context, sandboxID string) ([]*types.Route, error) { span, ctx := trace(ctx, "ListRoutes") defer span.Finish() diff --git a/virtcontainers/api_test.go b/virtcontainers/api_test.go index 5dc6e422ca..a7e172fcef 100644 --- a/virtcontainers/api_test.go +++ b/virtcontainers/api_test.go @@ -18,7 +18,7 @@ import ( "testing" "github.com/containernetworking/plugins/pkg/ns" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/runtime/virtcontainers/pkg/mock" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/stretchr/testify/assert" @@ -2422,12 +2422,12 @@ func TestNetworkOperation(t *testing.T) { cleanUp() assert := assert.New(t) - inf := &grpc.Interface{ + inf := &types.Interface{ Name: "eno1", Mtu: 1500, HwAddr: "02:00:ca:fe:00:48", } - ip := grpc.IPAddress{ + ip := types.IPAddress{ Family: 0, Address: "192.168.0.101", Mask: "24", diff --git a/virtcontainers/hyperstart_agent.go b/virtcontainers/hyperstart_agent.go index 43f6489ce0..4cfb4e3697 100644 --- a/virtcontainers/hyperstart_agent.go +++ b/virtcontainers/hyperstart_agent.go @@ -18,6 +18,7 @@ import ( "github.com/vishvananda/netlink" proxyClient "github.com/clearcontainers/proxy/client" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/agent/protocols/grpc" "github.com/kata-containers/runtime/virtcontainers/device/config" "github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart" @@ -888,22 +889,22 @@ func (h *hyper) onlineCPUMem(cpus uint32, cpuOnly bool) error { return nil } -func (h *hyper) updateInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (h *hyper) updateInterface(inf *types.Interface) (*types.Interface, error) { // hyperstart-agent does not support update interface return nil, nil } -func (h *hyper) listInterfaces() ([]*grpc.Interface, error) { +func (h *hyper) listInterfaces() ([]*types.Interface, error) { // hyperstart-agent does not support list interfaces return nil, nil } -func (h *hyper) updateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { +func (h *hyper) updateRoutes(routes []*types.Route) ([]*types.Route, error) { // hyperstart-agent does not support update routes return nil, nil } -func (h *hyper) listRoutes() ([]*grpc.Route, error) { +func (h *hyper) listRoutes() ([]*types.Route, error) { // hyperstart-agent does not support list routes return nil, nil } diff --git a/virtcontainers/implementation.go b/virtcontainers/implementation.go index 98459a6320..152f330452 100644 --- a/virtcontainers/implementation.go +++ b/virtcontainers/implementation.go @@ -13,7 +13,7 @@ import ( "context" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" specs "github.com/opencontainers/runtime-spec/specs-go" @@ -152,26 +152,26 @@ func (impl *VCImpl) AddDevice(ctx context.Context, sandboxID string, info config } // AddInterface implements the VC function of the same name. -func (impl *VCImpl) AddInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func (impl *VCImpl) AddInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { return AddInterface(ctx, sandboxID, inf) } // RemoveInterface implements the VC function of the same name. -func (impl *VCImpl) RemoveInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func (impl *VCImpl) RemoveInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { return RemoveInterface(ctx, sandboxID, inf) } // ListInterfaces implements the VC function of the same name. -func (impl *VCImpl) ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) { +func (impl *VCImpl) ListInterfaces(ctx context.Context, sandboxID string) ([]*types.Interface, error) { return ListInterfaces(ctx, sandboxID) } // UpdateRoutes implements the VC function of the same name. -func (impl *VCImpl) UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) { +func (impl *VCImpl) UpdateRoutes(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) { return UpdateRoutes(ctx, sandboxID, routes) } // ListRoutes implements the VC function of the same name. -func (impl *VCImpl) ListRoutes(ctx context.Context, sandboxID string) ([]*grpc.Route, error) { +func (impl *VCImpl) ListRoutes(ctx context.Context, sandboxID string) ([]*types.Route, error) { return ListRoutes(ctx, sandboxID) } diff --git a/virtcontainers/interfaces.go b/virtcontainers/interfaces.go index 906d54c938..22d93ea28f 100644 --- a/virtcontainers/interfaces.go +++ b/virtcontainers/interfaces.go @@ -10,7 +10,7 @@ import ( "io" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" specs "github.com/opencontainers/runtime-spec/specs-go" @@ -48,11 +48,11 @@ type VC interface { AddDevice(ctx context.Context, sandboxID string, info config.DeviceInfo) (api.Device, error) - AddInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) - RemoveInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) - ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) - UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) - ListRoutes(ctx context.Context, sandboxID string) ([]*grpc.Route, error) + AddInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) + RemoveInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) + ListInterfaces(ctx context.Context, sandboxID string) ([]*types.Interface, error) + UpdateRoutes(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) + ListRoutes(ctx context.Context, sandboxID string) ([]*types.Route, error) } // VCSandbox is the Sandbox interface @@ -86,11 +86,11 @@ type VCSandbox interface { AddDevice(info config.DeviceInfo) (api.Device, error) - AddInterface(inf *grpc.Interface) (*grpc.Interface, error) - RemoveInterface(inf *grpc.Interface) (*grpc.Interface, error) - ListInterfaces() ([]*grpc.Interface, error) - UpdateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) - ListRoutes() ([]*grpc.Route, error) + AddInterface(inf *types.Interface) (*types.Interface, error) + RemoveInterface(inf *types.Interface) (*types.Interface, error) + ListInterfaces() ([]*types.Interface, error) + UpdateRoutes(routes []*types.Route) ([]*types.Route, error) + ListRoutes() ([]*types.Route, error) } // VCContainer is the Container interface diff --git a/virtcontainers/kata_agent.go b/virtcontainers/kata_agent.go index 4a7dbaf073..d1c01219d0 100644 --- a/virtcontainers/kata_agent.go +++ b/virtcontainers/kata_agent.go @@ -18,6 +18,7 @@ import ( "syscall" "time" + "github.com/kata-containers/agent/pkg/types" kataclient "github.com/kata-containers/agent/protocols/client" "github.com/kata-containers/agent/protocols/grpc" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -383,7 +384,7 @@ func (k *kataAgent) exec(sandbox *Sandbox, c Container, cmd Cmd) (*Process, erro k.state.URL, cmd, []ns.NSType{}, enterNSList) } -func (k *kataAgent) updateInterface(ifc *grpc.Interface) (*grpc.Interface, error) { +func (k *kataAgent) updateInterface(ifc *types.Interface) (*types.Interface, error) { // send update interface request ifcReq := &grpc.UpdateInterfaceRequest{ Interface: ifc, @@ -395,13 +396,13 @@ func (k *kataAgent) updateInterface(ifc *grpc.Interface) (*grpc.Interface, error "resulting-interface": fmt.Sprintf("%+v", resultingInterface), }).WithError(err).Error("update interface request failed") } - if resultInterface, ok := resultingInterface.(*grpc.Interface); ok { + if resultInterface, ok := resultingInterface.(*types.Interface); ok { return resultInterface, err } return nil, err } -func (k *kataAgent) updateInterfaces(interfaces []*grpc.Interface) error { +func (k *kataAgent) updateInterfaces(interfaces []*types.Interface) error { for _, ifc := range interfaces { if _, err := k.updateInterface(ifc); err != nil { return err @@ -410,7 +411,7 @@ func (k *kataAgent) updateInterfaces(interfaces []*grpc.Interface) error { return nil } -func (k *kataAgent) updateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { +func (k *kataAgent) updateRoutes(routes []*types.Route) ([]*types.Route, error) { if routes != nil { routesReq := &grpc.UpdateRoutesRequest{ Routes: &grpc.Routes{ @@ -433,7 +434,7 @@ func (k *kataAgent) updateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { return nil, nil } -func (k *kataAgent) listInterfaces() ([]*grpc.Interface, error) { +func (k *kataAgent) listInterfaces() ([]*types.Interface, error) { req := &grpc.ListInterfacesRequest{} resultingInterfaces, err := k.sendReq(req) if err != nil { @@ -446,7 +447,7 @@ func (k *kataAgent) listInterfaces() ([]*grpc.Interface, error) { return nil, err } -func (k *kataAgent) listRoutes() ([]*grpc.Route, error) { +func (k *kataAgent) listRoutes() ([]*types.Route, error) { req := &grpc.ListRoutesRequest{} resultingRoutes, err := k.sendReq(req) if err != nil { diff --git a/virtcontainers/kata_agent_test.go b/virtcontainers/kata_agent_test.go index 3482a40279..3fc9f2ade3 100644 --- a/virtcontainers/kata_agent_test.go +++ b/virtcontainers/kata_agent_test.go @@ -23,6 +23,7 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" + "github.com/kata-containers/agent/pkg/types" pb "github.com/kata-containers/agent/protocols/grpc" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -184,16 +185,16 @@ func (p *gRPCProxy) DestroySandbox(ctx context.Context, req *pb.DestroySandboxRe return emptyResp, nil } -func (p *gRPCProxy) AddInterface(ctx context.Context, req *pb.AddInterfaceRequest) (*pb.Interface, error) { +func (p *gRPCProxy) AddInterface(ctx context.Context, req *pb.AddInterfaceRequest) (*types.Interface, error) { return nil, nil } -func (p *gRPCProxy) RemoveInterface(ctx context.Context, req *pb.RemoveInterfaceRequest) (*pb.Interface, error) { +func (p *gRPCProxy) RemoveInterface(ctx context.Context, req *pb.RemoveInterfaceRequest) (*types.Interface, error) { return nil, nil } -func (p *gRPCProxy) UpdateInterface(ctx context.Context, req *pb.UpdateInterfaceRequest) (*pb.Interface, error) { - return &pb.Interface{}, nil +func (p *gRPCProxy) UpdateInterface(ctx context.Context, req *pb.UpdateInterfaceRequest) (*types.Interface, error) { + return &types.Interface{}, nil } func (p *gRPCProxy) UpdateRoutes(ctx context.Context, req *pb.UpdateRoutesRequest) (*pb.Routes, error) { @@ -799,7 +800,7 @@ func TestAgentNetworkOperation(t *testing.T) { _, err = k.listInterfaces() assert.Nil(err) - _, err = k.updateRoutes([]*pb.Route{}) + _, err = k.updateRoutes([]*types.Route{}) assert.Nil(err) _, err = k.listRoutes() diff --git a/virtcontainers/network.go b/virtcontainers/network.go index 86f5a3b345..7827385ce1 100644 --- a/virtcontainers/network.go +++ b/virtcontainers/network.go @@ -22,7 +22,7 @@ import ( "github.com/vishvananda/netns" "golang.org/x/sys/unix" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/runtime/virtcontainers/pkg/uuid" "github.com/kata-containers/runtime/virtcontainers/utils" ) @@ -1148,18 +1148,18 @@ func deleteNetNS(netNSPath string) error { return nil } -func generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*grpc.Interface, []*grpc.Route, error) { +func generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*types.Interface, []*types.Route, error) { if networkNS.NetNsPath == "" { return nil, nil, nil } - var routes []*grpc.Route - var ifaces []*grpc.Interface + var routes []*types.Route + var ifaces []*types.Interface for _, endpoint := range networkNS.Endpoints { - var ipAddresses []*grpc.IPAddress + var ipAddresses []*types.IPAddress for _, addr := range endpoint.Properties().Addrs { // Skip IPv6 because not supported if addr.IP.To4() == nil { @@ -1175,14 +1175,14 @@ func generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*grpc.Interface, continue } netMask, _ := addr.Mask.Size() - ipAddress := grpc.IPAddress{ - Family: grpc.IPFamily_v4, + ipAddress := types.IPAddress{ + Family: types.IPFamily_v4, Address: addr.IP.String(), Mask: fmt.Sprintf("%d", netMask), } ipAddresses = append(ipAddresses, &ipAddress) } - ifc := grpc.Interface{ + ifc := types.Interface{ IPAddresses: ipAddresses, Device: endpoint.Name(), Name: endpoint.Name(), @@ -1193,7 +1193,7 @@ func generateInterfacesAndRoutes(networkNS NetworkNamespace) ([]*grpc.Interface, ifaces = append(ifaces, &ifc) for _, route := range endpoint.Properties().Routes { - var r grpc.Route + var r types.Route if route.Dst != nil { r.Dest = route.Dst.String() diff --git a/virtcontainers/network_test.go b/virtcontainers/network_test.go index 658df417ac..7aa900c59e 100644 --- a/virtcontainers/network_test.go +++ b/virtcontainers/network_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" "github.com/stretchr/testify/assert" "github.com/vishvananda/netlink" ) @@ -161,16 +161,16 @@ func TestGenerateInterfacesAndRoutes(t *testing.T) { // // Build expected results: // - expectedAddresses := []*grpc.IPAddress{ + expectedAddresses := []*types.IPAddress{ {Family: 0, Address: "172.17.0.2", Mask: "16"}, {Family: 0, Address: "182.17.0.2", Mask: "16"}, } - expectedInterfaces := []*grpc.Interface{ + expectedInterfaces := []*types.Interface{ {Device: "eth0", Name: "eth0", IPAddresses: expectedAddresses, Mtu: 1500, HwAddr: "02:00:ca:fe:00:04"}, } - expectedRoutes := []*grpc.Route{ + expectedRoutes := []*types.Route{ {Dest: "", Gateway: "172.17.0.1", Device: "eth0", Source: "", Scope: uint32(254)}, {Dest: "172.17.0.0/16", Gateway: "172.17.0.1", Device: "eth0", Source: "172.17.0.2"}, } diff --git a/virtcontainers/noop_agent.go b/virtcontainers/noop_agent.go index 51764fbb62..94cb1b8b9e 100644 --- a/virtcontainers/noop_agent.go +++ b/virtcontainers/noop_agent.go @@ -8,6 +8,7 @@ package virtcontainers import ( "syscall" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/agent/protocols/grpc" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/net/context" @@ -94,22 +95,22 @@ func (n *noopAgent) onlineCPUMem(cpus uint32, cpuOnly bool) error { } // updateInterface is the Noop agent Interface update implementation. It does nothing. -func (n *noopAgent) updateInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (n *noopAgent) updateInterface(inf *types.Interface) (*types.Interface, error) { return nil, nil } // listInterfaces is the Noop agent Interfaces list implementation. It does nothing. -func (n *noopAgent) listInterfaces() ([]*grpc.Interface, error) { +func (n *noopAgent) listInterfaces() ([]*types.Interface, error) { return nil, nil } // updateRoutes is the Noop agent Routes update implementation. It does nothing. -func (n *noopAgent) updateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { +func (n *noopAgent) updateRoutes(routes []*types.Route) ([]*types.Route, error) { return nil, nil } // listRoutes is the Noop agent Routes list implementation. It does nothing. -func (n *noopAgent) listRoutes() ([]*grpc.Route, error) { +func (n *noopAgent) listRoutes() ([]*types.Route, error) { return nil, nil } diff --git a/virtcontainers/pkg/vcmock/mock.go b/virtcontainers/pkg/vcmock/mock.go index 279f435909..04e6715fce 100644 --- a/virtcontainers/pkg/vcmock/mock.go +++ b/virtcontainers/pkg/vcmock/mock.go @@ -20,7 +20,7 @@ import ( "fmt" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -254,7 +254,7 @@ func (m *VCMock) AddDevice(ctx context.Context, sandboxID string, info config.De } // AddInterface implements the VC function of the same name. -func (m *VCMock) AddInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func (m *VCMock) AddInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { if m.AddInterfaceFunc != nil { return m.AddInterfaceFunc(ctx, sandboxID, inf) } @@ -263,7 +263,7 @@ func (m *VCMock) AddInterface(ctx context.Context, sandboxID string, inf *grpc.I } // RemoveInterface implements the VC function of the same name. -func (m *VCMock) RemoveInterface(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) { +func (m *VCMock) RemoveInterface(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) { if m.RemoveInterfaceFunc != nil { return m.RemoveInterfaceFunc(ctx, sandboxID, inf) } @@ -272,7 +272,7 @@ func (m *VCMock) RemoveInterface(ctx context.Context, sandboxID string, inf *grp } // ListInterfaces implements the VC function of the same name. -func (m *VCMock) ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) { +func (m *VCMock) ListInterfaces(ctx context.Context, sandboxID string) ([]*types.Interface, error) { if m.ListInterfacesFunc != nil { return m.ListInterfacesFunc(ctx, sandboxID) } @@ -281,7 +281,7 @@ func (m *VCMock) ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc. } // UpdateRoutes implements the VC function of the same name. -func (m *VCMock) UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) { +func (m *VCMock) UpdateRoutes(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) { if m.UpdateRoutesFunc != nil { return m.UpdateRoutesFunc(ctx, sandboxID, routes) } @@ -290,7 +290,7 @@ func (m *VCMock) UpdateRoutes(ctx context.Context, sandboxID string, routes []*g } // ListRoutes implements the VC function of the same name. -func (m *VCMock) ListRoutes(ctx context.Context, sandboxID string) ([]*grpc.Route, error) { +func (m *VCMock) ListRoutes(ctx context.Context, sandboxID string) ([]*types.Route, error) { if m.ListRoutesFunc != nil { return m.ListRoutesFunc(ctx, sandboxID) } diff --git a/virtcontainers/pkg/vcmock/mock_test.go b/virtcontainers/pkg/vcmock/mock_test.go index 983a11baf1..ebc43e66b3 100644 --- a/virtcontainers/pkg/vcmock/mock_test.go +++ b/virtcontainers/pkg/vcmock/mock_test.go @@ -11,7 +11,7 @@ import ( "syscall" "testing" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/kata-containers/runtime/virtcontainers/factory" "github.com/sirupsen/logrus" @@ -748,7 +748,7 @@ func TestVCMockAddInterface(t *testing.T) { assert.Error(err) assert.True(IsMockError(err)) - m.AddInterfaceFunc = func(ctx context.Context, sid string, inf *grpc.Interface) (*grpc.Interface, error) { + m.AddInterfaceFunc = func(ctx context.Context, sid string, inf *types.Interface) (*types.Interface, error) { return nil, nil } @@ -775,7 +775,7 @@ func TestVCMockRemoveInterface(t *testing.T) { assert.Error(err) assert.True(IsMockError(err)) - m.RemoveInterfaceFunc = func(ctx context.Context, sid string, inf *grpc.Interface) (*grpc.Interface, error) { + m.RemoveInterfaceFunc = func(ctx context.Context, sid string, inf *types.Interface) (*types.Interface, error) { return nil, nil } @@ -802,7 +802,7 @@ func TestVCMockListInterfaces(t *testing.T) { assert.Error(err) assert.True(IsMockError(err)) - m.ListInterfacesFunc = func(ctx context.Context, sid string) ([]*grpc.Interface, error) { + m.ListInterfacesFunc = func(ctx context.Context, sid string) ([]*types.Interface, error) { return nil, nil } @@ -829,7 +829,7 @@ func TestVCMockUpdateRoutes(t *testing.T) { assert.Error(err) assert.True(IsMockError(err)) - m.UpdateRoutesFunc = func(ctx context.Context, sid string, routes []*grpc.Route) ([]*grpc.Route, error) { + m.UpdateRoutesFunc = func(ctx context.Context, sid string, routes []*types.Route) ([]*types.Route, error) { return nil, nil } @@ -856,7 +856,7 @@ func TestVCMockListRoutes(t *testing.T) { assert.Error(err) assert.True(IsMockError(err)) - m.ListRoutesFunc = func(ctx context.Context, sid string) ([]*grpc.Route, error) { + m.ListRoutesFunc = func(ctx context.Context, sid string) ([]*types.Route, error) { return nil, nil } diff --git a/virtcontainers/pkg/vcmock/sandbox.go b/virtcontainers/pkg/vcmock/sandbox.go index 4e64a98bb1..38b6aa4e21 100644 --- a/virtcontainers/pkg/vcmock/sandbox.go +++ b/virtcontainers/pkg/vcmock/sandbox.go @@ -9,7 +9,7 @@ import ( "io" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -153,26 +153,26 @@ func (s *Sandbox) AddDevice(info config.DeviceInfo) (api.Device, error) { } // AddInterface implements the VCSandbox function of the same name. -func (s *Sandbox) AddInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (s *Sandbox) AddInterface(inf *types.Interface) (*types.Interface, error) { return nil, nil } // RemoveInterface implements the VCSandbox function of the same name. -func (s *Sandbox) RemoveInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (s *Sandbox) RemoveInterface(inf *types.Interface) (*types.Interface, error) { return nil, nil } // ListInterfaces implements the VCSandbox function of the same name. -func (s *Sandbox) ListInterfaces() ([]*grpc.Interface, error) { +func (s *Sandbox) ListInterfaces() ([]*types.Interface, error) { return nil, nil } // UpdateRoutes implements the VCSandbox function of the same name. -func (s *Sandbox) UpdateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { +func (s *Sandbox) UpdateRoutes(routes []*types.Route) ([]*types.Route, error) { return nil, nil } // ListRoutes implements the VCSandbox function of the same name. -func (s *Sandbox) ListRoutes() ([]*grpc.Route, error) { +func (s *Sandbox) ListRoutes() ([]*types.Route, error) { return nil, nil } diff --git a/virtcontainers/pkg/vcmock/types.go b/virtcontainers/pkg/vcmock/types.go index ecfbfcefdd..88c2f81c61 100644 --- a/virtcontainers/pkg/vcmock/types.go +++ b/virtcontainers/pkg/vcmock/types.go @@ -9,7 +9,7 @@ import ( "context" "syscall" - "github.com/kata-containers/agent/protocols/grpc" + "github.com/kata-containers/agent/pkg/types" vc "github.com/kata-containers/runtime/virtcontainers" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -69,9 +69,9 @@ type VCMock struct { AddDeviceFunc func(ctx context.Context, sandboxID string, info config.DeviceInfo) (api.Device, error) - AddInterfaceFunc func(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) - RemoveInterfaceFunc func(ctx context.Context, sandboxID string, inf *grpc.Interface) (*grpc.Interface, error) - ListInterfacesFunc func(ctx context.Context, sandboxID string) ([]*grpc.Interface, error) - UpdateRoutesFunc func(ctx context.Context, sandboxID string, routes []*grpc.Route) ([]*grpc.Route, error) - ListRoutesFunc func(ctx context.Context, sandboxID string) ([]*grpc.Route, error) + AddInterfaceFunc func(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) + RemoveInterfaceFunc func(ctx context.Context, sandboxID string, inf *types.Interface) (*types.Interface, error) + ListInterfacesFunc func(ctx context.Context, sandboxID string) ([]*types.Interface, error) + UpdateRoutesFunc func(ctx context.Context, sandboxID string, routes []*types.Route) ([]*types.Route, error) + ListRoutesFunc func(ctx context.Context, sandboxID string) ([]*types.Route, error) } diff --git a/virtcontainers/sandbox.go b/virtcontainers/sandbox.go index b8334c1086..e72e3f1029 100644 --- a/virtcontainers/sandbox.go +++ b/virtcontainers/sandbox.go @@ -21,6 +21,7 @@ import ( opentracing "github.com/opentracing/opentracing-go" "github.com/sirupsen/logrus" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/agent/protocols/grpc" "github.com/kata-containers/runtime/virtcontainers/device/api" "github.com/kata-containers/runtime/virtcontainers/device/config" @@ -1076,7 +1077,7 @@ func (s *Sandbox) removeNetwork() error { return s.network.remove(s) } -func (s *Sandbox) generateNetInfo(inf *grpc.Interface) (NetworkInfo, error) { +func (s *Sandbox) generateNetInfo(inf *types.Interface) (NetworkInfo, error) { hw, err := net.ParseMAC(inf.HwAddr) if err != nil { return NetworkInfo{}, err @@ -1114,7 +1115,7 @@ func (s *Sandbox) generateNetInfo(inf *grpc.Interface) (NetworkInfo, error) { } // AddInterface adds new nic to the sandbox. -func (s *Sandbox) AddInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (s *Sandbox) AddInterface(inf *types.Interface) (*types.Interface, error) { netInfo, err := s.generateNetInfo(inf) if err != nil { return nil, err @@ -1145,7 +1146,7 @@ func (s *Sandbox) AddInterface(inf *grpc.Interface) (*grpc.Interface, error) { } // RemoveInterface removes a nic of the sandbox. -func (s *Sandbox) RemoveInterface(inf *grpc.Interface) (*grpc.Interface, error) { +func (s *Sandbox) RemoveInterface(inf *types.Interface) (*types.Interface, error) { for i, endpoint := range s.networkNS.Endpoints { if endpoint.HardwareAddr() == inf.HwAddr { s.Logger().WithField("endpoint-type", endpoint.Type()).Info("Hot detaching endpoint") @@ -1163,17 +1164,17 @@ func (s *Sandbox) RemoveInterface(inf *grpc.Interface) (*grpc.Interface, error) } // ListInterfaces lists all nics and their configurations in the sandbox. -func (s *Sandbox) ListInterfaces() ([]*grpc.Interface, error) { +func (s *Sandbox) ListInterfaces() ([]*types.Interface, error) { return s.agent.listInterfaces() } // UpdateRoutes updates the sandbox route table (e.g. for portmapping support). -func (s *Sandbox) UpdateRoutes(routes []*grpc.Route) ([]*grpc.Route, error) { +func (s *Sandbox) UpdateRoutes(routes []*types.Route) ([]*types.Route, error) { return s.agent.updateRoutes(routes) } // ListRoutes lists all routes and their configurations in the sandbox. -func (s *Sandbox) ListRoutes() ([]*grpc.Route, error) { +func (s *Sandbox) ListRoutes() ([]*types.Route, error) { return s.agent.listRoutes() } From 38d56c994e85ad061e980e639ef52c8a2a095b44 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 25 Oct 2018 09:52:45 -0700 Subject: [PATCH 2/2] netmon: Rely on agent/pkg/types instead of duplicating types Now that the agent has split the generic types in their own package, kata-netmon can use them directly and get rid of the duplication of those. This is very helpful as it will prevent structures from being out of sync between kata-netmon and the kata-runtime, without bringing in the huge overhead that the initial grpc package was introducing. Fixes #857 Signed-off-by: Sebastien Boeuf --- netmon/netmon.go | 64 ++++++++++--------------------------------- netmon/netmon_test.go | 37 +++++++++++++------------ 2 files changed, 34 insertions(+), 67 deletions(-) diff --git a/netmon/netmon.go b/netmon/netmon.go index d401e75ada..c29713034b 100644 --- a/netmon/netmon.go +++ b/netmon/netmon.go @@ -21,6 +21,7 @@ import ( "syscall" "time" + "github.com/kata-containers/agent/pkg/types" "github.com/kata-containers/runtime/pkg/signals" "github.com/sirupsen/logrus" lSyslog "github.com/sirupsen/logrus/hooks/syslog" @@ -28,41 +29,6 @@ import ( "golang.org/x/sys/unix" ) -// The following types and structures have to be kept in sync with the -// description of the agent protocol. Those definitions need to be in their -// own separate package so that they can be imported directly from this code. -// The reason for not importing them now, is because importing the whole agent -// protocol adds up too much overhead because of the grpc protocol involved. - -// IPFamily define the IP address family type. -type IPFamily int32 - -// IPAddress describes the IP address format expected by Kata API. -type IPAddress struct { - Family IPFamily `json:"family,omitempty"` - Address string `json:"address,omitempty"` - Mask string `json:"mask,omitempty"` -} - -// Interface describes the network interface format expected by Kata API. -type Interface struct { - Device string `json:"device,omitempty"` - Name string `json:"name,omitempty"` - IPAddresses []*IPAddress `json:"IPAddresses,omitempty"` - Mtu uint64 `json:"mtu,omitempty"` - HwAddr string `json:"hwAddr,omitempty"` - PciAddr string `json:"pciAddr,omitempty"` -} - -// Route describes the network route format expected by Kata API. -type Route struct { - Dest string `json:"dest,omitempty"` - Gateway string `json:"gateway,omitempty"` - Device string `json:"device,omitempty"` - Source string `json:"source,omitempty"` - Scope uint32 `json:"scope,omitempty"` -} - const ( netmonName = "kata-netmon" @@ -104,7 +70,7 @@ type netmon struct { storagePath string sharedFile string - netIfaces map[int]Interface + netIfaces map[int]types.Interface linkUpdateCh chan netlink.LinkUpdate linkDoneCh chan struct{} @@ -185,7 +151,7 @@ func newNetmon(params netmonParams) (*netmon, error) { netmonParams: params, storagePath: filepath.Join(storageParentPath, params.sandboxID), sharedFile: filepath.Join(storageParentPath, params.sandboxID, sharedFile), - netIfaces: make(map[int]Interface), + netIfaces: make(map[int]types.Interface), linkUpdateCh: make(chan netlink.LinkUpdate), linkDoneCh: make(chan struct{}), rtUpdateCh: make(chan netlink.RouteUpdate), @@ -293,13 +259,13 @@ func (n *netmon) listenNetlinkEvents() error { // convertInterface converts a link and its IP addresses as defined by netlink // package, into the Interface structure format expected by kata-runtime to // describe an interface and its associated IP addresses. -func convertInterface(linkAttrs *netlink.LinkAttrs, addrs []netlink.Addr) Interface { +func convertInterface(linkAttrs *netlink.LinkAttrs, addrs []netlink.Addr) types.Interface { if linkAttrs == nil { netmonLog.Warn("Link attributes are nil") - return Interface{} + return types.Interface{} } - var ipAddrs []*IPAddress + var ipAddrs []*types.IPAddress for _, addr := range addrs { if addr.IPNet == nil { @@ -308,8 +274,8 @@ func convertInterface(linkAttrs *netlink.LinkAttrs, addrs []netlink.Addr) Interf netMask, _ := addr.Mask.Size() - ipAddr := &IPAddress{ - Family: IPFamily(netlinkFamily), + ipAddr := &types.IPAddress{ + Family: types.IPFamily(netlinkFamily), Address: addr.IP.String(), Mask: fmt.Sprintf("%d", netMask), } @@ -317,7 +283,7 @@ func convertInterface(linkAttrs *netlink.LinkAttrs, addrs []netlink.Addr) Interf ipAddrs = append(ipAddrs, ipAddr) } - iface := Interface{ + iface := types.Interface{ Device: linkAttrs.Name, Name: linkAttrs.Name, IPAddresses: ipAddrs, @@ -333,8 +299,8 @@ func convertInterface(linkAttrs *netlink.LinkAttrs, addrs []netlink.Addr) Interf // convertRoutes converts a list of routes as defined by netlink package, // into a list of Route structure format expected by kata-runtime to // describe a set of routes. -func convertRoutes(netRoutes []netlink.Route) []Route { - var routes []Route +func convertRoutes(netRoutes []netlink.Route) []types.Route { + var routes []types.Route // Ignore routes with IPv6 addresses as this is not supported // by Kata yet. @@ -368,7 +334,7 @@ func convertRoutes(netRoutes []netlink.Route) []Route { dev = iface.Name } - route := Route{ + route := types.Route{ Dest: dst, Gateway: gw, Device: dev, @@ -440,7 +406,7 @@ func (n *netmon) execKataCmd(subCmd string) error { return os.Remove(n.sharedFile) } -func (n *netmon) addInterfaceCLI(iface Interface) error { +func (n *netmon) addInterfaceCLI(iface types.Interface) error { if err := n.storeDataToSend(iface); err != nil { return err } @@ -448,7 +414,7 @@ func (n *netmon) addInterfaceCLI(iface Interface) error { return n.execKataCmd(kataCLIAddIfaceCmd) } -func (n *netmon) delInterfaceCLI(iface Interface) error { +func (n *netmon) delInterfaceCLI(iface types.Interface) error { if err := n.storeDataToSend(iface); err != nil { return err } @@ -456,7 +422,7 @@ func (n *netmon) delInterfaceCLI(iface Interface) error { return n.execKataCmd(kataCLIDelIfaceCmd) } -func (n *netmon) updateRoutesCLI(routes []Route) error { +func (n *netmon) updateRoutesCLI(routes []types.Route) error { if err := n.storeDataToSend(routes); err != nil { return err } diff --git a/netmon/netmon_test.go b/netmon/netmon_test.go index 823aa60b3f..463ea62b6f 100644 --- a/netmon/netmon_test.go +++ b/netmon/netmon_test.go @@ -16,6 +16,7 @@ import ( "runtime" "testing" + "github.com/kata-containers/agent/pkg/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/vishvananda/netlink" @@ -173,14 +174,14 @@ func TestConvertInterface(t *testing.T) { HardwareAddr: hwAddr, } - expected := Interface{ + expected := types.Interface{ Device: testIfaceName, Name: testIfaceName, Mtu: uint64(testMTU), HwAddr: testHwAddr, - IPAddresses: []*IPAddress{ + IPAddresses: []*types.IPAddress{ { - Family: IPFamily(netlinkFamily), + Family: types.IPFamily(netlinkFamily), Address: testIPAddress, Mask: "0", }, @@ -207,7 +208,7 @@ func TestConvertRoutes(t *testing.T) { }, } - expected := []Route{ + expected := []types.Route{ { Dest: testIPAddress, Gateway: testIPAddress, @@ -241,7 +242,7 @@ func testSetupNetwork(t *testing.T) testTeardownNetwork { } } -func testCreateDummyNetwork(t *testing.T, handler *netlink.Handle) (int, Interface) { +func testCreateDummyNetwork(t *testing.T, handler *netlink.Handle) (int, types.Interface) { hwAddr, err := net.ParseMAC(testHwAddr) assert.Nil(t, err) @@ -262,7 +263,7 @@ func testCreateDummyNetwork(t *testing.T, handler *netlink.Handle) (int, Interfa attrs := link.Attrs() assert.NotNil(t, attrs) - iface := Interface{ + iface := types.Interface{ Device: testIfaceName, Name: testIfaceName, Mtu: uint64(testMTU), @@ -284,7 +285,7 @@ func TestScanNetwork(t *testing.T) { idx, expected := testCreateDummyNetwork(t, handler) n := &netmon{ - netIfaces: make(map[int]Interface), + netIfaces: make(map[int]types.Interface), netHandler: handler, } @@ -295,9 +296,9 @@ func TestScanNetwork(t *testing.T) { } func TestStoreDataToSend(t *testing.T) { - var got Interface + var got types.Interface - expected := Interface{ + expected := types.Interface{ Device: testIfaceName, Name: testIfaceName, Mtu: uint64(testMTU), @@ -394,15 +395,15 @@ func TestActionsCLI(t *testing.T) { defer os.RemoveAll(testStorageParentPath) // Test addInterfaceCLI - err = n.addInterfaceCLI(Interface{}) + err = n.addInterfaceCLI(types.Interface{}) assert.Nil(t, err) // Test delInterfaceCLI - err = n.delInterfaceCLI(Interface{}) + err = n.delInterfaceCLI(types.Interface{}) assert.Nil(t, err) // Test updateRoutesCLI - err = n.updateRoutesCLI([]Route{}) + err = n.updateRoutesCLI([]types.Route{}) assert.Nil(t, err) tearDownNetworkCb := testSetupNetwork(t) @@ -460,8 +461,8 @@ func TestHandleRTMNewLink(t *testing.T) { assert.Nil(t, err) // Interface already exist in list - n.netIfaces = make(map[int]Interface) - n.netIfaces[testIfaceIndex] = Interface{} + n.netIfaces = make(map[int]types.Interface) + n.netIfaces[testIfaceIndex] = types.Interface{} ev = netlink.LinkUpdate{ Link: &netlink.Dummy{ LinkAttrs: netlink.LinkAttrs{ @@ -474,7 +475,7 @@ func TestHandleRTMNewLink(t *testing.T) { assert.Nil(t, err) // Flags are not up and running - n.netIfaces = make(map[int]Interface) + n.netIfaces = make(map[int]types.Interface) ev = netlink.LinkUpdate{ Link: &netlink.Dummy{ LinkAttrs: netlink.LinkAttrs{ @@ -487,7 +488,7 @@ func TestHandleRTMNewLink(t *testing.T) { assert.Nil(t, err) // Invalid link - n.netIfaces = make(map[int]Interface) + n.netIfaces = make(map[int]types.Interface) ev = netlink.LinkUpdate{ Link: &netlink.Dummy{ LinkAttrs: netlink.LinkAttrs{ @@ -528,7 +529,7 @@ func TestHandleRTMDelLink(t *testing.T) { assert.Nil(t, err) // Interface does not exist in list - n.netIfaces = make(map[int]Interface) + n.netIfaces = make(map[int]types.Interface) ev = netlink.LinkUpdate{ Link: &netlink.Dummy{ LinkAttrs: netlink.LinkAttrs{ @@ -543,7 +544,7 @@ func TestHandleRTMDelLink(t *testing.T) { func TestHandleRTMNewRouteIfaceNotFound(t *testing.T) { n := &netmon{ - netIfaces: make(map[int]Interface), + netIfaces: make(map[int]types.Interface), } err := n.handleRTMNewRoute(netlink.RouteUpdate{})