From 8eb8af1fa5b993c4b9a713920b14cbc1b9e8e993 Mon Sep 17 00:00:00 2001 From: Niko Hobart Date: Thu, 24 Oct 2024 09:34:02 -0700 Subject: [PATCH 1/3] added vhd getnotif string arg --- .../moc_nodeagent_virtualharddisk.pb.go | 183 +++++++++++------- .../moc_nodeagent_virtualharddisk.proto | 8 +- 2 files changed, 118 insertions(+), 73 deletions(-) diff --git a/rpc/nodeagent/storage/moc_nodeagent_virtualharddisk.pb.go b/rpc/nodeagent/storage/moc_nodeagent_virtualharddisk.pb.go index f4389147..1a0f7e84 100644 --- a/rpc/nodeagent/storage/moc_nodeagent_virtualharddisk.pb.go +++ b/rpc/nodeagent/storage/moc_nodeagent_virtualharddisk.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" + _ "github.com/golang/protobuf/ptypes/empty" wrappers "github.com/golang/protobuf/ptypes/wrappers" common "github.com/microsoft/moc/rpc/common" grpc "google.golang.org/grpc" @@ -613,6 +613,45 @@ func (m *VirtualHardDisk) GetDiskFileFormat() common.DiskFileFormat { return common.DiskFileFormat_DiskFileFormatVHDX } +type DiskNotificationRequest struct { + ResourceType string `protobuf:"bytes,1,opt,name=resourceType,proto3" json:"resourceType,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DiskNotificationRequest) Reset() { *m = DiskNotificationRequest{} } +func (m *DiskNotificationRequest) String() string { return proto.CompactTextString(m) } +func (*DiskNotificationRequest) ProtoMessage() {} +func (*DiskNotificationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c1f33a566472b7b7, []int{8} +} + +func (m *DiskNotificationRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DiskNotificationRequest.Unmarshal(m, b) +} +func (m *DiskNotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DiskNotificationRequest.Marshal(b, m, deterministic) +} +func (m *DiskNotificationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DiskNotificationRequest.Merge(m, src) +} +func (m *DiskNotificationRequest) XXX_Size() int { + return xxx_messageInfo_DiskNotificationRequest.Size(m) +} +func (m *DiskNotificationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DiskNotificationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DiskNotificationRequest proto.InternalMessageInfo + +func (m *DiskNotificationRequest) GetResourceType() string { + if m != nil { + return m.ResourceType + } + return "" +} + func init() { proto.RegisterEnum("moc.nodeagent.storage.VirtualHardDiskType", VirtualHardDiskType_name, VirtualHardDiskType_value) proto.RegisterType((*VirtualHardDiskRequest)(nil), "moc.nodeagent.storage.VirtualHardDiskRequest") @@ -623,6 +662,7 @@ func init() { proto.RegisterType((*HttpImageProperties)(nil), "moc.nodeagent.storage.HttpImageProperties") proto.RegisterType((*AzureGalleryImageProperties)(nil), "moc.nodeagent.storage.AzureGalleryImageProperties") proto.RegisterType((*VirtualHardDisk)(nil), "moc.nodeagent.storage.VirtualHardDisk") + proto.RegisterType((*DiskNotificationRequest)(nil), "moc.nodeagent.storage.DiskNotificationRequest") } func init() { @@ -630,70 +670,71 @@ func init() { } var fileDescriptor_c1f33a566472b7b7 = []byte{ - // 1000 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdf, 0x4e, 0x23, 0xb7, - 0x17, 0xde, 0x81, 0x10, 0x96, 0x93, 0x1f, 0x59, 0xd6, 0x61, 0x61, 0x7e, 0xd9, 0x3f, 0x8a, 0xb2, - 0xd5, 0x2a, 0x42, 0xea, 0x04, 0xa5, 0xbd, 0xa8, 0xd4, 0xab, 0x40, 0x60, 0x49, 0x17, 0xed, 0x56, - 0x0e, 0x70, 0x51, 0x55, 0x45, 0x8e, 0x63, 0x12, 0x8b, 0x99, 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0xc6, 0xdf, 0x6a, 0x78, - 0xad, 0x0d, 0x5a, 0x40, 0x49, 0x00, 0x24, 0x54, 0x63, 0xc9, 0x59, 0x68, 0x04, 0xb7, 0x4a, 0x67, - 0x5a, 0x40, 0xed, 0x0a, 0x86, 0x1c, 0x42, 0x2d, 0x99, 0x4c, 0x4d, 0x31, 0xa0, 0x82, 0x01, 0xab, - 0x28, 0x72, 0x00, 0x3b, 0x6e, 0xb5, 0x5a, 0xb9, 0x8d, 0x8c, 0xd3, 0x68, 0x28, 0xb4, 0xff, 0x3f, - 0x5c, 0xc3, 0x12, 0xee, 0xb2, 0x79, 0xc0, 0x42, 0x95, 0x75, 0x44, 0x7f, 0x1b, 0xd5, 0x2b, 0x18, - 0xf2, 0x06, 0xc0, 0xb5, 0xe8, 0xdc, 0xb5, 0x8a, 0xba, 0x39, 0xc4, 0xf9, 0xe5, 0xdd, 0x3c, 0x62, - 0x7c, 0x22, 0xe3, 0xec, 0x26, 0x3d, 0xc3, 0x3d, 0x58, 0xc1, 0xb8, 0x8b, 0x6a, 0xb8, 0x91, 0xb8, - 0x99, 0x3b, 0xd9, 0x45, 0xbd, 0x1f, 0x93, 0x1f, 0xa1, 0x56, 0x78, 0x19, 0xac, 0xeb, 0x7f, 0xcf, - 0xb1, 0xff, 0x1d, 0x3c, 0xae, 0x49, 0xb9, 0x66, 0x48, 0x57, 0xd9, 0xb8, 0x23, 0x20, 0x62, 0x2b, - 0xed, 0xd4, 0x27, 0x73, 0x47, 0xe0, 0x04, 0x21, 0x9a, 0x53, 0xe4, 0x35, 0x94, 0x2c, 0x1b, 0x1b, - 0xbf, 0x86, 0x92, 0x2d, 0x94, 0x5c, 0xb0, 0xb1, 0xa1, 0x08, 0x93, 0x43, 0x80, 0xec, 0x40, 0x62, - 0x63, 0xde, 0xc5, 0xc4, 0x76, 0x50, 0x84, 0xd7, 0x27, 0xbb, 0x8a, 0x74, 0x4e, 0x43, 0xba, 0xb0, - 0x33, 0x99, 0x26, 0x42, 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 0xb6, 0x1d, 0x29, 0xde, 0xd6, 0x09, 0x6f, - 0xcf, 0xb2, 0x6a, 0xe7, 0x59, 0x0d, 0xcb, 0x68, 0xff, 0xd5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xd0, 0x17, 0x92, 0x64, 0x1b, 0x09, 0x00, 0x00, + // 1019 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdf, 0x6e, 0xdb, 0xb6, + 0x17, 0xae, 0x12, 0xc7, 0x69, 0x8e, 0x1b, 0x37, 0xa5, 0xd3, 0x44, 0x3f, 0xf7, 0x0f, 0x0c, 0xf5, + 0x87, 0xc2, 0x08, 0x30, 0x39, 0xf0, 0x76, 0x31, 0x60, 0xd8, 0x85, 0x13, 0x37, 0x8d, 0xd7, 0xa0, + 0x1d, 0xe8, 0x24, 0x17, 0xc3, 0xb0, 0x8c, 0x96, 0x19, 0x9b, 0x88, 0x24, 0x6a, 0x24, 0x95, 0xc1, + 0x7d, 0x82, 0x3d, 0xcd, 0xee, 0xf6, 0x04, 0xbb, 0xdd, 0x03, 0xec, 0x7e, 0x2f, 0x32, 0xf0, 0x48, + 0x76, 0x6c, 0xd9, 0x01, 0x72, 0xb3, 0x2b, 0x89, 0xdf, 0xf7, 0x9d, 0x8f, 0x87, 0x87, 0xe4, 0x21, + 0xbc, 0x89, 0x64, 0x70, 0x15, 0xcb, 0x21, 0x67, 0x23, 0x1e, 0x9b, 0xab, 0x5b, 0xa1, 0x4c, 0xca, + 0xc2, 0x31, 0x53, 0xc3, 0xa1, 0xd0, 0x37, 0x7e, 0xa2, 0xa4, 0x91, 0xe4, 0x79, 0x24, 0x03, 0x7f, + 0x26, 0xf2, 0xb5, 0x91, 0x8a, 0x8d, 0x78, 0xfd, 0xf5, 0x48, 0xca, 0x51, 0xc8, 0x5b, 0x28, 0x1a, + 0xa4, 0xd7, 0xad, 0x5f, 0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 0xad, 0xd8, 0x2c, 0xb2, 0x07, 0xe4, 0x53, 0xff, 0xea, 0xb2, 0x47, 0xcf, 0x2f, 0x3a, 0x67, 0xa7, + 0x1d, 0xda, 0xed, 0xf6, 0xfa, 0x1f, 0x76, 0x1e, 0x91, 0x97, 0xe0, 0x76, 0x3b, 0xe7, 0x1d, 0x3b, + 0x5a, 0x62, 0x9d, 0xf6, 0x3f, 0x0e, 0xec, 0x16, 0xdc, 0x3a, 0xf6, 0x5c, 0x10, 0x01, 0xe5, 0x5e, + 0x7c, 0x2b, 0x6f, 0x38, 0xf9, 0xe2, 0x81, 0xcf, 0x5a, 0xb6, 0x84, 0xba, 0xff, 0x50, 0x79, 0xf6, + 0xaa, 0x7a, 0x8f, 0xc8, 0xcf, 0xf0, 0xec, 0x78, 0xcc, 0x83, 0x85, 0x82, 0x90, 0xfb, 0x6c, 0xee, + 0xa9, 0x5c, 0xfd, 0x7f, 0xa8, 0x5f, 0x64, 0xa6, 0x33, 0x1c, 0x1d, 0xfe, 0xe0, 0x8f, 0x84, 0x19, + 0xa7, 0x03, 0x3f, 0x90, 0x51, 0x2b, 0x12, 0x81, 0x92, 0x5a, 0x5e, 0x9b, 0x56, 0x24, 0x83, 0x96, + 0x4a, 0x82, 0xd6, 0x6c, 0x9a, 0x56, 0x3e, 0xcd, 0xa0, 0x8c, 0x6f, 0xee, 0x97, 0xff, 0x06, 0x00, + 0x00, 0xff, 0xff, 0xb7, 0xfa, 0xb4, 0x5d, 0x72, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -709,7 +750,7 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type VirtualHardDiskAgentClient interface { Invoke(ctx context.Context, in *VirtualHardDiskRequest, opts ...grpc.CallOption) (*VirtualHardDiskResponse, error) - CheckNotification(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.NotificationResponse, error) + CheckNotification(ctx context.Context, in *DiskNotificationRequest, opts ...grpc.CallOption) (*common.NotificationResponse, error) } type virtualHardDiskAgentClient struct { @@ -729,7 +770,7 @@ func (c *virtualHardDiskAgentClient) Invoke(ctx context.Context, in *VirtualHard return out, nil } -func (c *virtualHardDiskAgentClient) CheckNotification(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.NotificationResponse, error) { +func (c *virtualHardDiskAgentClient) CheckNotification(ctx context.Context, in *DiskNotificationRequest, opts ...grpc.CallOption) (*common.NotificationResponse, error) { out := new(common.NotificationResponse) err := c.cc.Invoke(ctx, "/moc.nodeagent.storage.VirtualHardDiskAgent/CheckNotification", in, out, opts...) if err != nil { @@ -741,7 +782,7 @@ func (c *virtualHardDiskAgentClient) CheckNotification(ctx context.Context, in * // VirtualHardDiskAgentServer is the server API for VirtualHardDiskAgent service. type VirtualHardDiskAgentServer interface { Invoke(context.Context, *VirtualHardDiskRequest) (*VirtualHardDiskResponse, error) - CheckNotification(context.Context, *empty.Empty) (*common.NotificationResponse, error) + CheckNotification(context.Context, *DiskNotificationRequest) (*common.NotificationResponse, error) } // UnimplementedVirtualHardDiskAgentServer can be embedded to have forward compatible implementations. @@ -751,7 +792,7 @@ type UnimplementedVirtualHardDiskAgentServer struct { func (*UnimplementedVirtualHardDiskAgentServer) Invoke(ctx context.Context, req *VirtualHardDiskRequest) (*VirtualHardDiskResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented") } -func (*UnimplementedVirtualHardDiskAgentServer) CheckNotification(ctx context.Context, req *empty.Empty) (*common.NotificationResponse, error) { +func (*UnimplementedVirtualHardDiskAgentServer) CheckNotification(ctx context.Context, req *DiskNotificationRequest) (*common.NotificationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckNotification not implemented") } @@ -778,7 +819,7 @@ func _VirtualHardDiskAgent_Invoke_Handler(srv interface{}, ctx context.Context, } func _VirtualHardDiskAgent_CheckNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(DiskNotificationRequest) if err := dec(in); err != nil { return nil, err } @@ -790,7 +831,7 @@ func _VirtualHardDiskAgent_CheckNotification_Handler(srv interface{}, ctx contex FullMethod: "/moc.nodeagent.storage.VirtualHardDiskAgent/CheckNotification", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VirtualHardDiskAgentServer).CheckNotification(ctx, req.(*empty.Empty)) + return srv.(VirtualHardDiskAgentServer).CheckNotification(ctx, req.(*DiskNotificationRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/rpc/nodeagent/storage/virtualharddisk/moc_nodeagent_virtualharddisk.proto b/rpc/nodeagent/storage/virtualharddisk/moc_nodeagent_virtualharddisk.proto index d6111c0a..ad86ddb6 100644 --- a/rpc/nodeagent/storage/virtualharddisk/moc_nodeagent_virtualharddisk.proto +++ b/rpc/nodeagent/storage/virtualharddisk/moc_nodeagent_virtualharddisk.proto @@ -79,7 +79,11 @@ message VirtualHardDisk { DiskFileFormat diskFileFormat = 23; } +message DiskNotificationRequest { + string resourceType = 1; +} + service VirtualHardDiskAgent { rpc Invoke(VirtualHardDiskRequest) returns (VirtualHardDiskResponse) {} - rpc CheckNotification(google.protobuf.Empty) returns (NotificationResponse) {} -} + rpc CheckNotification(DiskNotificationRequest) returns (NotificationResponse) {} +} \ No newline at end of file From 8760ca4d02428d9271f60a405b6a3953e6035727 Mon Sep 17 00:00:00 2001 From: Niko Hobart Date: Thu, 24 Oct 2024 09:37:35 -0700 Subject: [PATCH 2/3] added new error codes for new scenarios --- pkg/errors/codes/codes.go | 3 +++ pkg/errors/codes/codes_string.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pkg/errors/codes/codes.go b/pkg/errors/codes/codes.go index 211af5cb..a90beba6 100644 --- a/pkg/errors/codes/codes.go +++ b/pkg/errors/codes/codes.go @@ -55,6 +55,9 @@ const ( MeasurementUnitError QuotaViolation IPOutOfRange + VolumeNotFound + VolumeCorrupted + VolumeFlaky // This is not a valid code, it is used to get the maximum code value. // Any new codes should be defined above this. diff --git a/pkg/errors/codes/codes_string.go b/pkg/errors/codes/codes_string.go index 93c4ec90..a76118b0 100644 --- a/pkg/errors/codes/codes_string.go +++ b/pkg/errors/codes/codes_string.go @@ -103,6 +103,12 @@ func (c MocCode) String() string { return "QuotaViolation" case IPOutOfRange: return "IPOutOfRange" + case VolumeNotFound: + return "VolumeNotFound" + case VolumeCorrupted: + return "VolumeCorrupted" + case VolumeFlaky: + return "VolumeFlaky" default: return "MocCode(" + strconv.FormatUint(uint64(c), 10) + ")" } From 9c1572eeb9d35df6423bfc17778b242815e62bdf Mon Sep 17 00:00:00 2001 From: Niko Hobart Date: Tue, 29 Oct 2024 16:54:16 -0700 Subject: [PATCH 3/3] changed error codes for volumes --- pkg/errors/codes/codes.go | 4 ++-- pkg/errors/codes/codes_string.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/errors/codes/codes.go b/pkg/errors/codes/codes.go index a90beba6..779f0064 100644 --- a/pkg/errors/codes/codes.go +++ b/pkg/errors/codes/codes.go @@ -56,8 +56,8 @@ const ( QuotaViolation IPOutOfRange VolumeNotFound - VolumeCorrupted - VolumeFlaky + VolumeDegraded + VolumeAccessInconsistent // This is not a valid code, it is used to get the maximum code value. // Any new codes should be defined above this. diff --git a/pkg/errors/codes/codes_string.go b/pkg/errors/codes/codes_string.go index a76118b0..bac82a79 100644 --- a/pkg/errors/codes/codes_string.go +++ b/pkg/errors/codes/codes_string.go @@ -105,10 +105,10 @@ func (c MocCode) String() string { return "IPOutOfRange" case VolumeNotFound: return "VolumeNotFound" - case VolumeCorrupted: - return "VolumeCorrupted" - case VolumeFlaky: - return "VolumeFlaky" + case VolumeDegraded: + return "VolumeDegraded" + case VolumeAccessInconsistent: + return "VolumeAccessInconsistent" default: return "MocCode(" + strconv.FormatUint(uint64(c), 10) + ")" }