From aa18c52fca22c72d4a509fc338e1bedde63cd514 Mon Sep 17 00:00:00 2001 From: Kris Jacque Date: Thu, 7 May 2026 22:58:18 +0000 Subject: [PATCH 1/2] DAOS-18961 engine: Reorganize checker upcalls This is a transparent move of checker upcall dRPCs to new files. No functionality change is expected or desired. Features: recovery Signed-off-by: Kris Jacque --- .../common/proto/shared/check_engine.pb.go | 532 ++++++++++++++- src/control/common/proto/srv/srv.pb.go | 587 ++--------------- src/control/server/mgmt_drpc_checker.go | 15 +- src/control/server/mgmt_drpc_checker_test.go | 51 +- src/engine/SConscript | 2 +- src/engine/check_engine.pb-c.c | 613 ++++++++++++++++++ src/engine/check_engine.pb-c.h | 279 ++++++++ src/engine/drpc_chk.c | 274 ++++++++ src/engine/drpc_ras.c | 255 -------- src/engine/srv.pb-c.c | 613 ------------------ src/engine/srv.pb-c.h | 279 -------- src/include/daos_srv/daos_chk.h | 48 ++ src/include/daos_srv/ras.h | 49 -- src/proto/shared/check_engine.proto | 36 + src/proto/srv/srv.proto | 36 - 15 files changed, 1843 insertions(+), 1826 deletions(-) create mode 100644 src/engine/drpc_chk.c diff --git a/src/control/common/proto/shared/check_engine.pb.go b/src/control/common/proto/shared/check_engine.pb.go index d15f4f4953c..48bdbe45552 100644 --- a/src/control/common/proto/shared/check_engine.pb.go +++ b/src/control/common/proto/shared/check_engine.pb.go @@ -124,6 +124,385 @@ func (x *CheckReportResp) GetStatus() int32 { return 0 } +// List all the known pools from MS. +type CheckListPoolReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CheckListPoolReq) Reset() { + *x = CheckListPoolReq{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckListPoolReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckListPoolReq) ProtoMessage() {} + +func (x *CheckListPoolReq) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckListPoolReq.ProtoReflect.Descriptor instead. +func (*CheckListPoolReq) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{2} +} + +type CheckListPoolResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. + Pools []*CheckListPoolResp_OnePool `protobuf:"bytes,2,rep,name=pools,proto3" json:"pools,omitempty"` // The list of pools. +} + +func (x *CheckListPoolResp) Reset() { + *x = CheckListPoolResp{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckListPoolResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckListPoolResp) ProtoMessage() {} + +func (x *CheckListPoolResp) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckListPoolResp.ProtoReflect.Descriptor instead. +func (*CheckListPoolResp) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{3} +} + +func (x *CheckListPoolResp) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *CheckListPoolResp) GetPools() []*CheckListPoolResp_OnePool { + if x != nil { + return x.Pools + } + return nil +} + +// Register pool to MS. +type CheckRegPoolReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // DAOS Check event sequence, unique for the instance. + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // Pool UUID. + Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` // Pool label. + Svcreps []uint32 `protobuf:"varint,4,rep,packed,name=svcreps,proto3" json:"svcreps,omitempty"` // Pool service replica ranks. +} + +func (x *CheckRegPoolReq) Reset() { + *x = CheckRegPoolReq{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckRegPoolReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckRegPoolReq) ProtoMessage() {} + +func (x *CheckRegPoolReq) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckRegPoolReq.ProtoReflect.Descriptor instead. +func (*CheckRegPoolReq) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{4} +} + +func (x *CheckRegPoolReq) GetSeq() uint64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *CheckRegPoolReq) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *CheckRegPoolReq) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *CheckRegPoolReq) GetSvcreps() []uint32 { + if x != nil { + return x.Svcreps + } + return nil +} + +type CheckRegPoolResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. +} + +func (x *CheckRegPoolResp) Reset() { + *x = CheckRegPoolResp{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckRegPoolResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckRegPoolResp) ProtoMessage() {} + +func (x *CheckRegPoolResp) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckRegPoolResp.ProtoReflect.Descriptor instead. +func (*CheckRegPoolResp) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{5} +} + +func (x *CheckRegPoolResp) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +// Deregister pool from MS. +type CheckDeregPoolReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // DAOS Check event sequence, unique for the instance. + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // The pool to be deregistered. +} + +func (x *CheckDeregPoolReq) Reset() { + *x = CheckDeregPoolReq{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckDeregPoolReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckDeregPoolReq) ProtoMessage() {} + +func (x *CheckDeregPoolReq) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckDeregPoolReq.ProtoReflect.Descriptor instead. +func (*CheckDeregPoolReq) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{6} +} + +func (x *CheckDeregPoolReq) GetSeq() uint64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *CheckDeregPoolReq) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +type CheckDeregPoolResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. +} + +func (x *CheckDeregPoolResp) Reset() { + *x = CheckDeregPoolResp{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckDeregPoolResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckDeregPoolResp) ProtoMessage() {} + +func (x *CheckDeregPoolResp) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckDeregPoolResp.ProtoReflect.Descriptor instead. +func (*CheckDeregPoolResp) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{7} +} + +func (x *CheckDeregPoolResp) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +type CheckListPoolResp_OnePool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Pool UUID. + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` // Pool label. + Svcreps []uint32 `protobuf:"varint,3,rep,packed,name=svcreps,proto3" json:"svcreps,omitempty"` // Pool service replica ranks. +} + +func (x *CheckListPoolResp_OnePool) Reset() { + *x = CheckListPoolResp_OnePool{} + if protoimpl.UnsafeEnabled { + mi := &file_shared_check_engine_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckListPoolResp_OnePool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckListPoolResp_OnePool) ProtoMessage() {} + +func (x *CheckListPoolResp_OnePool) ProtoReflect() protoreflect.Message { + mi := &file_shared_check_engine_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckListPoolResp_OnePool.ProtoReflect.Descriptor instead. +func (*CheckListPoolResp_OnePool) Descriptor() ([]byte, []int) { + return file_shared_check_engine_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *CheckListPoolResp_OnePool) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *CheckListPoolResp_OnePool) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *CheckListPoolResp_OnePool) GetSvcreps() []uint32 { + if x != nil { + return x.Svcreps + } + return nil +} + var File_shared_check_engine_proto protoreflect.FileDescriptor var file_shared_check_engine_proto_rawDesc = []byte{ @@ -136,11 +515,40 @@ var file_shared_check_engine_proto_rawDesc = []byte{ 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x29, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2d, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x22, 0xb3, 0x01, + 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x70, + 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x64, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4f, 0x6e, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, + 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x4d, 0x0a, 0x07, 0x4f, 0x6e, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, 0x63, + 0x72, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, 0x72, + 0x65, 0x70, 0x73, 0x22, 0x67, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x10, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x44, 0x65, 0x72, 0x65, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x72, 0x65, + 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x64, 0x61, 0x6f, 0x73, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2f, + 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -155,19 +563,27 @@ func file_shared_check_engine_proto_rawDescGZIP() []byte { return file_shared_check_engine_proto_rawDescData } -var file_shared_check_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_shared_check_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_shared_check_engine_proto_goTypes = []interface{}{ - (*CheckReportReq)(nil), // 0: shared.CheckReportReq - (*CheckReportResp)(nil), // 1: shared.CheckReportResp - (*chk.CheckReport)(nil), // 2: chk.CheckReport + (*CheckReportReq)(nil), // 0: shared.CheckReportReq + (*CheckReportResp)(nil), // 1: shared.CheckReportResp + (*CheckListPoolReq)(nil), // 2: shared.CheckListPoolReq + (*CheckListPoolResp)(nil), // 3: shared.CheckListPoolResp + (*CheckRegPoolReq)(nil), // 4: shared.CheckRegPoolReq + (*CheckRegPoolResp)(nil), // 5: shared.CheckRegPoolResp + (*CheckDeregPoolReq)(nil), // 6: shared.CheckDeregPoolReq + (*CheckDeregPoolResp)(nil), // 7: shared.CheckDeregPoolResp + (*CheckListPoolResp_OnePool)(nil), // 8: shared.CheckListPoolResp.OnePool + (*chk.CheckReport)(nil), // 9: chk.CheckReport } var file_shared_check_engine_proto_depIdxs = []int32{ - 2, // 0: shared.CheckReportReq.report:type_name -> chk.CheckReport - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 9, // 0: shared.CheckReportReq.report:type_name -> chk.CheckReport + 8, // 1: shared.CheckListPoolResp.pools:type_name -> shared.CheckListPoolResp.OnePool + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_shared_check_engine_proto_init() } @@ -200,6 +616,90 @@ func file_shared_check_engine_proto_init() { return nil } } + file_shared_check_engine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckListPoolReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckListPoolResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckRegPoolReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckRegPoolResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckDeregPoolReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckDeregPoolResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_shared_check_engine_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckListPoolResp_OnePool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -207,7 +707,7 @@ func file_shared_check_engine_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_shared_check_engine_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/src/control/common/proto/srv/srv.pb.go b/src/control/common/proto/srv/srv.pb.go index 8fca8245af2..e78b0663326 100644 --- a/src/control/common/proto/srv/srv.pb.go +++ b/src/control/common/proto/srv/srv.pb.go @@ -352,322 +352,6 @@ func (x *PoolFindByLabelResp) GetSvcreps() []uint32 { return nil } -// List all the known pools from MS. -type CheckListPoolReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CheckListPoolReq) Reset() { - *x = CheckListPoolReq{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckListPoolReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckListPoolReq) ProtoMessage() {} - -func (x *CheckListPoolReq) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckListPoolReq.ProtoReflect.Descriptor instead. -func (*CheckListPoolReq) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{5} -} - -type CheckListPoolResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. - Pools []*CheckListPoolResp_OnePool `protobuf:"bytes,2,rep,name=pools,proto3" json:"pools,omitempty"` // The list of pools. -} - -func (x *CheckListPoolResp) Reset() { - *x = CheckListPoolResp{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckListPoolResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckListPoolResp) ProtoMessage() {} - -func (x *CheckListPoolResp) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckListPoolResp.ProtoReflect.Descriptor instead. -func (*CheckListPoolResp) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{6} -} - -func (x *CheckListPoolResp) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *CheckListPoolResp) GetPools() []*CheckListPoolResp_OnePool { - if x != nil { - return x.Pools - } - return nil -} - -// Register pool to MS. -type CheckRegPoolReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // DAOS Check event sequence, unique for the instance. - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // Pool UUID. - Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` // Pool label. - Svcreps []uint32 `protobuf:"varint,4,rep,packed,name=svcreps,proto3" json:"svcreps,omitempty"` // Pool service replica ranks. -} - -func (x *CheckRegPoolReq) Reset() { - *x = CheckRegPoolReq{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckRegPoolReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckRegPoolReq) ProtoMessage() {} - -func (x *CheckRegPoolReq) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckRegPoolReq.ProtoReflect.Descriptor instead. -func (*CheckRegPoolReq) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{7} -} - -func (x *CheckRegPoolReq) GetSeq() uint64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *CheckRegPoolReq) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *CheckRegPoolReq) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *CheckRegPoolReq) GetSvcreps() []uint32 { - if x != nil { - return x.Svcreps - } - return nil -} - -type CheckRegPoolResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. -} - -func (x *CheckRegPoolResp) Reset() { - *x = CheckRegPoolResp{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckRegPoolResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckRegPoolResp) ProtoMessage() {} - -func (x *CheckRegPoolResp) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckRegPoolResp.ProtoReflect.Descriptor instead. -func (*CheckRegPoolResp) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{8} -} - -func (x *CheckRegPoolResp) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -// Deregister pool from MS. -type CheckDeregPoolReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` // DAOS Check event sequence, unique for the instance. - Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // The pool to be deregistered. -} - -func (x *CheckDeregPoolReq) Reset() { - *x = CheckDeregPoolReq{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckDeregPoolReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckDeregPoolReq) ProtoMessage() {} - -func (x *CheckDeregPoolReq) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckDeregPoolReq.ProtoReflect.Descriptor instead. -func (*CheckDeregPoolReq) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{9} -} - -func (x *CheckDeregPoolReq) GetSeq() uint64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *CheckDeregPoolReq) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -type CheckDeregPoolResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code. -} - -func (x *CheckDeregPoolResp) Reset() { - *x = CheckDeregPoolResp{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckDeregPoolResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckDeregPoolResp) ProtoMessage() {} - -func (x *CheckDeregPoolResp) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckDeregPoolResp.ProtoReflect.Descriptor instead. -func (*CheckDeregPoolResp) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{10} -} - -func (x *CheckDeregPoolResp) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - type ListPoolsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -679,7 +363,7 @@ type ListPoolsReq struct { func (x *ListPoolsReq) Reset() { *x = ListPoolsReq{} if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[11] + mi := &file_srv_srv_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -692,7 +376,7 @@ func (x *ListPoolsReq) String() string { func (*ListPoolsReq) ProtoMessage() {} func (x *ListPoolsReq) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[11] + mi := &file_srv_srv_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -705,7 +389,7 @@ func (x *ListPoolsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPoolsReq.ProtoReflect.Descriptor instead. func (*ListPoolsReq) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{11} + return file_srv_srv_proto_rawDescGZIP(), []int{5} } func (x *ListPoolsReq) GetIncludeAll() bool { @@ -726,7 +410,7 @@ type ListPoolsResp struct { func (x *ListPoolsResp) Reset() { *x = ListPoolsResp{} if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[12] + mi := &file_srv_srv_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -739,7 +423,7 @@ func (x *ListPoolsResp) String() string { func (*ListPoolsResp) ProtoMessage() {} func (x *ListPoolsResp) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[12] + mi := &file_srv_srv_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -752,7 +436,7 @@ func (x *ListPoolsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPoolsResp.ProtoReflect.Descriptor instead. func (*ListPoolsResp) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{12} + return file_srv_srv_proto_rawDescGZIP(), []int{6} } func (x *ListPoolsResp) GetPools() []*ListPoolsResp_Pool { @@ -762,69 +446,6 @@ func (x *ListPoolsResp) GetPools() []*ListPoolsResp_Pool { return nil } -type CheckListPoolResp_OnePool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Pool UUID. - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` // Pool label. - Svcreps []uint32 `protobuf:"varint,3,rep,packed,name=svcreps,proto3" json:"svcreps,omitempty"` // Pool service replica ranks. -} - -func (x *CheckListPoolResp_OnePool) Reset() { - *x = CheckListPoolResp_OnePool{} - if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckListPoolResp_OnePool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckListPoolResp_OnePool) ProtoMessage() {} - -func (x *CheckListPoolResp_OnePool) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckListPoolResp_OnePool.ProtoReflect.Descriptor instead. -func (*CheckListPoolResp_OnePool) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *CheckListPoolResp_OnePool) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *CheckListPoolResp_OnePool) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *CheckListPoolResp_OnePool) GetSvcreps() []uint32 { - if x != nil { - return x.Svcreps - } - return nil -} - type ListPoolsResp_Pool struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -838,7 +459,7 @@ type ListPoolsResp_Pool struct { func (x *ListPoolsResp_Pool) Reset() { *x = ListPoolsResp_Pool{} if protoimpl.UnsafeEnabled { - mi := &file_srv_srv_proto_msgTypes[14] + mi := &file_srv_srv_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -851,7 +472,7 @@ func (x *ListPoolsResp_Pool) String() string { func (*ListPoolsResp_Pool) ProtoMessage() {} func (x *ListPoolsResp_Pool) ProtoReflect() protoreflect.Message { - mi := &file_srv_srv_proto_msgTypes[14] + mi := &file_srv_srv_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -864,7 +485,7 @@ func (x *ListPoolsResp_Pool) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPoolsResp_Pool.ProtoReflect.Descriptor instead. func (*ListPoolsResp_Pool) Descriptor() ([]byte, []int) { - return file_srv_srv_proto_rawDescGZIP(), []int{12, 0} + return file_srv_srv_proto_rawDescGZIP(), []int{6, 0} } func (x *ListPoolsResp_Pool) GetUuid() string { @@ -926,51 +547,23 @@ var file_srv_srv_proto_rawDesc = []byte{ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, - 0x72, 0x65, 0x70, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x22, 0xb0, 0x01, 0x0a, 0x11, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x72, 0x76, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4f, 0x6e, - 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x4d, 0x0a, 0x07, - 0x4f, 0x6e, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x22, 0x67, 0x0a, 0x0f, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, - 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, - 0x63, 0x72, 0x65, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, - 0x72, 0x65, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x39, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x72, 0x65, 0x67, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x72, 0x65, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x05, - 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x72, - 0x76, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x4a, 0x0a, 0x04, 0x50, - 0x6f, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, - 0x73, 0x76, 0x63, 0x72, 0x65, 0x70, 0x73, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, - 0x72, 0x76, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x70, 0x73, 0x22, 0x2f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, + 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x72, 0x76, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x4a, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x76, 0x63, 0x72, + 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, 0x72, 0x65, + 0x70, 0x73, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x64, 0x61, 0x6f, 0x73, + 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x72, 0x76, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -985,32 +578,24 @@ func file_srv_srv_proto_rawDescGZIP() []byte { return file_srv_srv_proto_rawDescData } -var file_srv_srv_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_srv_srv_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_srv_srv_proto_goTypes = []interface{}{ - (*NotifyReadyReq)(nil), // 0: srv.NotifyReadyReq - (*GetPoolSvcReq)(nil), // 1: srv.GetPoolSvcReq - (*GetPoolSvcResp)(nil), // 2: srv.GetPoolSvcResp - (*PoolFindByLabelReq)(nil), // 3: srv.PoolFindByLabelReq - (*PoolFindByLabelResp)(nil), // 4: srv.PoolFindByLabelResp - (*CheckListPoolReq)(nil), // 5: srv.CheckListPoolReq - (*CheckListPoolResp)(nil), // 6: srv.CheckListPoolResp - (*CheckRegPoolReq)(nil), // 7: srv.CheckRegPoolReq - (*CheckRegPoolResp)(nil), // 8: srv.CheckRegPoolResp - (*CheckDeregPoolReq)(nil), // 9: srv.CheckDeregPoolReq - (*CheckDeregPoolResp)(nil), // 10: srv.CheckDeregPoolResp - (*ListPoolsReq)(nil), // 11: srv.ListPoolsReq - (*ListPoolsResp)(nil), // 12: srv.ListPoolsResp - (*CheckListPoolResp_OnePool)(nil), // 13: srv.CheckListPoolResp.OnePool - (*ListPoolsResp_Pool)(nil), // 14: srv.ListPoolsResp.Pool + (*NotifyReadyReq)(nil), // 0: srv.NotifyReadyReq + (*GetPoolSvcReq)(nil), // 1: srv.GetPoolSvcReq + (*GetPoolSvcResp)(nil), // 2: srv.GetPoolSvcResp + (*PoolFindByLabelReq)(nil), // 3: srv.PoolFindByLabelReq + (*PoolFindByLabelResp)(nil), // 4: srv.PoolFindByLabelResp + (*ListPoolsReq)(nil), // 5: srv.ListPoolsReq + (*ListPoolsResp)(nil), // 6: srv.ListPoolsResp + (*ListPoolsResp_Pool)(nil), // 7: srv.ListPoolsResp.Pool } var file_srv_srv_proto_depIdxs = []int32{ - 13, // 0: srv.CheckListPoolResp.pools:type_name -> srv.CheckListPoolResp.OnePool - 14, // 1: srv.ListPoolsResp.pools:type_name -> srv.ListPoolsResp.Pool - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 7, // 0: srv.ListPoolsResp.pools:type_name -> srv.ListPoolsResp.Pool + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_srv_srv_proto_init() } @@ -1080,78 +665,6 @@ func file_srv_srv_proto_init() { } } file_srv_srv_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckListPoolReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckListPoolResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckRegPoolReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckRegPoolResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckDeregPoolReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckDeregPoolResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPoolsReq); i { case 0: return &v.state @@ -1163,7 +676,7 @@ func file_srv_srv_proto_init() { return nil } } - file_srv_srv_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_srv_srv_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPoolsResp); i { case 0: return &v.state @@ -1175,19 +688,7 @@ func file_srv_srv_proto_init() { return nil } } - file_srv_srv_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckListPoolResp_OnePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_srv_srv_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_srv_srv_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPoolsResp_Pool); i { case 0: return &v.state @@ -1206,7 +707,7 @@ func file_srv_srv_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_srv_srv_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/src/control/server/mgmt_drpc_checker.go b/src/control/server/mgmt_drpc_checker.go index 416fbb777b4..15eaddd7a8b 100644 --- a/src/control/server/mgmt_drpc_checker.go +++ b/src/control/server/mgmt_drpc_checker.go @@ -15,7 +15,6 @@ import ( "google.golang.org/protobuf/proto" sharedpb "github.com/daos-stack/daos/src/control/common/proto/shared" - srvpb "github.com/daos-stack/daos/src/control/common/proto/srv" "github.com/daos-stack/daos/src/control/drpc" "github.com/daos-stack/daos/src/control/fault" "github.com/daos-stack/daos/src/control/fault/code" @@ -27,13 +26,13 @@ import ( func (mod *srvModule) handleCheckerListPools(_ context.Context, reqb []byte) (out []byte, outErr error) { // TODO: Remove if we never add request fields? - req := new(srvpb.CheckListPoolReq) + req := new(sharedpb.CheckListPoolReq) if err := proto.Unmarshal(reqb, req); err != nil { return nil, drpc.UnmarshalingPayloadFailure() } mod.log.Debugf("handling CheckerListPools: %+v", req) - resp := new(srvpb.CheckListPoolResp) + resp := new(sharedpb.CheckListPoolResp) defer func() { mod.log.Debugf("CheckerListPools resp: %+v", resp) out, outErr = proto.Marshal(resp) @@ -47,7 +46,7 @@ func (mod *srvModule) handleCheckerListPools(_ context.Context, reqb []byte) (ou } for _, ps := range pools { - resp.Pools = append(resp.Pools, &srvpb.CheckListPoolResp_OnePool{ + resp.Pools = append(resp.Pools, &sharedpb.CheckListPoolResp_OnePool{ Uuid: ps.PoolUUID.String(), Label: ps.PoolLabel, Svcreps: ranklist.RanksToUint32(ps.Replicas), @@ -58,13 +57,13 @@ func (mod *srvModule) handleCheckerListPools(_ context.Context, reqb []byte) (ou } func (mod *srvModule) handleCheckerRegisterPool(parent context.Context, reqb []byte) (out []byte, outErr error) { - req := new(srvpb.CheckRegPoolReq) + req := new(sharedpb.CheckRegPoolReq) if err := proto.Unmarshal(reqb, req); err != nil { return nil, drpc.UnmarshalingPayloadFailure() } mod.log.Debugf("handling CheckerRegisterPool: %+v", req) - resp := new(srvpb.CheckRegPoolResp) + resp := new(sharedpb.CheckRegPoolResp) defer func() { mod.log.Debugf("CheckerRegisterPool resp: %+v", resp) out, outErr = proto.Marshal(resp) @@ -147,13 +146,13 @@ func (mod *srvModule) handleCheckerRegisterPool(parent context.Context, reqb []b } func (mod *srvModule) handleCheckerDeregisterPool(parent context.Context, reqb []byte) (out []byte, outErr error) { - req := new(srvpb.CheckDeregPoolReq) + req := new(sharedpb.CheckDeregPoolReq) if err := proto.Unmarshal(reqb, req); err != nil { return nil, drpc.UnmarshalingPayloadFailure() } mod.log.Debugf("handling CheckerDeregisterPool: %+v", req) - resp := new(srvpb.CheckDeregPoolResp) + resp := new(sharedpb.CheckDeregPoolResp) defer func() { mod.log.Debugf("CheckerDeregisterPool resp: %+v", resp) out, outErr = proto.Marshal(resp) diff --git a/src/control/server/mgmt_drpc_checker_test.go b/src/control/server/mgmt_drpc_checker_test.go index 2e685ef556c..ac5b8eb051e 100644 --- a/src/control/server/mgmt_drpc_checker_test.go +++ b/src/control/server/mgmt_drpc_checker_test.go @@ -21,7 +21,6 @@ import ( "github.com/daos-stack/daos/src/control/build" chkpb "github.com/daos-stack/daos/src/control/common/proto/chk" sharedpb "github.com/daos-stack/daos/src/control/common/proto/shared" - srvpb "github.com/daos-stack/daos/src/control/common/proto/srv" "github.com/daos-stack/daos/src/control/common/test" "github.com/daos-stack/daos/src/control/drpc" "github.com/daos-stack/daos/src/control/lib/control" @@ -53,7 +52,7 @@ func TestSrvModule_HandleCheckerListPools(t *testing.T) { for name, tc := range map[string]struct { req []byte notReplica bool - expResp *srvpb.CheckListPoolResp + expResp *sharedpb.CheckListPoolResp expErr error }{ "bad payload": { @@ -62,11 +61,11 @@ func TestSrvModule_HandleCheckerListPools(t *testing.T) { }, "not replica": { notReplica: true, - expResp: &srvpb.CheckListPoolResp{Status: int32(daos.MiscError)}, + expResp: &sharedpb.CheckListPoolResp{Status: int32(daos.MiscError)}, }, "success": { - expResp: &srvpb.CheckListPoolResp{ - Pools: []*srvpb.CheckListPoolResp_OnePool{ + expResp: &sharedpb.CheckListPoolResp{ + Pools: []*sharedpb.CheckListPoolResp_OnePool{ { Uuid: testPool.PoolUUID.String(), Label: testPool.PoolLabel, @@ -100,7 +99,7 @@ func TestSrvModule_HandleCheckerListPools(t *testing.T) { return } - gotResp := new(srvpb.CheckListPoolResp) + gotResp := new(sharedpb.CheckListPoolResp) if err := proto.Unmarshal(gotMsg, gotResp); err != nil { t.Fatal(err) } @@ -123,7 +122,7 @@ func TestSrvModule_HandleCheckerRegisterPool(t *testing.T) { Replicas: []ranklist.Rank{0, 1, 2}, } makeReqBytes := func(id, label string, replicas []ranklist.Rank) []byte { - req := &srvpb.CheckRegPoolReq{ + req := &sharedpb.CheckRegPoolReq{ Uuid: id, Label: label, Svcreps: ranklist.RanksToUint32(replicas), @@ -139,7 +138,7 @@ func TestSrvModule_HandleCheckerRegisterPool(t *testing.T) { for name, tc := range map[string]struct { req []byte notReplica bool - expResp *srvpb.CheckRegPoolResp + expResp *sharedpb.CheckRegPoolResp expErr error }{ "bad payload": { @@ -148,45 +147,45 @@ func TestSrvModule_HandleCheckerRegisterPool(t *testing.T) { }, "bad uuid": { req: makeReqBytes("ow", "new", []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, }, "bad label": { req: makeReqBytes(newUUID, newUUID, []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, }, "empty label": { req: makeReqBytes(newUUID, "", []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, }, "zero svcreps": { req: makeReqBytes(newUUID, "new", []ranklist.Rank{}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.InvalidInput)}, }, "not replica on update": { req: makeReqBytes(existingPool.PoolUUID.String(), "new-label", []ranklist.Rank{1}), notReplica: true, - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.MiscError)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.MiscError)}, }, "not replica on add": { req: makeReqBytes(newUUID, "new", []ranklist.Rank{0}), notReplica: true, - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.MiscError)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.MiscError)}, }, "duplicate label on update": { req: makeReqBytes(existingPool.PoolUUID.String(), otherPool.PoolLabel, []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.Exists)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.Exists)}, }, "duplicate label on add": { req: makeReqBytes(newUUID, existingPool.PoolLabel, []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{Status: int32(daos.Exists)}, + expResp: &sharedpb.CheckRegPoolResp{Status: int32(daos.Exists)}, }, "successful update": { req: makeReqBytes(existingPool.PoolUUID.String(), "new-label", []ranklist.Rank{1}), - expResp: &srvpb.CheckRegPoolResp{}, + expResp: &sharedpb.CheckRegPoolResp{}, }, "successful add": { req: makeReqBytes(newUUID, "new", []ranklist.Rank{0}), - expResp: &srvpb.CheckRegPoolResp{}, + expResp: &sharedpb.CheckRegPoolResp{}, }, } { t.Run(name, func(t *testing.T) { @@ -218,7 +217,7 @@ func TestSrvModule_HandleCheckerRegisterPool(t *testing.T) { return } - gotResp := new(srvpb.CheckRegPoolResp) + gotResp := new(sharedpb.CheckRegPoolResp) if err := proto.Unmarshal(gotMsg, gotResp); err != nil { t.Fatal(err) } @@ -236,7 +235,7 @@ func TestSrvModule_HandleCheckerDeregisterPool(t *testing.T) { Replicas: []ranklist.Rank{0, 1, 2}, } makeReqBytes := func(id string) []byte { - req := &srvpb.CheckDeregPoolReq{ + req := &sharedpb.CheckDeregPoolReq{ Uuid: id, } b, err := proto.Marshal(req) @@ -250,7 +249,7 @@ func TestSrvModule_HandleCheckerDeregisterPool(t *testing.T) { for name, tc := range map[string]struct { req []byte notReplica bool - expResp *srvpb.CheckDeregPoolResp + expResp *sharedpb.CheckDeregPoolResp expErr error }{ "bad payload": { @@ -260,19 +259,19 @@ func TestSrvModule_HandleCheckerDeregisterPool(t *testing.T) { "not replica": { req: makeReqBytes(existingPool.PoolUUID.String()), notReplica: true, - expResp: &srvpb.CheckDeregPoolResp{Status: int32(daos.MiscError)}, + expResp: &sharedpb.CheckDeregPoolResp{Status: int32(daos.MiscError)}, }, "bad uuid": { req: makeReqBytes("ow"), - expResp: &srvpb.CheckDeregPoolResp{Status: int32(daos.InvalidInput)}, + expResp: &sharedpb.CheckDeregPoolResp{Status: int32(daos.InvalidInput)}, }, "unknown uuid": { req: makeReqBytes(unkUUID), - expResp: &srvpb.CheckDeregPoolResp{Status: int32(daos.Nonexistent)}, + expResp: &sharedpb.CheckDeregPoolResp{Status: int32(daos.Nonexistent)}, }, "success": { req: makeReqBytes(existingPool.PoolUUID.String()), - expResp: &srvpb.CheckDeregPoolResp{}, + expResp: &sharedpb.CheckDeregPoolResp{}, }, } { t.Run(name, func(t *testing.T) { @@ -300,7 +299,7 @@ func TestSrvModule_HandleCheckerDeregisterPool(t *testing.T) { return } - gotResp := new(srvpb.CheckDeregPoolResp) + gotResp := new(sharedpb.CheckDeregPoolResp) if err := proto.Unmarshal(gotMsg, gotResp); err != nil { t.Fatal(err) } diff --git a/src/engine/SConscript b/src/engine/SConscript index 0a13c973579..615cc2d4eb8 100644 --- a/src/engine/SConscript +++ b/src/engine/SConscript @@ -27,7 +27,7 @@ def scons(): # Add runtime paths for daos libraries denv.AppendUnique(RPATH_FULL=['$PREFIX/lib64/daos_srv']) - sources = ['drpc_client.c', 'drpc_ras.c', + sources = ['drpc_client.c', 'drpc_ras.c', 'drpc_chk.c', 'drpc_handler.c', 'drpc_listener.c', 'drpc_progress.c', 'init.c', 'module.c', 'srv_cli.c', 'profile.c', 'rpc.c', diff --git a/src/engine/check_engine.pb-c.c b/src/engine/check_engine.pb-c.c index e5808b77468..eea5ed9a9b1 100644 --- a/src/engine/check_engine.pb-c.c +++ b/src/engine/check_engine.pb-c.c @@ -97,6 +97,282 @@ void shared__check_report_resp__free_unpacked assert(message->base.descriptor == &shared__check_report_resp__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } +void shared__check_list_pool_req__init + (Shared__CheckListPoolReq *message) +{ + static const Shared__CheckListPoolReq init_value = SHARED__CHECK_LIST_POOL_REQ__INIT; + *message = init_value; +} +size_t shared__check_list_pool_req__get_packed_size + (const Shared__CheckListPoolReq *message) +{ + assert(message->base.descriptor == &shared__check_list_pool_req__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_list_pool_req__pack + (const Shared__CheckListPoolReq *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_list_pool_req__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_list_pool_req__pack_to_buffer + (const Shared__CheckListPoolReq *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_list_pool_req__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckListPoolReq * + shared__check_list_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckListPoolReq *) + protobuf_c_message_unpack (&shared__check_list_pool_req__descriptor, + allocator, len, data); +} +void shared__check_list_pool_req__free_unpacked + (Shared__CheckListPoolReq *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_list_pool_req__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void shared__check_list_pool_resp__one_pool__init + (Shared__CheckListPoolResp__OnePool *message) +{ + static const Shared__CheckListPoolResp__OnePool init_value = SHARED__CHECK_LIST_POOL_RESP__ONE_POOL__INIT; + *message = init_value; +} +void shared__check_list_pool_resp__init + (Shared__CheckListPoolResp *message) +{ + static const Shared__CheckListPoolResp init_value = SHARED__CHECK_LIST_POOL_RESP__INIT; + *message = init_value; +} +size_t shared__check_list_pool_resp__get_packed_size + (const Shared__CheckListPoolResp *message) +{ + assert(message->base.descriptor == &shared__check_list_pool_resp__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_list_pool_resp__pack + (const Shared__CheckListPoolResp *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_list_pool_resp__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_list_pool_resp__pack_to_buffer + (const Shared__CheckListPoolResp *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_list_pool_resp__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckListPoolResp * + shared__check_list_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckListPoolResp *) + protobuf_c_message_unpack (&shared__check_list_pool_resp__descriptor, + allocator, len, data); +} +void shared__check_list_pool_resp__free_unpacked + (Shared__CheckListPoolResp *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_list_pool_resp__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void shared__check_reg_pool_req__init + (Shared__CheckRegPoolReq *message) +{ + static const Shared__CheckRegPoolReq init_value = SHARED__CHECK_REG_POOL_REQ__INIT; + *message = init_value; +} +size_t shared__check_reg_pool_req__get_packed_size + (const Shared__CheckRegPoolReq *message) +{ + assert(message->base.descriptor == &shared__check_reg_pool_req__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_reg_pool_req__pack + (const Shared__CheckRegPoolReq *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_reg_pool_req__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_reg_pool_req__pack_to_buffer + (const Shared__CheckRegPoolReq *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_reg_pool_req__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckRegPoolReq * + shared__check_reg_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckRegPoolReq *) + protobuf_c_message_unpack (&shared__check_reg_pool_req__descriptor, + allocator, len, data); +} +void shared__check_reg_pool_req__free_unpacked + (Shared__CheckRegPoolReq *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_reg_pool_req__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void shared__check_reg_pool_resp__init + (Shared__CheckRegPoolResp *message) +{ + static const Shared__CheckRegPoolResp init_value = SHARED__CHECK_REG_POOL_RESP__INIT; + *message = init_value; +} +size_t shared__check_reg_pool_resp__get_packed_size + (const Shared__CheckRegPoolResp *message) +{ + assert(message->base.descriptor == &shared__check_reg_pool_resp__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_reg_pool_resp__pack + (const Shared__CheckRegPoolResp *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_reg_pool_resp__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_reg_pool_resp__pack_to_buffer + (const Shared__CheckRegPoolResp *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_reg_pool_resp__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckRegPoolResp * + shared__check_reg_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckRegPoolResp *) + protobuf_c_message_unpack (&shared__check_reg_pool_resp__descriptor, + allocator, len, data); +} +void shared__check_reg_pool_resp__free_unpacked + (Shared__CheckRegPoolResp *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_reg_pool_resp__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void shared__check_dereg_pool_req__init + (Shared__CheckDeregPoolReq *message) +{ + static const Shared__CheckDeregPoolReq init_value = SHARED__CHECK_DEREG_POOL_REQ__INIT; + *message = init_value; +} +size_t shared__check_dereg_pool_req__get_packed_size + (const Shared__CheckDeregPoolReq *message) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_req__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_dereg_pool_req__pack + (const Shared__CheckDeregPoolReq *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_req__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_dereg_pool_req__pack_to_buffer + (const Shared__CheckDeregPoolReq *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_req__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckDeregPoolReq * + shared__check_dereg_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckDeregPoolReq *) + protobuf_c_message_unpack (&shared__check_dereg_pool_req__descriptor, + allocator, len, data); +} +void shared__check_dereg_pool_req__free_unpacked + (Shared__CheckDeregPoolReq *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_dereg_pool_req__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +void shared__check_dereg_pool_resp__init + (Shared__CheckDeregPoolResp *message) +{ + static const Shared__CheckDeregPoolResp init_value = SHARED__CHECK_DEREG_POOL_RESP__INIT; + *message = init_value; +} +size_t shared__check_dereg_pool_resp__get_packed_size + (const Shared__CheckDeregPoolResp *message) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_resp__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t shared__check_dereg_pool_resp__pack + (const Shared__CheckDeregPoolResp *message, + uint8_t *out) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_resp__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t shared__check_dereg_pool_resp__pack_to_buffer + (const Shared__CheckDeregPoolResp *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &shared__check_dereg_pool_resp__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +Shared__CheckDeregPoolResp * + shared__check_dereg_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (Shared__CheckDeregPoolResp *) + protobuf_c_message_unpack (&shared__check_dereg_pool_resp__descriptor, + allocator, len, data); +} +void shared__check_dereg_pool_resp__free_unpacked + (Shared__CheckDeregPoolResp *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &shared__check_dereg_pool_resp__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} static const ProtobufCFieldDescriptor shared__check_report_req__field_descriptors[1] = { { @@ -173,3 +449,340 @@ const ProtobufCMessageDescriptor shared__check_report_resp__descriptor = (ProtobufCMessageInit) shared__check_report_resp__init, NULL,NULL,NULL /* reserved[123] */ }; +#define shared__check_list_pool_req__field_descriptors NULL +#define shared__check_list_pool_req__field_indices_by_name NULL +#define shared__check_list_pool_req__number_ranges NULL +const ProtobufCMessageDescriptor shared__check_list_pool_req__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckListPoolReq", + "CheckListPoolReq", + "Shared__CheckListPoolReq", + "shared", + sizeof(Shared__CheckListPoolReq), + 0, + shared__check_list_pool_req__field_descriptors, + shared__check_list_pool_req__field_indices_by_name, + 0, shared__check_list_pool_req__number_ranges, + (ProtobufCMessageInit) shared__check_list_pool_req__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_list_pool_resp__one_pool__field_descriptors[3] = +{ + { + "uuid", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Shared__CheckListPoolResp__OnePool, uuid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "label", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Shared__CheckListPoolResp__OnePool, label), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "svcreps", + 3, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_UINT32, + offsetof(Shared__CheckListPoolResp__OnePool, n_svcreps), + offsetof(Shared__CheckListPoolResp__OnePool, svcreps), + NULL, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_list_pool_resp__one_pool__field_indices_by_name[] = { + 1, /* field[1] = label */ + 2, /* field[2] = svcreps */ + 0, /* field[0] = uuid */ +}; +static const ProtobufCIntRange shared__check_list_pool_resp__one_pool__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor shared__check_list_pool_resp__one_pool__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckListPoolResp.OnePool", + "OnePool", + "Shared__CheckListPoolResp__OnePool", + "shared", + sizeof(Shared__CheckListPoolResp__OnePool), + 3, + shared__check_list_pool_resp__one_pool__field_descriptors, + shared__check_list_pool_resp__one_pool__field_indices_by_name, + 1, shared__check_list_pool_resp__one_pool__number_ranges, + (ProtobufCMessageInit) shared__check_list_pool_resp__one_pool__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_list_pool_resp__field_descriptors[2] = +{ + { + "status", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(Shared__CheckListPoolResp, status), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "pools", + 2, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(Shared__CheckListPoolResp, n_pools), + offsetof(Shared__CheckListPoolResp, pools), + &shared__check_list_pool_resp__one_pool__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_list_pool_resp__field_indices_by_name[] = { + 1, /* field[1] = pools */ + 0, /* field[0] = status */ +}; +static const ProtobufCIntRange shared__check_list_pool_resp__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor shared__check_list_pool_resp__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckListPoolResp", + "CheckListPoolResp", + "Shared__CheckListPoolResp", + "shared", + sizeof(Shared__CheckListPoolResp), + 2, + shared__check_list_pool_resp__field_descriptors, + shared__check_list_pool_resp__field_indices_by_name, + 1, shared__check_list_pool_resp__number_ranges, + (ProtobufCMessageInit) shared__check_list_pool_resp__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_reg_pool_req__field_descriptors[4] = +{ + { + "seq", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT64, + 0, /* quantifier_offset */ + offsetof(Shared__CheckRegPoolReq, seq), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "uuid", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Shared__CheckRegPoolReq, uuid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "label", + 3, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Shared__CheckRegPoolReq, label), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "svcreps", + 4, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_UINT32, + offsetof(Shared__CheckRegPoolReq, n_svcreps), + offsetof(Shared__CheckRegPoolReq, svcreps), + NULL, + NULL, + 0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_reg_pool_req__field_indices_by_name[] = { + 2, /* field[2] = label */ + 0, /* field[0] = seq */ + 3, /* field[3] = svcreps */ + 1, /* field[1] = uuid */ +}; +static const ProtobufCIntRange shared__check_reg_pool_req__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor shared__check_reg_pool_req__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckRegPoolReq", + "CheckRegPoolReq", + "Shared__CheckRegPoolReq", + "shared", + sizeof(Shared__CheckRegPoolReq), + 4, + shared__check_reg_pool_req__field_descriptors, + shared__check_reg_pool_req__field_indices_by_name, + 1, shared__check_reg_pool_req__number_ranges, + (ProtobufCMessageInit) shared__check_reg_pool_req__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_reg_pool_resp__field_descriptors[1] = +{ + { + "status", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(Shared__CheckRegPoolResp, status), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_reg_pool_resp__field_indices_by_name[] = { + 0, /* field[0] = status */ +}; +static const ProtobufCIntRange shared__check_reg_pool_resp__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor shared__check_reg_pool_resp__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckRegPoolResp", + "CheckRegPoolResp", + "Shared__CheckRegPoolResp", + "shared", + sizeof(Shared__CheckRegPoolResp), + 1, + shared__check_reg_pool_resp__field_descriptors, + shared__check_reg_pool_resp__field_indices_by_name, + 1, shared__check_reg_pool_resp__number_ranges, + (ProtobufCMessageInit) shared__check_reg_pool_resp__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_dereg_pool_req__field_descriptors[2] = +{ + { + "seq", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT64, + 0, /* quantifier_offset */ + offsetof(Shared__CheckDeregPoolReq, seq), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "uuid", + 2, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Shared__CheckDeregPoolReq, uuid), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_dereg_pool_req__field_indices_by_name[] = { + 0, /* field[0] = seq */ + 1, /* field[1] = uuid */ +}; +static const ProtobufCIntRange shared__check_dereg_pool_req__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor shared__check_dereg_pool_req__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckDeregPoolReq", + "CheckDeregPoolReq", + "Shared__CheckDeregPoolReq", + "shared", + sizeof(Shared__CheckDeregPoolReq), + 2, + shared__check_dereg_pool_req__field_descriptors, + shared__check_dereg_pool_req__field_indices_by_name, + 1, shared__check_dereg_pool_req__number_ranges, + (ProtobufCMessageInit) shared__check_dereg_pool_req__init, + NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor shared__check_dereg_pool_resp__field_descriptors[1] = +{ + { + "status", + 1, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_INT32, + 0, /* quantifier_offset */ + offsetof(Shared__CheckDeregPoolResp, status), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned shared__check_dereg_pool_resp__field_indices_by_name[] = { + 0, /* field[0] = status */ +}; +static const ProtobufCIntRange shared__check_dereg_pool_resp__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor shared__check_dereg_pool_resp__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "shared.CheckDeregPoolResp", + "CheckDeregPoolResp", + "Shared__CheckDeregPoolResp", + "shared", + sizeof(Shared__CheckDeregPoolResp), + 1, + shared__check_dereg_pool_resp__field_descriptors, + shared__check_dereg_pool_resp__field_indices_by_name, + 1, shared__check_dereg_pool_resp__number_ranges, + (ProtobufCMessageInit) shared__check_dereg_pool_resp__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/src/engine/check_engine.pb-c.h b/src/engine/check_engine.pb-c.h index e53bc3a7909..ebdf69ad887 100644 --- a/src/engine/check_engine.pb-c.h +++ b/src/engine/check_engine.pb-c.h @@ -18,6 +18,13 @@ PROTOBUF_C__BEGIN_DECLS typedef struct _Shared__CheckReportReq Shared__CheckReportReq; typedef struct _Shared__CheckReportResp Shared__CheckReportResp; +typedef struct _Shared__CheckListPoolReq Shared__CheckListPoolReq; +typedef struct _Shared__CheckListPoolResp Shared__CheckListPoolResp; +typedef struct _Shared__CheckListPoolResp__OnePool Shared__CheckListPoolResp__OnePool; +typedef struct _Shared__CheckRegPoolReq Shared__CheckRegPoolReq; +typedef struct _Shared__CheckRegPoolResp Shared__CheckRegPoolResp; +typedef struct _Shared__CheckDeregPoolReq Shared__CheckDeregPoolReq; +typedef struct _Shared__CheckDeregPoolResp Shared__CheckDeregPoolResp; /* --- enums --- */ @@ -51,6 +58,133 @@ struct _Shared__CheckReportResp , 0 } +/* + * List all the known pools from MS. + */ +struct _Shared__CheckListPoolReq +{ + ProtobufCMessage base; +}; +#define SHARED__CHECK_LIST_POOL_REQ__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_list_pool_req__descriptor) \ + } + + +struct _Shared__CheckListPoolResp__OnePool +{ + ProtobufCMessage base; + /* + * Pool UUID. + */ + char *uuid; + /* + * Pool label. + */ + char *label; + /* + * Pool service replica ranks. + */ + size_t n_svcreps; + uint32_t *svcreps; +}; +#define SHARED__CHECK_LIST_POOL_RESP__ONE_POOL__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_list_pool_resp__one_pool__descriptor) \ + , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0,NULL } + + +struct _Shared__CheckListPoolResp +{ + ProtobufCMessage base; + /* + * DAOS error code. + */ + int32_t status; + /* + * The list of pools. + */ + size_t n_pools; + Shared__CheckListPoolResp__OnePool **pools; +}; +#define SHARED__CHECK_LIST_POOL_RESP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_list_pool_resp__descriptor) \ + , 0, 0,NULL } + + +/* + * Register pool to MS. + */ +struct _Shared__CheckRegPoolReq +{ + ProtobufCMessage base; + /* + * DAOS Check event sequence, unique for the instance. + */ + uint64_t seq; + /* + * Pool UUID. + */ + char *uuid; + /* + * Pool label. + */ + char *label; + /* + * Pool service replica ranks. + */ + size_t n_svcreps; + uint32_t *svcreps; +}; +#define SHARED__CHECK_REG_POOL_REQ__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_reg_pool_req__descriptor) \ + , 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0,NULL } + + +struct _Shared__CheckRegPoolResp +{ + ProtobufCMessage base; + /* + * DAOS error code. + */ + int32_t status; +}; +#define SHARED__CHECK_REG_POOL_RESP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_reg_pool_resp__descriptor) \ + , 0 } + + +/* + * Deregister pool from MS. + */ +struct _Shared__CheckDeregPoolReq +{ + ProtobufCMessage base; + /* + * DAOS Check event sequence, unique for the instance. + */ + uint64_t seq; + /* + * The pool to be deregistered. + */ + char *uuid; +}; +#define SHARED__CHECK_DEREG_POOL_REQ__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_dereg_pool_req__descriptor) \ + , 0, (char *)protobuf_c_empty_string } + + +struct _Shared__CheckDeregPoolResp +{ + ProtobufCMessage base; + /* + * DAOS error code. + */ + int32_t status; +}; +#define SHARED__CHECK_DEREG_POOL_RESP__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&shared__check_dereg_pool_resp__descriptor) \ + , 0 } + + /* Shared__CheckReportReq methods */ void shared__check_report_req__init (Shared__CheckReportReq *message); @@ -89,6 +223,123 @@ Shared__CheckReportResp * void shared__check_report_resp__free_unpacked (Shared__CheckReportResp *message, ProtobufCAllocator *allocator); +/* Shared__CheckListPoolReq methods */ +void shared__check_list_pool_req__init + (Shared__CheckListPoolReq *message); +size_t shared__check_list_pool_req__get_packed_size + (const Shared__CheckListPoolReq *message); +size_t shared__check_list_pool_req__pack + (const Shared__CheckListPoolReq *message, + uint8_t *out); +size_t shared__check_list_pool_req__pack_to_buffer + (const Shared__CheckListPoolReq *message, + ProtobufCBuffer *buffer); +Shared__CheckListPoolReq * + shared__check_list_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_list_pool_req__free_unpacked + (Shared__CheckListPoolReq *message, + ProtobufCAllocator *allocator); +/* Shared__CheckListPoolResp__OnePool methods */ +void shared__check_list_pool_resp__one_pool__init + (Shared__CheckListPoolResp__OnePool *message); +/* Shared__CheckListPoolResp methods */ +void shared__check_list_pool_resp__init + (Shared__CheckListPoolResp *message); +size_t shared__check_list_pool_resp__get_packed_size + (const Shared__CheckListPoolResp *message); +size_t shared__check_list_pool_resp__pack + (const Shared__CheckListPoolResp *message, + uint8_t *out); +size_t shared__check_list_pool_resp__pack_to_buffer + (const Shared__CheckListPoolResp *message, + ProtobufCBuffer *buffer); +Shared__CheckListPoolResp * + shared__check_list_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_list_pool_resp__free_unpacked + (Shared__CheckListPoolResp *message, + ProtobufCAllocator *allocator); +/* Shared__CheckRegPoolReq methods */ +void shared__check_reg_pool_req__init + (Shared__CheckRegPoolReq *message); +size_t shared__check_reg_pool_req__get_packed_size + (const Shared__CheckRegPoolReq *message); +size_t shared__check_reg_pool_req__pack + (const Shared__CheckRegPoolReq *message, + uint8_t *out); +size_t shared__check_reg_pool_req__pack_to_buffer + (const Shared__CheckRegPoolReq *message, + ProtobufCBuffer *buffer); +Shared__CheckRegPoolReq * + shared__check_reg_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_reg_pool_req__free_unpacked + (Shared__CheckRegPoolReq *message, + ProtobufCAllocator *allocator); +/* Shared__CheckRegPoolResp methods */ +void shared__check_reg_pool_resp__init + (Shared__CheckRegPoolResp *message); +size_t shared__check_reg_pool_resp__get_packed_size + (const Shared__CheckRegPoolResp *message); +size_t shared__check_reg_pool_resp__pack + (const Shared__CheckRegPoolResp *message, + uint8_t *out); +size_t shared__check_reg_pool_resp__pack_to_buffer + (const Shared__CheckRegPoolResp *message, + ProtobufCBuffer *buffer); +Shared__CheckRegPoolResp * + shared__check_reg_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_reg_pool_resp__free_unpacked + (Shared__CheckRegPoolResp *message, + ProtobufCAllocator *allocator); +/* Shared__CheckDeregPoolReq methods */ +void shared__check_dereg_pool_req__init + (Shared__CheckDeregPoolReq *message); +size_t shared__check_dereg_pool_req__get_packed_size + (const Shared__CheckDeregPoolReq *message); +size_t shared__check_dereg_pool_req__pack + (const Shared__CheckDeregPoolReq *message, + uint8_t *out); +size_t shared__check_dereg_pool_req__pack_to_buffer + (const Shared__CheckDeregPoolReq *message, + ProtobufCBuffer *buffer); +Shared__CheckDeregPoolReq * + shared__check_dereg_pool_req__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_dereg_pool_req__free_unpacked + (Shared__CheckDeregPoolReq *message, + ProtobufCAllocator *allocator); +/* Shared__CheckDeregPoolResp methods */ +void shared__check_dereg_pool_resp__init + (Shared__CheckDeregPoolResp *message); +size_t shared__check_dereg_pool_resp__get_packed_size + (const Shared__CheckDeregPoolResp *message); +size_t shared__check_dereg_pool_resp__pack + (const Shared__CheckDeregPoolResp *message, + uint8_t *out); +size_t shared__check_dereg_pool_resp__pack_to_buffer + (const Shared__CheckDeregPoolResp *message, + ProtobufCBuffer *buffer); +Shared__CheckDeregPoolResp * + shared__check_dereg_pool_resp__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void shared__check_dereg_pool_resp__free_unpacked + (Shared__CheckDeregPoolResp *message, + ProtobufCAllocator *allocator); /* --- per-message closures --- */ typedef void (*Shared__CheckReportReq_Closure) @@ -97,6 +348,27 @@ typedef void (*Shared__CheckReportReq_Closure) typedef void (*Shared__CheckReportResp_Closure) (const Shared__CheckReportResp *message, void *closure_data); +typedef void (*Shared__CheckListPoolReq_Closure) + (const Shared__CheckListPoolReq *message, + void *closure_data); +typedef void (*Shared__CheckListPoolResp__OnePool_Closure) + (const Shared__CheckListPoolResp__OnePool *message, + void *closure_data); +typedef void (*Shared__CheckListPoolResp_Closure) + (const Shared__CheckListPoolResp *message, + void *closure_data); +typedef void (*Shared__CheckRegPoolReq_Closure) + (const Shared__CheckRegPoolReq *message, + void *closure_data); +typedef void (*Shared__CheckRegPoolResp_Closure) + (const Shared__CheckRegPoolResp *message, + void *closure_data); +typedef void (*Shared__CheckDeregPoolReq_Closure) + (const Shared__CheckDeregPoolReq *message, + void *closure_data); +typedef void (*Shared__CheckDeregPoolResp_Closure) + (const Shared__CheckDeregPoolResp *message, + void *closure_data); /* --- services --- */ @@ -105,6 +377,13 @@ typedef void (*Shared__CheckReportResp_Closure) extern const ProtobufCMessageDescriptor shared__check_report_req__descriptor; extern const ProtobufCMessageDescriptor shared__check_report_resp__descriptor; +extern const ProtobufCMessageDescriptor shared__check_list_pool_req__descriptor; +extern const ProtobufCMessageDescriptor shared__check_list_pool_resp__descriptor; +extern const ProtobufCMessageDescriptor shared__check_list_pool_resp__one_pool__descriptor; +extern const ProtobufCMessageDescriptor shared__check_reg_pool_req__descriptor; +extern const ProtobufCMessageDescriptor shared__check_reg_pool_resp__descriptor; +extern const ProtobufCMessageDescriptor shared__check_dereg_pool_req__descriptor; +extern const ProtobufCMessageDescriptor shared__check_dereg_pool_resp__descriptor; PROTOBUF_C__END_DECLS diff --git a/src/engine/drpc_chk.c b/src/engine/drpc_chk.c new file mode 100644 index 00000000000..1705cb1b74d --- /dev/null +++ b/src/engine/drpc_chk.c @@ -0,0 +1,274 @@ +/* + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP + * + * SPDX-License-Identifier: BSD-2-Clause-Patent + */ +/** + * This file is part of the DAOS engine. It implements dRPC client checker upcalls to communicate + * with the control plane. + */ +#define D_LOGFAC DD_FAC(server) + +#include +#include +#include +#include +#include "check_engine.pb-c.h" + +/** + * TODO DAOS-18537: Move all of the checker upcalls into a new file, and transfer their protobuf + * definitions into shared/check_upcall.proto. + * Consider if it would be best to put the checker functionality into a new dRPC module. + */ + +void +ds_chk_free_pool_list(struct chk_list_pool *clp, uint32_t nr) +{ + int i; + + for (i = 0; i < nr; i++) { + D_FREE(clp[i].clp_label); + d_rank_list_free(clp[i].clp_svcreps); + } + + D_FREE(clp); +} + +int +ds_chk_listpool_upcall(struct chk_list_pool **clp) +{ + struct chk_list_pool *pools = NULL; + struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); + Shared__CheckListPoolReq req = SHARED__CHECK_LIST_POOL_REQ__INIT; + Shared__CheckListPoolResp *respb = NULL; + Drpc__Response *dresp = NULL; + uint8_t *reqb = NULL; + size_t size; + int rc; + int i; + + size = shared__check_list_pool_req__get_packed_size(&req); + D_ALLOC(reqb, size); + if (reqb == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + rc = shared__check_list_pool_req__pack(&req, reqb); + if (rc < 0) + goto out_req; + + rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_LIST_POOL, reqb, size, 0, &dresp); + if (rc != 0) + goto out_req; + + if (dresp->status != DRPC__STATUS__SUCCESS) { + D_ERROR("Received erroneous dRPC response for list pool: %d\n", dresp->status); + D_GOTO(out_dresp, rc = -DER_IO); + } + + respb = + shared__check_list_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); + if (alloc.oom || respb == NULL) + D_GOTO(out_dresp, rc = -DER_NOMEM); + + if (respb->status != 0) + D_GOTO(out_respb, rc = respb->status); + + D_ALLOC_ARRAY(pools, respb->n_pools); + if (pools == NULL) + D_GOTO(out_respb, rc = -DER_NOMEM); + + for (i = 0; i < respb->n_pools; i++) { + rc = uuid_parse(respb->pools[i]->uuid, pools[i].clp_uuid); + if (rc != 0) { + D_ERROR("Failed to parse uuid %s: %d\n", respb->pools[i]->uuid, rc); + D_GOTO(out_parse, rc); + } + + D_STRNDUP(pools[i].clp_label, respb->pools[i]->label, DAOS_PROP_LABEL_MAX_LEN); + if (pools[i].clp_label == NULL) + D_GOTO(out_parse, rc = -DER_NOMEM); + + pools[i].clp_svcreps = + uint32_array_to_rank_list(respb->pools[i]->svcreps, respb->pools[i]->n_svcreps); + if (pools[i].clp_svcreps == NULL) + D_GOTO(out_parse, rc = -DER_NOMEM); + } + + rc = respb->n_pools; + *clp = pools; + pools = NULL; + +out_parse: + if (pools != NULL) + ds_chk_free_pool_list(pools, respb->n_pools); +out_respb: + shared__check_list_pool_resp__free_unpacked(respb, &alloc.alloc); +out_dresp: + drpc_response_free(dresp); +out_req: + D_FREE(reqb); + + return rc; +} + +/* + * Register the pool information on MS via DRPC_METHOD_CHK_REG_POOL: + * if the pool does not exist, then add it on MS; otherwise, refresh + * the pool service replicas and label information. + */ +int +ds_chk_regpool_upcall(uint64_t seq, uuid_t uuid, char *label, d_rank_list_t *svcreps) +{ + struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); + Shared__CheckRegPoolReq req = SHARED__CHECK_REG_POOL_REQ__INIT; + Shared__CheckRegPoolResp *respb = NULL; + Drpc__Response *dresp = NULL; + uint8_t *reqb = NULL; + size_t size; + int rc; + + if (DAOS_FAIL_CHECK(DAOS_CHK_LEADER_FAIL_REGPOOL)) + return -DER_IO; + + req.seq = seq; + D_ASPRINTF(req.uuid, DF_UUIDF, DP_UUID(uuid)); + if (req.uuid == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + req.label = label; + req.n_svcreps = svcreps->rl_nr; + req.svcreps = svcreps->rl_ranks; + + size = shared__check_reg_pool_req__get_packed_size(&req); + D_ALLOC(reqb, size); + if (reqb == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + rc = shared__check_reg_pool_req__pack(&req, reqb); + if (rc < 0) + goto out_req; + + rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_REG_POOL, reqb, size, 0, &dresp); + if (rc != 0) + goto out_req; + + if (dresp->status != DRPC__STATUS__SUCCESS) { + D_ERROR("Received erroneous dRPC response for register pool: %d\n", dresp->status); + D_GOTO(out_dresp, rc = -DER_IO); + } + + respb = + shared__check_reg_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); + if (alloc.oom || respb == NULL) + D_GOTO(out_dresp, rc = -DER_NOMEM); + + rc = respb->status; + shared__check_reg_pool_resp__free_unpacked(respb, &alloc.alloc); + +out_dresp: + drpc_response_free(dresp); +out_req: + D_FREE(req.uuid); + D_FREE(reqb); + + return rc; +} + +int +ds_chk_deregpool_upcall(uint64_t seq, uuid_t uuid) +{ + struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); + Shared__CheckDeregPoolReq req = SHARED__CHECK_DEREG_POOL_REQ__INIT; + Shared__CheckDeregPoolResp *respb = NULL; + Drpc__Response *dresp = NULL; + uint8_t *reqb = NULL; + size_t size; + int rc; + + req.seq = seq; + D_ASPRINTF(req.uuid, DF_UUIDF, DP_UUID(uuid)); + if (req.uuid == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + size = shared__check_dereg_pool_req__get_packed_size(&req); + D_ALLOC(reqb, size); + if (reqb == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + rc = shared__check_dereg_pool_req__pack(&req, reqb); + if (rc < 0) + goto out_req; + + rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_DEREG_POOL, reqb, size, 0, &dresp); + if (rc != 0) + goto out_req; + + if (dresp->status != DRPC__STATUS__SUCCESS) { + D_ERROR("Received erroneous dRPC response for de-register pool: %d\n", + dresp->status); + D_GOTO(out_dresp, rc = -DER_IO); + } + + respb = + shared__check_dereg_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); + if (alloc.oom || respb == NULL) + D_GOTO(out_dresp, rc = -DER_NOMEM); + + rc = respb->status; + shared__check_dereg_pool_resp__free_unpacked(respb, &alloc.alloc); + +out_dresp: + drpc_response_free(dresp); +out_req: + D_FREE(req.uuid); + D_FREE(reqb); + + return rc; +} + +int +ds_chk_report_upcall(void *rpt) +{ + struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); + Shared__CheckReportReq req = SHARED__CHECK_REPORT_REQ__INIT; + Shared__CheckReportResp *respb = NULL; + Drpc__Response *dresp = NULL; + uint8_t *reqb = NULL; + size_t size; + int rc; + + D_ASSERT(rpt != NULL); + req.report = rpt; + + size = shared__check_report_req__get_packed_size(&req); + D_ALLOC(reqb, size); + if (reqb == NULL) + D_GOTO(out_req, rc = -DER_NOMEM); + + rc = shared__check_report_req__pack(&req, reqb); + if (rc < 0) + goto out_req; + + rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_REPORT, reqb, size, 0, &dresp); + if (rc != 0) + goto out_req; + + if (dresp->status != DRPC__STATUS__SUCCESS) { + D_ERROR("Received erroneous dRPC response for check report: %d\n", dresp->status); + D_GOTO(out_dresp, rc = -DER_IO); + } + + respb = shared__check_report_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); + if (alloc.oom || respb == NULL) + D_GOTO(out_dresp, rc = -DER_NOMEM); + + rc = respb->status; + shared__check_report_resp__free_unpacked(respb, &alloc.alloc); + +out_dresp: + drpc_response_free(dresp); +out_req: + D_FREE(reqb); + + return rc; +} diff --git a/src/engine/drpc_ras.c b/src/engine/drpc_ras.c index a85aff67f67..8277e5001cc 100644 --- a/src/engine/drpc_ras.c +++ b/src/engine/drpc_ras.c @@ -18,7 +18,6 @@ #include "drpc_internal.h" #include "srv_internal.h" #include "srv.pb-c.h" -#include "check_engine.pb-c.h" static void free_event(Shared__RASEvent *evt) @@ -367,257 +366,3 @@ ds_notify_swim_rank_dead(d_rank_t rank, uint64_t incarnation) NULL /* pool */, NULL /* cont */, NULL /* objid */, NULL /* ctlop */, &evt, false /* wait_for_resp */); } - -/** - * TODO DAOS-18537: Move all of the checker upcalls into a new file, and transfer their protobuf - * definitions into shared/check_upcall.proto. - * Consider if it would be best to put the checker functionality into a new dRPC module. - */ -void -ds_chk_free_pool_list(struct chk_list_pool *clp, uint32_t nr) -{ - int i; - - for (i = 0; i < nr; i++) { - D_FREE(clp[i].clp_label); - d_rank_list_free(clp[i].clp_svcreps); - } - - D_FREE(clp); -} - -int -ds_chk_listpool_upcall(struct chk_list_pool **clp) -{ - struct chk_list_pool *pools = NULL; - struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); - Srv__CheckListPoolReq req = SRV__CHECK_LIST_POOL_REQ__INIT; - Srv__CheckListPoolResp *respb = NULL; - Drpc__Response *dresp = NULL; - uint8_t *reqb = NULL; - size_t size; - int rc; - int i; - - size = srv__check_list_pool_req__get_packed_size(&req); - D_ALLOC(reqb, size); - if (reqb == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - rc = srv__check_list_pool_req__pack(&req, reqb); - if (rc < 0) - goto out_req; - - rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_LIST_POOL, reqb, size, 0, &dresp); - if (rc != 0) - goto out_req; - - if (dresp->status != DRPC__STATUS__SUCCESS) { - D_ERROR("Received erroneous dRPC response for list pool: %d\n", dresp->status); - D_GOTO(out_dresp, rc = -DER_IO); - } - - respb = srv__check_list_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); - if (alloc.oom || respb == NULL) - D_GOTO(out_dresp, rc = -DER_NOMEM); - - if (respb->status != 0) - D_GOTO(out_respb, rc = respb->status); - - D_ALLOC_ARRAY(pools, respb->n_pools); - if (pools == NULL) - D_GOTO(out_respb, rc = -DER_NOMEM); - - for (i = 0; i < respb->n_pools; i++) { - rc = uuid_parse(respb->pools[i]->uuid, pools[i].clp_uuid); - if (rc != 0) { - D_ERROR("Failed to parse uuid %s: %d\n", respb->pools[i]->uuid, rc); - D_GOTO(out_parse, rc); - } - - D_STRNDUP(pools[i].clp_label, respb->pools[i]->label, DAOS_PROP_LABEL_MAX_LEN); - if (pools[i].clp_label == NULL) - D_GOTO(out_parse, rc = -DER_NOMEM); - - pools[i].clp_svcreps = uint32_array_to_rank_list(respb->pools[i]->svcreps, - respb->pools[i]->n_svcreps); - if (pools[i].clp_svcreps == NULL) - D_GOTO(out_parse, rc = -DER_NOMEM); - } - - rc = respb->n_pools; - *clp = pools; - pools = NULL; - -out_parse: - if (pools != NULL) - ds_chk_free_pool_list(pools, respb->n_pools); -out_respb: - srv__check_list_pool_resp__free_unpacked(respb, &alloc.alloc); -out_dresp: - drpc_response_free(dresp); -out_req: - D_FREE(reqb); - - return rc; -} - -/* - * Register the pool information on MS via DRPC_METHOD_CHK_REG_POOL: - * if the pool does not exist, then add it on MS; otherwise, refresh - * the pool service replicas and label information. - */ -int -ds_chk_regpool_upcall(uint64_t seq, uuid_t uuid, char *label, d_rank_list_t *svcreps) -{ - struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); - Srv__CheckRegPoolReq req = SRV__CHECK_REG_POOL_REQ__INIT; - Srv__CheckRegPoolResp *respb = NULL; - Drpc__Response *dresp = NULL; - uint8_t *reqb = NULL; - size_t size; - int rc; - - if (DAOS_FAIL_CHECK(DAOS_CHK_LEADER_FAIL_REGPOOL)) - return -DER_IO; - - req.seq = seq; - D_ASPRINTF(req.uuid, DF_UUIDF, DP_UUID(uuid)); - if (req.uuid == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - req.label = label; - req.n_svcreps = svcreps->rl_nr; - req.svcreps = svcreps->rl_ranks; - - size = srv__check_reg_pool_req__get_packed_size(&req); - D_ALLOC(reqb, size); - if (reqb == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - rc = srv__check_reg_pool_req__pack(&req, reqb); - if (rc < 0) - goto out_req; - - rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_REG_POOL, reqb, size, 0, &dresp); - if (rc != 0) - goto out_req; - - if (dresp->status != DRPC__STATUS__SUCCESS) { - D_ERROR("Received erroneous dRPC response for register pool: %d\n", dresp->status); - D_GOTO(out_dresp, rc = -DER_IO); - } - - respb = srv__check_reg_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); - if (alloc.oom || respb == NULL) - D_GOTO(out_dresp, rc = -DER_NOMEM); - - rc = respb->status; - srv__check_reg_pool_resp__free_unpacked(respb, &alloc.alloc); - -out_dresp: - drpc_response_free(dresp); -out_req: - D_FREE(req.uuid); - D_FREE(reqb); - - return rc; -} - -int -ds_chk_deregpool_upcall(uint64_t seq, uuid_t uuid) -{ - struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); - Srv__CheckDeregPoolReq req = SRV__CHECK_DEREG_POOL_REQ__INIT; - Srv__CheckDeregPoolResp *respb = NULL; - Drpc__Response *dresp = NULL; - uint8_t *reqb = NULL; - size_t size; - int rc; - - req.seq = seq; - D_ASPRINTF(req.uuid, DF_UUIDF, DP_UUID(uuid)); - if (req.uuid == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - size = srv__check_dereg_pool_req__get_packed_size(&req); - D_ALLOC(reqb, size); - if (reqb == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - rc = srv__check_dereg_pool_req__pack(&req, reqb); - if (rc < 0) - goto out_req; - - rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_DEREG_POOL, reqb, size, 0, &dresp); - if (rc != 0) - goto out_req; - - if (dresp->status != DRPC__STATUS__SUCCESS) { - D_ERROR("Received erroneous dRPC response for de-register pool: %d\n", - dresp->status); - D_GOTO(out_dresp, rc = -DER_IO); - } - - respb = srv__check_dereg_pool_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); - if (alloc.oom || respb == NULL) - D_GOTO(out_dresp, rc = -DER_NOMEM); - - rc = respb->status; - srv__check_dereg_pool_resp__free_unpacked(respb, &alloc.alloc); - -out_dresp: - drpc_response_free(dresp); -out_req: - D_FREE(req.uuid); - D_FREE(reqb); - - return rc; -} - -int -ds_chk_report_upcall(void *rpt) -{ - struct drpc_alloc alloc = PROTO_ALLOCATOR_INIT(alloc); - Shared__CheckReportReq req = SHARED__CHECK_REPORT_REQ__INIT; - Shared__CheckReportResp *respb = NULL; - Drpc__Response *dresp = NULL; - uint8_t *reqb = NULL; - size_t size; - int rc; - - D_ASSERT(rpt != NULL); - req.report = rpt; - - size = shared__check_report_req__get_packed_size(&req); - D_ALLOC(reqb, size); - if (reqb == NULL) - D_GOTO(out_req, rc = -DER_NOMEM); - - rc = shared__check_report_req__pack(&req, reqb); - if (rc < 0) - goto out_req; - - rc = dss_drpc_call(DRPC_MODULE_SRV, DRPC_METHOD_CHK_REPORT, reqb, size, 0, &dresp); - if (rc != 0) - goto out_req; - - if (dresp->status != DRPC__STATUS__SUCCESS) { - D_ERROR("Received erroneous dRPC response for check report: %d\n", dresp->status); - D_GOTO(out_dresp, rc = -DER_IO); - } - - respb = shared__check_report_resp__unpack(&alloc.alloc, dresp->body.len, dresp->body.data); - if (alloc.oom || respb == NULL) - D_GOTO(out_dresp, rc = -DER_NOMEM); - - rc = respb->status; - shared__check_report_resp__free_unpacked(respb, &alloc.alloc); - -out_dresp: - drpc_response_free(dresp); -out_req: - D_FREE(reqb); - - return rc; -} diff --git a/src/engine/srv.pb-c.c b/src/engine/srv.pb-c.c index a488492d3fd..e500b0f4d21 100644 --- a/src/engine/srv.pb-c.c +++ b/src/engine/srv.pb-c.c @@ -232,282 +232,6 @@ void srv__pool_find_by_label_resp__free_unpacked assert(message->base.descriptor == &srv__pool_find_by_label_resp__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -void srv__check_list_pool_req__init - (Srv__CheckListPoolReq *message) -{ - static const Srv__CheckListPoolReq init_value = SRV__CHECK_LIST_POOL_REQ__INIT; - *message = init_value; -} -size_t srv__check_list_pool_req__get_packed_size - (const Srv__CheckListPoolReq *message) -{ - assert(message->base.descriptor == &srv__check_list_pool_req__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_list_pool_req__pack - (const Srv__CheckListPoolReq *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_list_pool_req__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_list_pool_req__pack_to_buffer - (const Srv__CheckListPoolReq *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_list_pool_req__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckListPoolReq * - srv__check_list_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckListPoolReq *) - protobuf_c_message_unpack (&srv__check_list_pool_req__descriptor, - allocator, len, data); -} -void srv__check_list_pool_req__free_unpacked - (Srv__CheckListPoolReq *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_list_pool_req__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void srv__check_list_pool_resp__one_pool__init - (Srv__CheckListPoolResp__OnePool *message) -{ - static const Srv__CheckListPoolResp__OnePool init_value = SRV__CHECK_LIST_POOL_RESP__ONE_POOL__INIT; - *message = init_value; -} -void srv__check_list_pool_resp__init - (Srv__CheckListPoolResp *message) -{ - static const Srv__CheckListPoolResp init_value = SRV__CHECK_LIST_POOL_RESP__INIT; - *message = init_value; -} -size_t srv__check_list_pool_resp__get_packed_size - (const Srv__CheckListPoolResp *message) -{ - assert(message->base.descriptor == &srv__check_list_pool_resp__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_list_pool_resp__pack - (const Srv__CheckListPoolResp *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_list_pool_resp__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_list_pool_resp__pack_to_buffer - (const Srv__CheckListPoolResp *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_list_pool_resp__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckListPoolResp * - srv__check_list_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckListPoolResp *) - protobuf_c_message_unpack (&srv__check_list_pool_resp__descriptor, - allocator, len, data); -} -void srv__check_list_pool_resp__free_unpacked - (Srv__CheckListPoolResp *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_list_pool_resp__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void srv__check_reg_pool_req__init - (Srv__CheckRegPoolReq *message) -{ - static const Srv__CheckRegPoolReq init_value = SRV__CHECK_REG_POOL_REQ__INIT; - *message = init_value; -} -size_t srv__check_reg_pool_req__get_packed_size - (const Srv__CheckRegPoolReq *message) -{ - assert(message->base.descriptor == &srv__check_reg_pool_req__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_reg_pool_req__pack - (const Srv__CheckRegPoolReq *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_reg_pool_req__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_reg_pool_req__pack_to_buffer - (const Srv__CheckRegPoolReq *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_reg_pool_req__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckRegPoolReq * - srv__check_reg_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckRegPoolReq *) - protobuf_c_message_unpack (&srv__check_reg_pool_req__descriptor, - allocator, len, data); -} -void srv__check_reg_pool_req__free_unpacked - (Srv__CheckRegPoolReq *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_reg_pool_req__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void srv__check_reg_pool_resp__init - (Srv__CheckRegPoolResp *message) -{ - static const Srv__CheckRegPoolResp init_value = SRV__CHECK_REG_POOL_RESP__INIT; - *message = init_value; -} -size_t srv__check_reg_pool_resp__get_packed_size - (const Srv__CheckRegPoolResp *message) -{ - assert(message->base.descriptor == &srv__check_reg_pool_resp__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_reg_pool_resp__pack - (const Srv__CheckRegPoolResp *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_reg_pool_resp__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_reg_pool_resp__pack_to_buffer - (const Srv__CheckRegPoolResp *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_reg_pool_resp__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckRegPoolResp * - srv__check_reg_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckRegPoolResp *) - protobuf_c_message_unpack (&srv__check_reg_pool_resp__descriptor, - allocator, len, data); -} -void srv__check_reg_pool_resp__free_unpacked - (Srv__CheckRegPoolResp *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_reg_pool_resp__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void srv__check_dereg_pool_req__init - (Srv__CheckDeregPoolReq *message) -{ - static const Srv__CheckDeregPoolReq init_value = SRV__CHECK_DEREG_POOL_REQ__INIT; - *message = init_value; -} -size_t srv__check_dereg_pool_req__get_packed_size - (const Srv__CheckDeregPoolReq *message) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_req__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_dereg_pool_req__pack - (const Srv__CheckDeregPoolReq *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_req__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_dereg_pool_req__pack_to_buffer - (const Srv__CheckDeregPoolReq *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_req__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckDeregPoolReq * - srv__check_dereg_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckDeregPoolReq *) - protobuf_c_message_unpack (&srv__check_dereg_pool_req__descriptor, - allocator, len, data); -} -void srv__check_dereg_pool_req__free_unpacked - (Srv__CheckDeregPoolReq *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_dereg_pool_req__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void srv__check_dereg_pool_resp__init - (Srv__CheckDeregPoolResp *message) -{ - static const Srv__CheckDeregPoolResp init_value = SRV__CHECK_DEREG_POOL_RESP__INIT; - *message = init_value; -} -size_t srv__check_dereg_pool_resp__get_packed_size - (const Srv__CheckDeregPoolResp *message) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_resp__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t srv__check_dereg_pool_resp__pack - (const Srv__CheckDeregPoolResp *message, - uint8_t *out) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_resp__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t srv__check_dereg_pool_resp__pack_to_buffer - (const Srv__CheckDeregPoolResp *message, - ProtobufCBuffer *buffer) -{ - assert(message->base.descriptor == &srv__check_dereg_pool_resp__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -Srv__CheckDeregPoolResp * - srv__check_dereg_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (Srv__CheckDeregPoolResp *) - protobuf_c_message_unpack (&srv__check_dereg_pool_resp__descriptor, - allocator, len, data); -} -void srv__check_dereg_pool_resp__free_unpacked - (Srv__CheckDeregPoolResp *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->base.descriptor == &srv__check_dereg_pool_resp__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} void srv__list_pools_req__init (Srv__ListPoolsReq *message) { @@ -937,343 +661,6 @@ const ProtobufCMessageDescriptor srv__pool_find_by_label_resp__descriptor = (ProtobufCMessageInit) srv__pool_find_by_label_resp__init, NULL,NULL,NULL /* reserved[123] */ }; -#define srv__check_list_pool_req__field_descriptors NULL -#define srv__check_list_pool_req__field_indices_by_name NULL -#define srv__check_list_pool_req__number_ranges NULL -const ProtobufCMessageDescriptor srv__check_list_pool_req__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckListPoolReq", - "CheckListPoolReq", - "Srv__CheckListPoolReq", - "srv", - sizeof(Srv__CheckListPoolReq), - 0, - srv__check_list_pool_req__field_descriptors, - srv__check_list_pool_req__field_indices_by_name, - 0, srv__check_list_pool_req__number_ranges, - (ProtobufCMessageInit) srv__check_list_pool_req__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_list_pool_resp__one_pool__field_descriptors[3] = -{ - { - "uuid", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Srv__CheckListPoolResp__OnePool, uuid), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "label", - 2, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Srv__CheckListPoolResp__OnePool, label), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "svcreps", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - offsetof(Srv__CheckListPoolResp__OnePool, n_svcreps), - offsetof(Srv__CheckListPoolResp__OnePool, svcreps), - NULL, - NULL, - 0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_list_pool_resp__one_pool__field_indices_by_name[] = { - 1, /* field[1] = label */ - 2, /* field[2] = svcreps */ - 0, /* field[0] = uuid */ -}; -static const ProtobufCIntRange srv__check_list_pool_resp__one_pool__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 3 } -}; -const ProtobufCMessageDescriptor srv__check_list_pool_resp__one_pool__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckListPoolResp.OnePool", - "OnePool", - "Srv__CheckListPoolResp__OnePool", - "srv", - sizeof(Srv__CheckListPoolResp__OnePool), - 3, - srv__check_list_pool_resp__one_pool__field_descriptors, - srv__check_list_pool_resp__one_pool__field_indices_by_name, - 1, srv__check_list_pool_resp__one_pool__number_ranges, - (ProtobufCMessageInit) srv__check_list_pool_resp__one_pool__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_list_pool_resp__field_descriptors[2] = -{ - { - "status", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(Srv__CheckListPoolResp, status), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "pools", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(Srv__CheckListPoolResp, n_pools), - offsetof(Srv__CheckListPoolResp, pools), - &srv__check_list_pool_resp__one_pool__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_list_pool_resp__field_indices_by_name[] = { - 1, /* field[1] = pools */ - 0, /* field[0] = status */ -}; -static const ProtobufCIntRange srv__check_list_pool_resp__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor srv__check_list_pool_resp__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckListPoolResp", - "CheckListPoolResp", - "Srv__CheckListPoolResp", - "srv", - sizeof(Srv__CheckListPoolResp), - 2, - srv__check_list_pool_resp__field_descriptors, - srv__check_list_pool_resp__field_indices_by_name, - 1, srv__check_list_pool_resp__number_ranges, - (ProtobufCMessageInit) srv__check_list_pool_resp__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_reg_pool_req__field_descriptors[4] = -{ - { - "seq", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_UINT64, - 0, /* quantifier_offset */ - offsetof(Srv__CheckRegPoolReq, seq), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "uuid", - 2, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Srv__CheckRegPoolReq, uuid), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "label", - 3, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Srv__CheckRegPoolReq, label), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "svcreps", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - offsetof(Srv__CheckRegPoolReq, n_svcreps), - offsetof(Srv__CheckRegPoolReq, svcreps), - NULL, - NULL, - 0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_reg_pool_req__field_indices_by_name[] = { - 2, /* field[2] = label */ - 0, /* field[0] = seq */ - 3, /* field[3] = svcreps */ - 1, /* field[1] = uuid */ -}; -static const ProtobufCIntRange srv__check_reg_pool_req__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 4 } -}; -const ProtobufCMessageDescriptor srv__check_reg_pool_req__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckRegPoolReq", - "CheckRegPoolReq", - "Srv__CheckRegPoolReq", - "srv", - sizeof(Srv__CheckRegPoolReq), - 4, - srv__check_reg_pool_req__field_descriptors, - srv__check_reg_pool_req__field_indices_by_name, - 1, srv__check_reg_pool_req__number_ranges, - (ProtobufCMessageInit) srv__check_reg_pool_req__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_reg_pool_resp__field_descriptors[1] = -{ - { - "status", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(Srv__CheckRegPoolResp, status), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_reg_pool_resp__field_indices_by_name[] = { - 0, /* field[0] = status */ -}; -static const ProtobufCIntRange srv__check_reg_pool_resp__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor srv__check_reg_pool_resp__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckRegPoolResp", - "CheckRegPoolResp", - "Srv__CheckRegPoolResp", - "srv", - sizeof(Srv__CheckRegPoolResp), - 1, - srv__check_reg_pool_resp__field_descriptors, - srv__check_reg_pool_resp__field_indices_by_name, - 1, srv__check_reg_pool_resp__number_ranges, - (ProtobufCMessageInit) srv__check_reg_pool_resp__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_dereg_pool_req__field_descriptors[2] = -{ - { - "seq", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_UINT64, - 0, /* quantifier_offset */ - offsetof(Srv__CheckDeregPoolReq, seq), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "uuid", - 2, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Srv__CheckDeregPoolReq, uuid), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_dereg_pool_req__field_indices_by_name[] = { - 0, /* field[0] = seq */ - 1, /* field[1] = uuid */ -}; -static const ProtobufCIntRange srv__check_dereg_pool_req__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor srv__check_dereg_pool_req__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckDeregPoolReq", - "CheckDeregPoolReq", - "Srv__CheckDeregPoolReq", - "srv", - sizeof(Srv__CheckDeregPoolReq), - 2, - srv__check_dereg_pool_req__field_descriptors, - srv__check_dereg_pool_req__field_indices_by_name, - 1, srv__check_dereg_pool_req__number_ranges, - (ProtobufCMessageInit) srv__check_dereg_pool_req__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor srv__check_dereg_pool_resp__field_descriptors[1] = -{ - { - "status", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(Srv__CheckDeregPoolResp, status), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned srv__check_dereg_pool_resp__field_indices_by_name[] = { - 0, /* field[0] = status */ -}; -static const ProtobufCIntRange srv__check_dereg_pool_resp__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor srv__check_dereg_pool_resp__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "srv.CheckDeregPoolResp", - "CheckDeregPoolResp", - "Srv__CheckDeregPoolResp", - "srv", - sizeof(Srv__CheckDeregPoolResp), - 1, - srv__check_dereg_pool_resp__field_descriptors, - srv__check_dereg_pool_resp__field_indices_by_name, - 1, srv__check_dereg_pool_resp__number_ranges, - (ProtobufCMessageInit) srv__check_dereg_pool_resp__init, - NULL,NULL,NULL /* reserved[123] */ -}; static const ProtobufCFieldDescriptor srv__list_pools_req__field_descriptors[1] = { { diff --git a/src/engine/srv.pb-c.h b/src/engine/srv.pb-c.h index 723673f2d20..1c0d78d2b8b 100644 --- a/src/engine/srv.pb-c.h +++ b/src/engine/srv.pb-c.h @@ -20,13 +20,6 @@ typedef struct _Srv__GetPoolSvcReq Srv__GetPoolSvcReq; typedef struct _Srv__GetPoolSvcResp Srv__GetPoolSvcResp; typedef struct _Srv__PoolFindByLabelReq Srv__PoolFindByLabelReq; typedef struct _Srv__PoolFindByLabelResp Srv__PoolFindByLabelResp; -typedef struct _Srv__CheckListPoolReq Srv__CheckListPoolReq; -typedef struct _Srv__CheckListPoolResp Srv__CheckListPoolResp; -typedef struct _Srv__CheckListPoolResp__OnePool Srv__CheckListPoolResp__OnePool; -typedef struct _Srv__CheckRegPoolReq Srv__CheckRegPoolReq; -typedef struct _Srv__CheckRegPoolResp Srv__CheckRegPoolResp; -typedef struct _Srv__CheckDeregPoolReq Srv__CheckDeregPoolReq; -typedef struct _Srv__CheckDeregPoolResp Srv__CheckDeregPoolResp; typedef struct _Srv__ListPoolsReq Srv__ListPoolsReq; typedef struct _Srv__ListPoolsResp Srv__ListPoolsResp; typedef struct _Srv__ListPoolsResp__Pool Srv__ListPoolsResp__Pool; @@ -150,133 +143,6 @@ struct _Srv__PoolFindByLabelResp , 0, (char *)protobuf_c_empty_string, 0,NULL } -/* - * List all the known pools from MS. - */ -struct _Srv__CheckListPoolReq -{ - ProtobufCMessage base; -}; -#define SRV__CHECK_LIST_POOL_REQ__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_list_pool_req__descriptor) \ - } - - -struct _Srv__CheckListPoolResp__OnePool -{ - ProtobufCMessage base; - /* - * Pool UUID. - */ - char *uuid; - /* - * Pool label. - */ - char *label; - /* - * Pool service replica ranks. - */ - size_t n_svcreps; - uint32_t *svcreps; -}; -#define SRV__CHECK_LIST_POOL_RESP__ONE_POOL__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_list_pool_resp__one_pool__descriptor) \ - , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0,NULL } - - -struct _Srv__CheckListPoolResp -{ - ProtobufCMessage base; - /* - * DAOS error code. - */ - int32_t status; - /* - * The list of pools. - */ - size_t n_pools; - Srv__CheckListPoolResp__OnePool **pools; -}; -#define SRV__CHECK_LIST_POOL_RESP__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_list_pool_resp__descriptor) \ - , 0, 0,NULL } - - -/* - * Register pool to MS. - */ -struct _Srv__CheckRegPoolReq -{ - ProtobufCMessage base; - /* - * DAOS Check event sequence, unique for the instance. - */ - uint64_t seq; - /* - * Pool UUID. - */ - char *uuid; - /* - * Pool label. - */ - char *label; - /* - * Pool service replica ranks. - */ - size_t n_svcreps; - uint32_t *svcreps; -}; -#define SRV__CHECK_REG_POOL_REQ__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_reg_pool_req__descriptor) \ - , 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0,NULL } - - -struct _Srv__CheckRegPoolResp -{ - ProtobufCMessage base; - /* - * DAOS error code. - */ - int32_t status; -}; -#define SRV__CHECK_REG_POOL_RESP__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_reg_pool_resp__descriptor) \ - , 0 } - - -/* - * Deregister pool from MS. - */ -struct _Srv__CheckDeregPoolReq -{ - ProtobufCMessage base; - /* - * DAOS Check event sequence, unique for the instance. - */ - uint64_t seq; - /* - * The pool to be deregistered. - */ - char *uuid; -}; -#define SRV__CHECK_DEREG_POOL_REQ__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_dereg_pool_req__descriptor) \ - , 0, (char *)protobuf_c_empty_string } - - -struct _Srv__CheckDeregPoolResp -{ - ProtobufCMessage base; - /* - * DAOS error code. - */ - int32_t status; -}; -#define SRV__CHECK_DEREG_POOL_RESP__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&srv__check_dereg_pool_resp__descriptor) \ - , 0 } - - struct _Srv__ListPoolsReq { ProtobufCMessage base; @@ -421,123 +287,6 @@ Srv__PoolFindByLabelResp * void srv__pool_find_by_label_resp__free_unpacked (Srv__PoolFindByLabelResp *message, ProtobufCAllocator *allocator); -/* Srv__CheckListPoolReq methods */ -void srv__check_list_pool_req__init - (Srv__CheckListPoolReq *message); -size_t srv__check_list_pool_req__get_packed_size - (const Srv__CheckListPoolReq *message); -size_t srv__check_list_pool_req__pack - (const Srv__CheckListPoolReq *message, - uint8_t *out); -size_t srv__check_list_pool_req__pack_to_buffer - (const Srv__CheckListPoolReq *message, - ProtobufCBuffer *buffer); -Srv__CheckListPoolReq * - srv__check_list_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_list_pool_req__free_unpacked - (Srv__CheckListPoolReq *message, - ProtobufCAllocator *allocator); -/* Srv__CheckListPoolResp__OnePool methods */ -void srv__check_list_pool_resp__one_pool__init - (Srv__CheckListPoolResp__OnePool *message); -/* Srv__CheckListPoolResp methods */ -void srv__check_list_pool_resp__init - (Srv__CheckListPoolResp *message); -size_t srv__check_list_pool_resp__get_packed_size - (const Srv__CheckListPoolResp *message); -size_t srv__check_list_pool_resp__pack - (const Srv__CheckListPoolResp *message, - uint8_t *out); -size_t srv__check_list_pool_resp__pack_to_buffer - (const Srv__CheckListPoolResp *message, - ProtobufCBuffer *buffer); -Srv__CheckListPoolResp * - srv__check_list_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_list_pool_resp__free_unpacked - (Srv__CheckListPoolResp *message, - ProtobufCAllocator *allocator); -/* Srv__CheckRegPoolReq methods */ -void srv__check_reg_pool_req__init - (Srv__CheckRegPoolReq *message); -size_t srv__check_reg_pool_req__get_packed_size - (const Srv__CheckRegPoolReq *message); -size_t srv__check_reg_pool_req__pack - (const Srv__CheckRegPoolReq *message, - uint8_t *out); -size_t srv__check_reg_pool_req__pack_to_buffer - (const Srv__CheckRegPoolReq *message, - ProtobufCBuffer *buffer); -Srv__CheckRegPoolReq * - srv__check_reg_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_reg_pool_req__free_unpacked - (Srv__CheckRegPoolReq *message, - ProtobufCAllocator *allocator); -/* Srv__CheckRegPoolResp methods */ -void srv__check_reg_pool_resp__init - (Srv__CheckRegPoolResp *message); -size_t srv__check_reg_pool_resp__get_packed_size - (const Srv__CheckRegPoolResp *message); -size_t srv__check_reg_pool_resp__pack - (const Srv__CheckRegPoolResp *message, - uint8_t *out); -size_t srv__check_reg_pool_resp__pack_to_buffer - (const Srv__CheckRegPoolResp *message, - ProtobufCBuffer *buffer); -Srv__CheckRegPoolResp * - srv__check_reg_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_reg_pool_resp__free_unpacked - (Srv__CheckRegPoolResp *message, - ProtobufCAllocator *allocator); -/* Srv__CheckDeregPoolReq methods */ -void srv__check_dereg_pool_req__init - (Srv__CheckDeregPoolReq *message); -size_t srv__check_dereg_pool_req__get_packed_size - (const Srv__CheckDeregPoolReq *message); -size_t srv__check_dereg_pool_req__pack - (const Srv__CheckDeregPoolReq *message, - uint8_t *out); -size_t srv__check_dereg_pool_req__pack_to_buffer - (const Srv__CheckDeregPoolReq *message, - ProtobufCBuffer *buffer); -Srv__CheckDeregPoolReq * - srv__check_dereg_pool_req__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_dereg_pool_req__free_unpacked - (Srv__CheckDeregPoolReq *message, - ProtobufCAllocator *allocator); -/* Srv__CheckDeregPoolResp methods */ -void srv__check_dereg_pool_resp__init - (Srv__CheckDeregPoolResp *message); -size_t srv__check_dereg_pool_resp__get_packed_size - (const Srv__CheckDeregPoolResp *message); -size_t srv__check_dereg_pool_resp__pack - (const Srv__CheckDeregPoolResp *message, - uint8_t *out); -size_t srv__check_dereg_pool_resp__pack_to_buffer - (const Srv__CheckDeregPoolResp *message, - ProtobufCBuffer *buffer); -Srv__CheckDeregPoolResp * - srv__check_dereg_pool_resp__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void srv__check_dereg_pool_resp__free_unpacked - (Srv__CheckDeregPoolResp *message, - ProtobufCAllocator *allocator); /* Srv__ListPoolsReq methods */ void srv__list_pools_req__init (Srv__ListPoolsReq *message); @@ -596,27 +345,6 @@ typedef void (*Srv__PoolFindByLabelReq_Closure) typedef void (*Srv__PoolFindByLabelResp_Closure) (const Srv__PoolFindByLabelResp *message, void *closure_data); -typedef void (*Srv__CheckListPoolReq_Closure) - (const Srv__CheckListPoolReq *message, - void *closure_data); -typedef void (*Srv__CheckListPoolResp__OnePool_Closure) - (const Srv__CheckListPoolResp__OnePool *message, - void *closure_data); -typedef void (*Srv__CheckListPoolResp_Closure) - (const Srv__CheckListPoolResp *message, - void *closure_data); -typedef void (*Srv__CheckRegPoolReq_Closure) - (const Srv__CheckRegPoolReq *message, - void *closure_data); -typedef void (*Srv__CheckRegPoolResp_Closure) - (const Srv__CheckRegPoolResp *message, - void *closure_data); -typedef void (*Srv__CheckDeregPoolReq_Closure) - (const Srv__CheckDeregPoolReq *message, - void *closure_data); -typedef void (*Srv__CheckDeregPoolResp_Closure) - (const Srv__CheckDeregPoolResp *message, - void *closure_data); typedef void (*Srv__ListPoolsReq_Closure) (const Srv__ListPoolsReq *message, void *closure_data); @@ -637,13 +365,6 @@ extern const ProtobufCMessageDescriptor srv__get_pool_svc_req__descriptor; extern const ProtobufCMessageDescriptor srv__get_pool_svc_resp__descriptor; extern const ProtobufCMessageDescriptor srv__pool_find_by_label_req__descriptor; extern const ProtobufCMessageDescriptor srv__pool_find_by_label_resp__descriptor; -extern const ProtobufCMessageDescriptor srv__check_list_pool_req__descriptor; -extern const ProtobufCMessageDescriptor srv__check_list_pool_resp__descriptor; -extern const ProtobufCMessageDescriptor srv__check_list_pool_resp__one_pool__descriptor; -extern const ProtobufCMessageDescriptor srv__check_reg_pool_req__descriptor; -extern const ProtobufCMessageDescriptor srv__check_reg_pool_resp__descriptor; -extern const ProtobufCMessageDescriptor srv__check_dereg_pool_req__descriptor; -extern const ProtobufCMessageDescriptor srv__check_dereg_pool_resp__descriptor; extern const ProtobufCMessageDescriptor srv__list_pools_req__descriptor; extern const ProtobufCMessageDescriptor srv__list_pools_resp__descriptor; extern const ProtobufCMessageDescriptor srv__list_pools_resp__pool__descriptor; diff --git a/src/include/daos_srv/daos_chk.h b/src/include/daos_srv/daos_chk.h index e29681bce18..97871eae9f8 100644 --- a/src/include/daos_srv/daos_chk.h +++ b/src/include/daos_srv/daos_chk.h @@ -93,4 +93,52 @@ int int chk_engine_pool_stop(uuid_t pool_uuid, bool destroy); +/** + * List all the known pools from control plane (MS). + * + * \param[out] clp The pools list. + * + * \retval Positive value for the conut of pools. + * Negative value if error. + */ +int +ds_chk_listpool_upcall(struct chk_list_pool **clp); + +/** + * Register the pool to control plane (MS). + * + * \param[in] seq DAOS Check event sequence, unique for the instance. + * \param[in] uuid The pool uuid. + * \param[in] label The pool label, optional. + * \param[in] svcreps Ranks for the pool service. + * + * \retval Zero on success, non-zero otherwise. + */ +int +ds_chk_regpool_upcall(uint64_t seq, uuid_t uuid, char *label, d_rank_list_t *svcreps); + +/** + * Deregister the pool from control plane (MS). + * + * \param[in] seq DAOS Check event sequence, unique for the instance. + * \param[in] uuid The pool uuid. + * + * \retval Zero on success, non-zero otherwise. + */ +int +ds_chk_deregpool_upcall(uint64_t seq, uuid_t uuid); + +/** + * Report inconsistency to control plane (MS). + * + * \param[in] rpt The pointer to Chk__CheckReport. + * + * \retval Zero on success, non-zero otherwise. + */ +int +ds_chk_report_upcall(void *rpt); + +void +ds_chk_free_pool_list(struct chk_list_pool *clp, uint32_t nr); + #endif /* __DAOS_CHK_H__ */ diff --git a/src/include/daos_srv/ras.h b/src/include/daos_srv/ras.h index d06d2196984..c30bee513d4 100644 --- a/src/include/daos_srv/ras.h +++ b/src/include/daos_srv/ras.h @@ -14,7 +14,6 @@ #include #include -#include #define DAOS_RAS_STR_FIELD_SIZE 128 #define DAOS_RAS_ID_FIELD_SIZE 64 @@ -239,52 +238,4 @@ ds_notify_pool_svc_update(uuid_t *pool, d_rank_list_t *svcl, uint64_t version); int ds_notify_swim_rank_dead(d_rank_t rank, uint64_t incarnation); -/** - * List all the known pools from control plane (MS). - * - * \param[out] clp The pools list. - * - * \retval Positive value for the conut of pools. - * Negative value if error. - */ -int -ds_chk_listpool_upcall(struct chk_list_pool **clp); - -/** - * Register the pool to control plane (MS). - * - * \param[in] seq DAOS Check event sequence, unique for the instance. - * \param[in] uuid The pool uuid. - * \param[in] label The pool label, optional. - * \param[in] svcreps Ranks for the pool service. - * - * \retval Zero on success, non-zero otherwise. - */ -int -ds_chk_regpool_upcall(uint64_t seq, uuid_t uuid, char *label, d_rank_list_t *svcreps); - -/** - * Deregister the pool from control plane (MS). - * - * \param[in] seq DAOS Check event sequence, unique for the instance. - * \param[in] uuid The pool uuid. - * - * \retval Zero on success, non-zero otherwise. - */ -int -ds_chk_deregpool_upcall(uint64_t seq, uuid_t uuid); - -/** - * Report inconsistency to control plane (MS). - * - * \param[in] rpt The pointer to Chk__CheckReport. - * - * \retval Zero on success, non-zero otherwise. - */ -int -ds_chk_report_upcall(void *rpt); - -void -ds_chk_free_pool_list(struct chk_list_pool *clp, uint32_t nr); - #endif /* __DAOS_RAS_H_ */ diff --git a/src/proto/shared/check_engine.proto b/src/proto/shared/check_engine.proto index df3895a1f08..b2904ab712c 100644 --- a/src/proto/shared/check_engine.proto +++ b/src/proto/shared/check_engine.proto @@ -21,3 +21,39 @@ message CheckReportReq { message CheckReportResp { int32 status = 1; // DAOS error code. } + +// List all the known pools from MS. +message CheckListPoolReq { +} + +message CheckListPoolResp { + message OnePool { + string uuid = 1; // Pool UUID. + string label = 2; // Pool label. + repeated uint32 svcreps = 3; // Pool service replica ranks. + } + int32 status = 1; // DAOS error code. + repeated OnePool pools = 2; // The list of pools. +} + +// Register pool to MS. +message CheckRegPoolReq { + uint64 seq = 1; // DAOS Check event sequence, unique for the instance. + string uuid = 2; // Pool UUID. + string label = 3; // Pool label. + repeated uint32 svcreps = 4; // Pool service replica ranks. +} + +message CheckRegPoolResp { + int32 status = 1; // DAOS error code. +} + +// Deregister pool from MS. +message CheckDeregPoolReq { + uint64 seq = 1; // DAOS Check event sequence, unique for the instance. + string uuid = 2; // The pool to be deregistered. +} + +message CheckDeregPoolResp { + int32 status = 1; // DAOS error code. +} diff --git a/src/proto/srv/srv.proto b/src/proto/srv/srv.proto index 4cc94ef6846..b9a1eaba928 100644 --- a/src/proto/srv/srv.proto +++ b/src/proto/srv/srv.proto @@ -45,42 +45,6 @@ message PoolFindByLabelResp { repeated uint32 svcreps = 3; // Pool service replica ranks } -// List all the known pools from MS. -message CheckListPoolReq { -} - -message CheckListPoolResp { - message OnePool { - string uuid = 1; // Pool UUID. - string label = 2; // Pool label. - repeated uint32 svcreps = 3; // Pool service replica ranks. - } - int32 status = 1; // DAOS error code. - repeated OnePool pools = 2; // The list of pools. -} - -// Register pool to MS. -message CheckRegPoolReq { - uint64 seq = 1; // DAOS Check event sequence, unique for the instance. - string uuid = 2; // Pool UUID. - string label = 3; // Pool label. - repeated uint32 svcreps = 4; // Pool service replica ranks. -} - -message CheckRegPoolResp { - int32 status = 1; // DAOS error code. -} - -// Deregister pool from MS. -message CheckDeregPoolReq { - uint64 seq = 1; // DAOS Check event sequence, unique for the instance. - string uuid = 2; // The pool to be deregistered. -} - -message CheckDeregPoolResp { - int32 status = 1; // DAOS error code. -} - message ListPoolsReq { bool include_all = 1; // Include all pools in response, regardless of state From 6556ce307920b38957a9dbd7e70cf2a67744ace9 Mon Sep 17 00:00:00 2001 From: Kris Jacque Date: Thu, 7 May 2026 23:12:24 +0000 Subject: [PATCH 2/2] Update comment Features: recovery Signed-off-by: Kris Jacque --- src/engine/drpc_chk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/drpc_chk.c b/src/engine/drpc_chk.c index 1705cb1b74d..6c2b9ac1579 100644 --- a/src/engine/drpc_chk.c +++ b/src/engine/drpc_chk.c @@ -16,9 +16,8 @@ #include "check_engine.pb-c.h" /** - * TODO DAOS-18537: Move all of the checker upcalls into a new file, and transfer their protobuf - * definitions into shared/check_upcall.proto. - * Consider if it would be best to put the checker functionality into a new dRPC module. + * TODO DAOS-18537: Consider if it would be best to put the checker functionality into a new dRPC + * module. */ void