diff --git a/src/control/cmd/daos/pretty/pool.go b/src/control/cmd/daos/pretty/pool.go index 9126d51f145..e6665cedc4d 100644 --- a/src/control/cmd/daos/pretty/pool.go +++ b/src/control/cmd/daos/pretty/pool.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // (C) Copyright 2025 Google LLC // // SPDX-License-Identifier: BSD-2-Clause-Patent @@ -136,7 +136,8 @@ func PrintPoolInfo(pi *daos.PoolInfo, out io.Writer) error { fmt.Fprintf(w, "- Rebuild %s, %d objs, %d recs\n", pi.Rebuild.State, pi.Rebuild.Objects, pi.Rebuild.Records) } else { - fmt.Fprintf(w, "- Rebuild failed, status=%d\n", pi.Rebuild.Status) + fmt.Fprintf(w, "- Rebuild %s (state=%s, status=%d)\n", + pi.Rebuild.DerivedState, pi.Rebuild.State, pi.Rebuild.Status) } } else { fmt.Fprintln(w, "- No rebuild status available.") diff --git a/src/control/cmd/daos/pretty/pool_test.go b/src/control/cmd/daos/pretty/pool_test.go index d1364805212..8bb07a787f1 100644 --- a/src/control/cmd/daos/pretty/pool_test.go +++ b/src/control/cmd/daos/pretty/pool_test.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -262,7 +262,7 @@ Pool space info: Free: 1 B, min:0 B, max:0 B, mean:0 B `, poolUUID.String()), }, - "rebuild failed": { + "rebuild failing": { pi: &daos.PoolInfo{ QueryMask: daos.DefaultPoolQueryMask, State: daos.PoolServiceStateTargetsExcluded, @@ -275,10 +275,11 @@ Pool space info: PoolLayoutVer: 1, UpgradeLayoutVer: 2, Rebuild: &daos.PoolRebuildStatus{ - Status: 2, - State: daos.PoolRebuildStateBusy, - Objects: 42, - Records: 21, + Status: -2, + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateFailing, + Objects: 42, + Records: 21, }, TierStats: []*daos.StorageUsageStats{ { @@ -298,7 +299,7 @@ Pool space info: Pool %s, ntarget=2, disabled=1, leader=42, version=100, state=TargetsExcluded Pool layout out of date (1 < 2) -- see `+backtickStr+` for details. Pool health info: -- Rebuild failed, status=2 +- Rebuild failing (state=busy, status=-2) Pool space info: - Target count:1 - Storage tier 0 (SCM): @@ -355,6 +356,144 @@ Pool space info: - Data storage: Total size: 4 B Free: 2 B, min:0 B, max:0 B, mean:0 B +`, poolUUID.String()), + }, + "rebuild state idle": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, + Status: 0, + Objects: 0, + Records: 0, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild idle, 0 objs, 0 recs +`, poolUUID.String()), + }, + "rebuild state stopped": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateStopped, + Status: int32(daos.OpCanceled), + Objects: 0, + Records: 0, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild stopped (state=done, status=-2027) +`, poolUUID.String()), + }, + "rebuild state done": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateDone, + Status: 0, + Objects: 200, + Records: 1000, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild done, 200 objs, 1000 recs +`, poolUUID.String()), + }, + "rebuild state failed": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateFailed, + Status: -1, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild failed (state=done, status=-1) +`, poolUUID.String()), + }, + "rebuild state busy": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateBusy, + Status: 0, + Objects: 150, + Records: 750, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild busy, 150 objs, 750 recs +`, poolUUID.String()), + }, + "rebuild state stopping": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateStopping, + Status: int32(daos.OpCanceled), + Objects: 100, + Records: 500, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild stopping (state=busy, status=-2027) +`, poolUUID.String()), + }, + "rebuild state failing": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateFailing, + Status: -1, + Objects: 75, + Records: 300, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild failing (state=busy, status=-1) `, poolUUID.String()), }, } { diff --git a/src/control/common/proto/mgmt/pool.pb.go b/src/control/common/proto/mgmt/pool.pb.go index 74767f17fd7..d3f73fda719 100644 --- a/src/control/common/proto/mgmt/pool.pb.go +++ b/src/control/common/proto/mgmt/pool.pb.go @@ -1,6 +1,6 @@ // // (C) Copyright 2019-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -131,9 +131,13 @@ func (PoolServiceState) EnumDescriptor() ([]byte, []int) { type PoolRebuildStatus_State int32 const ( - PoolRebuildStatus_BUSY PoolRebuildStatus_State = 0 // DRS_IN_PROGRESS - PoolRebuildStatus_IDLE PoolRebuildStatus_State = 1 // DRS_NOT_STARTED - PoolRebuildStatus_DONE PoolRebuildStatus_State = 2 // DRS_COMPLETED + PoolRebuildStatus_BUSY PoolRebuildStatus_State = 0 + PoolRebuildStatus_IDLE PoolRebuildStatus_State = 1 + PoolRebuildStatus_DONE PoolRebuildStatus_State = 2 + PoolRebuildStatus_STOPPING PoolRebuildStatus_State = 3 + PoolRebuildStatus_STOPPED PoolRebuildStatus_State = 4 + PoolRebuildStatus_FAILING PoolRebuildStatus_State = 5 + PoolRebuildStatus_FAILED PoolRebuildStatus_State = 6 ) // Enum value maps for PoolRebuildStatus_State. @@ -142,11 +146,19 @@ var ( 0: "BUSY", 1: "IDLE", 2: "DONE", + 3: "STOPPING", + 4: "STOPPED", + 5: "FAILING", + 6: "FAILED", } PoolRebuildStatus_State_value = map[string]int32{ - "BUSY": 0, - "IDLE": 1, - "DONE": 2, + "BUSY": 0, + "IDLE": 1, + "DONE": 2, + "STOPPING": 3, + "STOPPED": 4, + "FAILING": 5, + "FAILED": 6, } ) @@ -1730,10 +1742,11 @@ type PoolRebuildStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code - State PoolRebuildStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=mgmt.PoolRebuildStatus_State" json:"state,omitempty"` - Objects uint64 `protobuf:"varint,3,opt,name=objects,proto3" json:"objects,omitempty"` - Records uint64 `protobuf:"varint,4,opt,name=records,proto3" json:"records,omitempty"` + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // DAOS error code + State PoolRebuildStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=mgmt.PoolRebuildStatus_State" json:"state,omitempty"` + Objects uint64 `protobuf:"varint,3,opt,name=objects,proto3" json:"objects,omitempty"` + Records uint64 `protobuf:"varint,4,opt,name=records,proto3" json:"records,omitempty"` + DerivedState PoolRebuildStatus_State `protobuf:"varint,5,opt,name=derived_state,json=derivedState,proto3,enum=mgmt.PoolRebuildStatus_State" json:"derived_state,omitempty"` } func (x *PoolRebuildStatus) Reset() { @@ -1796,6 +1809,13 @@ func (x *PoolRebuildStatus) GetRecords() uint64 { return 0 } +func (x *PoolRebuildStatus) GetDerivedState() PoolRebuildStatus_State { + if x != nil { + return x.DerivedState + } + return PoolRebuildStatus_BUSY +} + // PoolQueryResp represents a pool query response. type PoolQueryResp struct { state protoimpl.MessageState @@ -3217,7 +3237,7 @@ var file_mgmt_pool_proto_rawDesc = []byte{ 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x11, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, @@ -3226,177 +3246,184 @@ var file_mgmt_pool_proto_rawDesc = []byte{ 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x25, 0x0a, - 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, 0x53, 0x59, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, - 0x4e, 0x45, 0x10, 0x02, 0x22, 0x89, 0x07, 0x0a, 0x0d, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, - 0x72, 0x79, 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, 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, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, - 0x31, 0x0a, 0x07, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x72, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x74, 0x69, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x09, 0x74, 0x69, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x6b, - 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x61, - 0x6e, 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x26, 0x0a, - 0x0f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x65, 0x72, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x6f, 0x6f, 0x6c, 0x4c, 0x61, 0x79, 0x6f, - 0x75, 0x74, 0x56, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x10, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, - 0x56, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x76, 0x63, 0x5f, 0x6c, 0x64, 0x72, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x73, 0x76, 0x63, 0x4c, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x76, - 0x63, 0x5f, 0x72, 0x65, 0x70, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, - 0x63, 0x52, 0x65, 0x70, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6d, - 0x61, 0x73, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x65, - 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, - 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x64, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x64, 0x5f, - 0x6f, 0x6e, 0x5f, 0x73, 0x73, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x17, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6d, 0x64, 0x4f, 0x6e, 0x53, 0x73, 0x64, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, - 0x6c, 0x66, 0x48, 0x65, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2f, 0x0a, 0x14, - 0x73, 0x79, 0x73, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x79, 0x73, 0x53, - 0x65, 0x6c, 0x66, 0x48, 0x65, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, - 0x09, 0x10, 0x0a, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x22, 0x63, 0x0a, 0x0c, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x76, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x29, 0x0a, 0x0f, 0x50, - 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x42, 0x0a, + 0x0d, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, + 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0x59, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, + 0x53, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, + 0x50, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x22, 0x89, 0x07, 0x0a, + 0x0d, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x83, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x5d, 0x0a, 0x0f, - 0x50, 0x6f, 0x6f, 0x6c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 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, 0x32, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0e, 0x50, - 0x6f, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, - 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x81, 0x01, 0x0a, - 0x12, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, - 0x22, 0x75, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, - 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, - 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb8, 0x02, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x05, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, - 0x6d, 0x65, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, + 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, 0x14, 0x0a, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x07, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x74, 0x69, + 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x74, 0x69, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, + 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6c, 0x61, + 0x79, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, + 0x70, 0x6f, 0x6f, 0x6c, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x56, 0x65, 0x72, 0x12, 0x2c, 0x0a, + 0x12, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x5f, + 0x76, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x56, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x76, 0x63, + 0x5f, 0x6c, 0x64, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x76, 0x63, 0x4c, + 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x65, 0x70, 0x73, 0x18, 0x13, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x73, 0x76, 0x63, 0x52, 0x65, 0x70, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x24, 0x0a, 0x0e, + 0x6d, 0x65, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x64, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x73, 0x64, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6d, 0x64, - 0x4f, 0x6e, 0x53, 0x73, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x5f, 0x0a, 0x0b, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, - 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x55, 0x50, 0x10, 0x03, 0x12, 0x09, 0x0a, - 0x05, 0x55, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, - 0x05, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x22, 0x5e, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x61, 0x72, 0x67, 0x65, 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, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x69, 0x6e, 0x66, - 0x6f, 0x73, 0x22, 0x54, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, - 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x69, 0x0a, 0x12, 0x50, 0x6f, 0x6f, 0x6c, - 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, - 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, + 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x6b, + 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x64, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x73, 0x64, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6d, 0x64, 0x4f, + 0x6e, 0x53, 0x73, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x65, + 0x6c, 0x66, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x66, 0x48, 0x65, 0x61, 0x6c, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x79, 0x73, 0x5f, 0x73, 0x65, 0x6c, 0x66, + 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x19, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x73, 0x79, 0x73, 0x53, 0x65, 0x6c, 0x66, 0x48, 0x65, 0x61, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x52, 0x0b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x0c, 0x50, 0x6f, 0x6f, 0x6c, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, + 0x6d, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x76, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x83, 0x01, + 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, + 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, - 0x6e, 0x6b, 0x73, 0x22, 0x76, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x66, 0x48, - 0x65, 0x61, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, - 0x73, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x56, 0x61, 0x6c, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x2a, 0x25, 0x0a, 0x10, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x07, 0x0a, 0x03, 0x53, 0x43, 0x4d, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x56, 0x4d, 0x45, - 0x10, 0x01, 0x2a, 0x5d, 0x0a, 0x10, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6e, 0x67, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, 0x12, - 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, - 0x13, 0x0a, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x64, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, - 0x04, 0x42, 0x3a, 0x5a, 0x38, 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, 0x6d, 0x67, 0x6d, 0x74, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x6b, 0x73, 0x22, 0x29, 0x0a, 0x0f, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x70, 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, 0x83, + 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, + 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, + 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, + 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, + 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x6f, 0x6f, 0x6c, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x70, 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, + 0x32, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, + 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, + 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, + 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x75, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xb8, 0x02, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, + 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x65, + 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x64, + 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x73, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6d, 0x64, 0x4f, 0x6e, 0x53, 0x73, 0x64, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x22, 0x5f, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x4f, 0x55, + 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x06, 0x0a, + 0x02, 0x55, 0x50, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x04, + 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, + 0x49, 0x4e, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x5e, 0x0a, 0x13, 0x50, 0x6f, + 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 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, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6e, 0x66, + 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x54, 0x0a, 0x13, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, + 0x22, 0x69, 0x0a, 0x12, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, + 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x76, 0x0a, 0x13, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x66, 0x48, 0x65, 0x61, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x73, 0x79, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, + 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x50, + 0x72, 0x6f, 0x70, 0x56, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x76, 0x63, 0x5f, 0x72, 0x61, + 0x6e, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x76, 0x63, 0x52, 0x61, + 0x6e, 0x6b, 0x73, 0x2a, 0x25, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, + 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x43, 0x4d, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x56, 0x4d, 0x45, 0x10, 0x01, 0x2a, 0x5d, 0x0a, 0x10, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x73, 0x74, 0x72, + 0x6f, 0x79, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x04, 0x42, 0x3a, 0x5a, 0x38, 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, 0x6d, 0x67, 0x6d, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3462,21 +3489,22 @@ var file_mgmt_pool_proto_depIdxs = []int32{ 40, // 2: mgmt.ListContResp.containers:type_name -> mgmt.ListContResp.Cont 0, // 3: mgmt.StorageUsageStats.media_type:type_name -> mgmt.StorageMediaType 2, // 4: mgmt.PoolRebuildStatus.state:type_name -> mgmt.PoolRebuildStatus.State - 24, // 5: mgmt.PoolQueryResp.rebuild:type_name -> mgmt.PoolRebuildStatus - 23, // 6: mgmt.PoolQueryResp.tier_stats:type_name -> mgmt.StorageUsageStats - 1, // 7: mgmt.PoolQueryResp.state:type_name -> mgmt.PoolServiceState - 26, // 8: mgmt.PoolSetPropReq.properties:type_name -> mgmt.PoolProperty - 26, // 9: mgmt.PoolGetPropReq.properties:type_name -> mgmt.PoolProperty - 26, // 10: mgmt.PoolGetPropResp.properties:type_name -> mgmt.PoolProperty - 0, // 11: mgmt.StorageTargetUsage.media_type:type_name -> mgmt.StorageMediaType - 3, // 12: mgmt.PoolQueryTargetInfo.state:type_name -> mgmt.PoolQueryTargetInfo.TargetState - 33, // 13: mgmt.PoolQueryTargetInfo.space:type_name -> mgmt.StorageTargetUsage - 34, // 14: mgmt.PoolQueryTargetResp.infos:type_name -> mgmt.PoolQueryTargetInfo - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 2, // 5: mgmt.PoolRebuildStatus.derived_state:type_name -> mgmt.PoolRebuildStatus.State + 24, // 6: mgmt.PoolQueryResp.rebuild:type_name -> mgmt.PoolRebuildStatus + 23, // 7: mgmt.PoolQueryResp.tier_stats:type_name -> mgmt.StorageUsageStats + 1, // 8: mgmt.PoolQueryResp.state:type_name -> mgmt.PoolServiceState + 26, // 9: mgmt.PoolSetPropReq.properties:type_name -> mgmt.PoolProperty + 26, // 10: mgmt.PoolGetPropReq.properties:type_name -> mgmt.PoolProperty + 26, // 11: mgmt.PoolGetPropResp.properties:type_name -> mgmt.PoolProperty + 0, // 12: mgmt.StorageTargetUsage.media_type:type_name -> mgmt.StorageMediaType + 3, // 13: mgmt.PoolQueryTargetInfo.state:type_name -> mgmt.PoolQueryTargetInfo.TargetState + 33, // 14: mgmt.PoolQueryTargetInfo.space:type_name -> mgmt.StorageTargetUsage + 34, // 15: mgmt.PoolQueryTargetResp.infos:type_name -> mgmt.PoolQueryTargetInfo + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_mgmt_pool_proto_init() } diff --git a/src/control/lib/control/pool.go b/src/control/lib/control/pool.go index d1dee8907aa..86985e99949 100644 --- a/src/control/lib/control/pool.go +++ b/src/control/lib/control/pool.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -582,6 +582,10 @@ func poolQueryInt(ctx context.Context, rpcClient UnaryInvoker, req *PoolQueryReq return nil, err } + if err := resp.UpdateRebuildStatus(); err != nil { + return nil, err + } + if req.QueryMask.HasOption(daos.PoolQueryOptionSelfHealPolicy) { if err := resp.UpdateSelfHealPolicy(ctx, rpcClient); err != nil { return nil, errors.Wrap(err, "pool get-prop self_heal failed") diff --git a/src/control/lib/control/pool_test.go b/src/control/lib/control/pool_test.go index d93e0c5c8ce..eed5044a5f9 100644 --- a/src/control/lib/control/pool_test.go +++ b/src/control/lib/control/pool_test.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -1882,9 +1882,10 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateIdle, - Objects: 1, - Records: 2, + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, + Objects: 1, + Records: 2, }, TierStats: []*daos.StorageUsageStats{ { @@ -1942,9 +1943,10 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateIdle, - Objects: 1, - Records: 2, + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, + Objects: 1, + Records: 2, }, TierStats: []*daos.StorageUsageStats{ { @@ -2008,6 +2010,192 @@ func TestControl_PoolQuery(t *testing.T) { }, expErr: errors.New("> 1 occurrences of prop 4 in resp"), }, + "query with rebuild state busy with DER_OP_CANCELED (stopping)": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + Status: int32(daos.OpCanceled), + State: mgmtpb.PoolRebuildStatus_BUSY, + Objects: 100, + Records: 500, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + Status: int32(daos.OpCanceled), + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateStopping, + Objects: 100, + Records: 500, + }, + }, + }, + }, + "query with rebuild state idle with DER_OP_CANCELED (stopped)": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + Status: int32(daos.OpCanceled), + State: mgmtpb.PoolRebuildStatus_IDLE, + Objects: 0, + Records: 0, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + Status: int32(daos.OpCanceled), + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateStopped, + Objects: 0, + Records: 0, + }, + }, + }, + }, + "query with rebuild state busy with error (failing)": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + State: mgmtpb.PoolRebuildStatus_BUSY, + Status: -1, + Objects: 75, + Records: 300, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateFailing, + Status: -1, + Objects: 75, + Records: 300, + }, + }, + }, + }, + "query with rebuild state idle with error (failed)": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + State: mgmtpb.PoolRebuildStatus_IDLE, + Status: -5, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateFailed, + Status: -5, + }, + }, + }, + }, + "query with rebuild state done": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + State: mgmtpb.PoolRebuildStatus_DONE, + Objects: 200, + Records: 1000, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateDone, + Objects: 200, + Records: 1000, + }, + }, + }, + }, + "query with rebuild state idle": { + mic: &MockInvokerConfig{ + UnaryResponse: MockMSResponse("host1", nil, + &mgmtpb.PoolQueryResp{ + Uuid: poolUUID.String(), + TotalTargets: 42, + ActiveTargets: 42, + State: mgmtpb.PoolServiceState_Ready, + Rebuild: &mgmtpb.PoolRebuildStatus{ + State: mgmtpb.PoolRebuildStatus_IDLE, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, + }, + }, + }, + }, } { t.Run(name, func(t *testing.T) { log, buf := logging.NewTestLogger(t.Name()) @@ -2572,9 +2760,10 @@ func TestControl_ListPools(t *testing.T) { rebuildState = daos.PoolRebuildStateBusy } return &daos.PoolRebuildStatus{ - State: rebuildState, - Objects: 1, - Records: 2, + State: rebuildState, + DerivedState: rebuildState, + Objects: 1, + Records: 2, } } expTierStats := []*daos.StorageUsageStats{ diff --git a/src/control/lib/daos/api/pool.go b/src/control/lib/daos/api/pool.go index 57e5f03a096..9eac8929555 100644 --- a/src/control/lib/daos/api/pool.go +++ b/src/control/lib/daos/api/pool.go @@ -407,6 +407,10 @@ func PoolQuery(ctx context.Context, sysName, poolID string, queryMask daos.PoolQ } } + if err := poolInfo.UpdateRebuildStatus(); err != nil { + return nil, err + } + return poolInfo, nil } diff --git a/src/control/lib/daos/pool.go b/src/control/lib/daos/pool.go index d51b6312cf6..88dc167058d 100644 --- a/src/control/lib/daos/pool.go +++ b/src/control/lib/daos/pool.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // (C) Copyright 2025 Google LLC // // SPDX-License-Identifier: BSD-2-Clause-Patent @@ -57,6 +57,7 @@ type ( PoolRebuildStatus struct { Status int32 `json:"status"` State PoolRebuildState `json:"state"` + DerivedState PoolRebuildState `json:"derived_state"` Objects uint64 `json:"objects"` Records uint64 `json:"records"` TotalObjects uint64 `json:"total_objects"` @@ -313,6 +314,40 @@ func (pi *PoolInfo) RebuildState() string { return pi.Rebuild.State.String() } +// UpdateRebuildStatus evaluates a derived state to indicate transient rebuild conditions. +func (pi *PoolInfo) UpdateRebuildStatus() error { + if pi.Rebuild == nil { + return nil + } + if pi.Rebuild.State > PoolRebuildStateDone { + return errors.New("illegal rebuild state value") + } + ds := pi.Rebuild.State + + switch pi.Rebuild.State { + case PoolRebuildStateIdle: + if pi.Rebuild.Status == int32(OpCanceled) { + ds = PoolRebuildStateStopped + } else if pi.Rebuild.Status != 0 { + ds = PoolRebuildStateFailed + } + case PoolRebuildStateDone: + if pi.Rebuild.Status != 0 { + ds = PoolRebuildStateFailed + } + case PoolRebuildStateBusy: + if pi.Rebuild.Status == int32(OpCanceled) { + ds = PoolRebuildStateStopping + } else if pi.Rebuild.Status != 0 { + ds = PoolRebuildStateFailing + } + } + + pi.Rebuild.DerivedState = ds + + return nil +} + // Name retrieves effective name for pool from either label or UUID. func (pi *PoolInfo) Name() string { name := pi.Label @@ -428,6 +463,14 @@ const ( PoolRebuildStateDone = PoolRebuildState(mgmtpb.PoolRebuildStatus_DONE) // PoolRebuildStateBusy indicates that the rebuild process is in progress. PoolRebuildStateBusy = PoolRebuildState(mgmtpb.PoolRebuildStatus_BUSY) + // PoolRebuildStateStopping indicates that the rebuild process is stopping (transient). + PoolRebuildStateStopping = PoolRebuildState(mgmtpb.PoolRebuildStatus_STOPPING) + // PoolRebuildStateStopped indicates that the rebuild process has stopped. + PoolRebuildStateStopped = PoolRebuildState(mgmtpb.PoolRebuildStatus_STOPPED) + // PoolRebuildStateFailing indicates that the rebuild process is failing (transient). + PoolRebuildStateFailing = PoolRebuildState(mgmtpb.PoolRebuildStatus_FAILING) + // PoolRebuildStateFailed indicates that the rebuild process has failed. + PoolRebuildStateFailed = PoolRebuildState(mgmtpb.PoolRebuildStatus_FAILED) ) func (prs PoolRebuildState) String() string { diff --git a/src/control/lib/daos/pool_test.go b/src/control/lib/daos/pool_test.go index 39ed135858c..5c90e03784d 100644 --- a/src/control/lib/daos/pool_test.go +++ b/src/control/lib/daos/pool_test.go @@ -1,6 +1,6 @@ // // (C) Copyright 2020-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -338,3 +338,226 @@ func TestDaos_PoolQueryMaskUnmarshalJSON(t *testing.T) { }) } } + +func TestDaos_PoolRebuildState_String(t *testing.T) { + for name, tc := range map[string]struct { + state PoolRebuildState + expString string + }{ + "idle": {PoolRebuildStateIdle, "idle"}, + "busy": {PoolRebuildStateBusy, "busy"}, + "done": {PoolRebuildStateDone, "done"}, + "stopping": {PoolRebuildStateStopping, "stopping"}, + "stopped": {PoolRebuildStateStopped, "stopped"}, + "failing": {PoolRebuildStateFailing, "failing"}, + "failed": {PoolRebuildStateFailed, "failed"}, + "unknown": {PoolRebuildState(999), "unknown"}, + } { + t.Run(name, func(t *testing.T) { + gotString := tc.state.String() + + test.AssertEqual(t, tc.expString, gotString, "unexpected string value") + }) + } +} + +func TestDaos_PoolRebuildState_MarshalJSON(t *testing.T) { + for name, tc := range map[string]struct { + state PoolRebuildState + expJSON string + expErr error + }{ + "idle": {PoolRebuildStateIdle, `"idle"`, nil}, + "busy": {PoolRebuildStateBusy, `"busy"`, nil}, + "done": {PoolRebuildStateDone, `"done"`, nil}, + "stopping": {PoolRebuildStateStopping, `"stopping"`, nil}, + "stopped": {PoolRebuildStateStopped, `"stopped"`, nil}, + "failing": {PoolRebuildStateFailing, `"failing"`, nil}, + "failed": {PoolRebuildStateFailed, `"failed"`, nil}, + "unknown": {PoolRebuildState(999), `"unknown"`, nil}, + } { + t.Run(name, func(t *testing.T) { + gotJSON, gotErr := tc.state.MarshalJSON() + + test.CmpErr(t, tc.expErr, gotErr) + if tc.expErr != nil { + return + } + + test.AssertEqual(t, tc.expJSON, string(gotJSON), "unexpected JSON") + }) + } +} + +func TestDaos_PoolRebuildState_UnmarshalJSON(t *testing.T) { + for name, tc := range map[string]struct { + json string + expState PoolRebuildState + expErr error + }{ + "idle": {`"idle"`, PoolRebuildStateIdle, nil}, + "busy": {`"busy"`, PoolRebuildStateBusy, nil}, + "done": {`"done"`, PoolRebuildStateDone, nil}, + "stopping": {`"stopping"`, PoolRebuildStateStopping, nil}, + "stopped": {`"stopped"`, PoolRebuildStateStopped, nil}, + "failing": {`"failing"`, PoolRebuildStateFailing, nil}, + "failed": {`"failed"`, PoolRebuildStateFailed, nil}, + "uppercase idle": {`"IDLE"`, PoolRebuildStateIdle, nil}, + "uppercase busy": {`"BUSY"`, PoolRebuildStateBusy, nil}, + "uppercase done": {`"DONE"`, PoolRebuildStateDone, nil}, + "uppercase stopping": {`"STOPPING"`, PoolRebuildStateStopping, nil}, + "uppercase stopped": {`"STOPPED"`, PoolRebuildStateStopped, nil}, + "uppercase failing": {`"FAILING"`, PoolRebuildStateFailing, nil}, + "uppercase failed": {`"FAILED"`, PoolRebuildStateFailed, nil}, + "mixed case stopped": {`"StOpPeD"`, PoolRebuildStateStopped, nil}, + "invalid": {`"invalid"`, PoolRebuildState(0), errors.New("failed to unmarshal")}, + "empty": {`""`, PoolRebuildState(0), errors.New("failed to unmarshal")}, + } { + t.Run(name, func(t *testing.T) { + var gotState PoolRebuildState + gotErr := gotState.UnmarshalJSON([]byte(tc.json)) + + test.CmpErr(t, tc.expErr, gotErr) + if tc.expErr != nil { + return + } + + test.AssertEqual(t, tc.expState, gotState, "unexpected state") + }) + } +} + +func TestDaos_PoolInfo_UpdateRebuildStatus(t *testing.T) { + for name, tc := range map[string]struct { + poolInfo *PoolInfo + expDerivedState PoolRebuildState + expErr error + }{ + "nil rebuild status": { + poolInfo: &PoolInfo{}, + }, + "idle state with status 0": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateIdle, + }, + }, + expDerivedState: PoolRebuildStateIdle, + }, + "idle state with canceled status": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateIdle, + Status: int32(OpCanceled), + }, + }, + expDerivedState: PoolRebuildStateStopped, + }, + "idle state with non-zero non-canceled status": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateIdle, + Status: -1008, + }, + }, + expDerivedState: PoolRebuildStateFailed, + }, + "done state with status 0": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateDone, + }, + }, + expDerivedState: PoolRebuildStateDone, + }, + "done state with non-zero status": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateDone, + Status: -1009, + }, + }, + expDerivedState: PoolRebuildStateFailed, + }, + "busy state with status 0": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateBusy, + }, + }, + expDerivedState: PoolRebuildStateBusy, + }, + "busy state with canceled status": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateBusy, + Status: int32(OpCanceled), + }, + }, + expDerivedState: PoolRebuildStateStopping, + }, + "busy state with non-zero non-canceled status": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateBusy, + Status: -1010, + }, + }, + expDerivedState: PoolRebuildStateFailing, + }, + "illegal stopped state": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateStopped, + }, + }, + expErr: errors.New("illegal rebuild state"), + }, + "illegal stopping state": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateStopping, + }, + }, + expErr: errors.New("illegal rebuild state"), + }, + "illegal failed state": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateFailed, + }, + }, + expErr: errors.New("illegal rebuild state"), + }, + "illegal failing state": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildStateFailing, + }, + }, + expErr: errors.New("illegal rebuild state"), + }, + "illegal rebuild state value": { + poolInfo: &PoolInfo{ + Rebuild: &PoolRebuildStatus{ + State: PoolRebuildState(999), + }, + }, + expErr: errors.New("illegal rebuild state value"), + }, + } { + t.Run(name, func(t *testing.T) { + gotErr := tc.poolInfo.UpdateRebuildStatus() + + test.CmpErr(t, tc.expErr, gotErr) + if tc.expErr != nil { + return + } + + if tc.poolInfo.Rebuild != nil { + test.AssertEqual(t, tc.expDerivedState, tc.poolInfo.Rebuild.DerivedState, + "unexpected derived state") + } + }) + } +} diff --git a/src/control/lib/daos/status.go b/src/control/lib/daos/status.go index 54099f31a2f..3de2435be64 100644 --- a/src/control/lib/daos/status.go +++ b/src/control/lib/daos/status.go @@ -1,5 +1,6 @@ // // (C) Copyright 2019-2024 Intel Corporation. +// (C) Copyright 2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -120,6 +121,8 @@ const ( MercuryFatalError Status = -C.DER_HG_FATAL // NoService indicates the pool service is not up and didn't process the pool request NoService Status = -C.DER_NO_SERVICE + // OpCanceled indicates that an operation was cancelled (non-crt). + OpCanceled = -C.DER_OP_CANCELED ) const ( diff --git a/src/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index 3c59fbd0523..82c188b5609 100644 --- a/src/mgmt/pool.pb-c.c +++ b/src/mgmt/pool.pb-c.c @@ -3327,20 +3327,28 @@ const ProtobufCMessageDescriptor mgmt__storage_usage_stats__descriptor = (ProtobufCMessageInit) mgmt__storage_usage_stats__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCEnumValue mgmt__pool_rebuild_status__state__enum_values_by_number[3] = +static const ProtobufCEnumValue mgmt__pool_rebuild_status__state__enum_values_by_number[7] = { { "BUSY", "MGMT__POOL_REBUILD_STATUS__STATE__BUSY", 0 }, { "IDLE", "MGMT__POOL_REBUILD_STATUS__STATE__IDLE", 1 }, { "DONE", "MGMT__POOL_REBUILD_STATUS__STATE__DONE", 2 }, + { "STOPPING", "MGMT__POOL_REBUILD_STATUS__STATE__STOPPING", 3 }, + { "STOPPED", "MGMT__POOL_REBUILD_STATUS__STATE__STOPPED", 4 }, + { "FAILING", "MGMT__POOL_REBUILD_STATUS__STATE__FAILING", 5 }, + { "FAILED", "MGMT__POOL_REBUILD_STATUS__STATE__FAILED", 6 }, }; static const ProtobufCIntRange mgmt__pool_rebuild_status__state__value_ranges[] = { -{0, 0},{0, 3} +{0, 0},{0, 7} }; -static const ProtobufCEnumValueIndex mgmt__pool_rebuild_status__state__enum_values_by_name[3] = +static const ProtobufCEnumValueIndex mgmt__pool_rebuild_status__state__enum_values_by_name[7] = { { "BUSY", 0 }, { "DONE", 2 }, + { "FAILED", 6 }, + { "FAILING", 5 }, { "IDLE", 1 }, + { "STOPPED", 4 }, + { "STOPPING", 3 }, }; const ProtobufCEnumDescriptor mgmt__pool_rebuild_status__state__descriptor = { @@ -3349,15 +3357,15 @@ const ProtobufCEnumDescriptor mgmt__pool_rebuild_status__state__descriptor = "State", "Mgmt__PoolRebuildStatus__State", "mgmt", - 3, + 7, mgmt__pool_rebuild_status__state__enum_values_by_number, - 3, + 7, mgmt__pool_rebuild_status__state__enum_values_by_name, 1, mgmt__pool_rebuild_status__state__value_ranges, NULL,NULL,NULL,NULL /* reserved[1234] */ }; -static const ProtobufCFieldDescriptor mgmt__pool_rebuild_status__field_descriptors[4] = +static const ProtobufCFieldDescriptor mgmt__pool_rebuild_status__field_descriptors[5] = { { "status", @@ -3407,8 +3415,21 @@ static const ProtobufCFieldDescriptor mgmt__pool_rebuild_status__field_descripto 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "derived_state", + 5, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_ENUM, + 0, /* quantifier_offset */ + offsetof(Mgmt__PoolRebuildStatus, derived_state), + &mgmt__pool_rebuild_status__state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned mgmt__pool_rebuild_status__field_indices_by_name[] = { + 4, /* field[4] = derived_state */ 2, /* field[2] = objects */ 3, /* field[3] = records */ 1, /* field[1] = state */ @@ -3417,7 +3438,7 @@ static const unsigned mgmt__pool_rebuild_status__field_indices_by_name[] = { static const ProtobufCIntRange mgmt__pool_rebuild_status__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 4 } + { 0, 5 } }; const ProtobufCMessageDescriptor mgmt__pool_rebuild_status__descriptor = { @@ -3427,7 +3448,7 @@ const ProtobufCMessageDescriptor mgmt__pool_rebuild_status__descriptor = "Mgmt__PoolRebuildStatus", "mgmt", sizeof(Mgmt__PoolRebuildStatus), - 4, + 5, mgmt__pool_rebuild_status__field_descriptors, mgmt__pool_rebuild_status__field_indices_by_name, 1, mgmt__pool_rebuild_status__number_ranges, diff --git a/src/mgmt/pool.pb-c.h b/src/mgmt/pool.pb-c.h index d357bc1f33b..a41ebb658ce 100644 --- a/src/mgmt/pool.pb-c.h +++ b/src/mgmt/pool.pb-c.h @@ -57,18 +57,13 @@ typedef struct _Mgmt__PoolSelfHealEvalReq Mgmt__PoolSelfHealEvalReq; /* --- enums --- */ typedef enum _Mgmt__PoolRebuildStatus__State { - /* - * DRS_IN_PROGRESS - */ MGMT__POOL_REBUILD_STATUS__STATE__BUSY = 0, - /* - * DRS_NOT_STARTED - */ MGMT__POOL_REBUILD_STATUS__STATE__IDLE = 1, - /* - * DRS_COMPLETED - */ - MGMT__POOL_REBUILD_STATUS__STATE__DONE = 2 + MGMT__POOL_REBUILD_STATUS__STATE__DONE = 2, + MGMT__POOL_REBUILD_STATUS__STATE__STOPPING = 3, + MGMT__POOL_REBUILD_STATUS__STATE__STOPPED = 4, + MGMT__POOL_REBUILD_STATUS__STATE__FAILING = 5, + MGMT__POOL_REBUILD_STATUS__STATE__FAILED = 6 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MGMT__POOL_REBUILD_STATUS__STATE) } Mgmt__PoolRebuildStatus__State; typedef enum _Mgmt__PoolQueryTargetInfo__TargetState { @@ -779,10 +774,11 @@ struct _Mgmt__PoolRebuildStatus Mgmt__PoolRebuildStatus__State state; uint64_t objects; uint64_t records; + Mgmt__PoolRebuildStatus__State derived_state; }; #define MGMT__POOL_REBUILD_STATUS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&mgmt__pool_rebuild_status__descriptor) \ - , 0, MGMT__POOL_REBUILD_STATUS__STATE__BUSY, 0, 0 } + , 0, MGMT__POOL_REBUILD_STATUS__STATE__BUSY, 0, 0, MGMT__POOL_REBUILD_STATUS__STATE__BUSY } /* diff --git a/src/mgmt/tests/srv_drpc_tests.c b/src/mgmt/tests/srv_drpc_tests.c index 5c79cab0734..aac8c4351ed 100644 --- a/src/mgmt/tests/srv_drpc_tests.c +++ b/src/mgmt/tests/srv_drpc_tests.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2019-2024 Intel Corporation. - * (C) Copyright 2025 Hewlett Packard Enterprise Development LP + * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -1406,7 +1406,7 @@ expect_query_resp_with_info(daos_pool_info_t *exp_info, } static void -test_drpc_pool_query_success(void **state) +test_drpc_pool_query_rebuild_idle_success(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1443,7 +1443,7 @@ test_drpc_pool_query_success(void **state) } static void -test_drpc_pool_query_success_rebuild_busy(void **state) +test_drpc_pool_query_rebuild_done_success(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1452,6 +1452,7 @@ test_drpc_pool_query_success_rebuild_busy(void **state) init_test_pool_info(&exp_info); init_test_rebuild_status(&exp_info.pi_rebuild_st); exp_info.pi_rebuild_st.rs_version = 1; + exp_info.pi_rebuild_st.rs_state = DRS_COMPLETED; ds_mgmt_pool_query_info_out = exp_info; ds_mgmt_pool_query_mem_bytes = 11; @@ -1459,16 +1460,14 @@ test_drpc_pool_query_success_rebuild_busy(void **state) ds_mgmt_drpc_pool_query(&call, &resp); - expect_query_resp_with_info(&exp_info, - MGMT__POOL_REBUILD_STATUS__STATE__BUSY, - &resp); + expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__DONE, &resp); D_FREE(call.body.data); D_FREE(resp.body.data); } static void -test_drpc_pool_query_success_rebuild_done(void **state) +test_drpc_pool_query_rebuild_busy_success(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1477,7 +1476,6 @@ test_drpc_pool_query_success_rebuild_done(void **state) init_test_pool_info(&exp_info); init_test_rebuild_status(&exp_info.pi_rebuild_st); exp_info.pi_rebuild_st.rs_version = 1; - exp_info.pi_rebuild_st.rs_state = DRS_COMPLETED; ds_mgmt_pool_query_info_out = exp_info; ds_mgmt_pool_query_mem_bytes = 11; @@ -1485,16 +1483,76 @@ test_drpc_pool_query_success_rebuild_done(void **state) ds_mgmt_drpc_pool_query(&call, &resp); - expect_query_resp_with_info(&exp_info, - MGMT__POOL_REBUILD_STATUS__STATE__DONE, - &resp); + expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__BUSY, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_idle_err(void **state) +{ + Drpc__Call call = DRPC__CALL__INIT; + Drpc__Response resp = DRPC__RESPONSE__INIT; + daos_pool_info_t exp_info = {0}; + + init_test_pool_info(&exp_info); + exp_info.pi_rebuild_st.rs_version = 1; + exp_info.pi_rebuild_st.rs_errno = -DER_MISC; + exp_info.pi_rebuild_st.rs_state = DRS_NOT_STARTED; + + ds_mgmt_pool_query_info_out = exp_info; + ds_mgmt_pool_query_mem_bytes = 11; + /* + * rebuild results returned to us shouldn't include the number of + * objects/records if there's an error. + */ + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_obj_nr = 42; + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_rec_nr = 999; + + setup_pool_query_drpc_call(&call, TEST_UUID, 0); + + ds_mgmt_drpc_pool_query(&call, &resp); + + expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__IDLE, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_done_err(void **state) +{ + Drpc__Call call = DRPC__CALL__INIT; + Drpc__Response resp = DRPC__RESPONSE__INIT; + daos_pool_info_t exp_info = {0}; + + init_test_pool_info(&exp_info); + exp_info.pi_rebuild_st.rs_version = 1; + exp_info.pi_rebuild_st.rs_errno = -DER_MISC; + exp_info.pi_rebuild_st.rs_state = DRS_COMPLETED; + + ds_mgmt_pool_query_info_out = exp_info; + ds_mgmt_pool_query_mem_bytes = 11; + /* + * rebuild results returned to us shouldn't include the number of + * objects/records if there's an error. + */ + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_obj_nr = 42; + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_rec_nr = 999; + + setup_pool_query_drpc_call(&call, TEST_UUID, 0); + + ds_mgmt_drpc_pool_query(&call, &resp); + + expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__DONE, &resp); D_FREE(call.body.data); D_FREE(resp.body.data); } static void -test_drpc_pool_query_success_rebuild_err(void **state) +test_drpc_pool_query_rebuild_busy_err(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -3409,10 +3467,12 @@ main(void) REINT_TEST(test_drpc_reint_bad_uuid), QUERY_TEST(test_drpc_pool_query_bad_uuid), QUERY_TEST(test_drpc_pool_query_mgmt_svc_fails), - QUERY_TEST(test_drpc_pool_query_success), - QUERY_TEST(test_drpc_pool_query_success_rebuild_busy), - QUERY_TEST(test_drpc_pool_query_success_rebuild_done), - QUERY_TEST(test_drpc_pool_query_success_rebuild_err), + QUERY_TEST(test_drpc_pool_query_rebuild_idle_success), + QUERY_TEST(test_drpc_pool_query_rebuild_done_success), + QUERY_TEST(test_drpc_pool_query_rebuild_busy_success), + QUERY_TEST(test_drpc_pool_query_rebuild_idle_err), + QUERY_TEST(test_drpc_pool_query_rebuild_done_err), + QUERY_TEST(test_drpc_pool_query_rebuild_busy_err), QUERY_TARGETS_TEST(test_drpc_pool_query_targets_bad_uuid), QUERY_TARGETS_TEST(test_drpc_pool_query_targets_mgmt_svc_fails), QUERY_TARGETS_TEST(test_drpc_pool_query_targets_with_targets), diff --git a/src/proto/mgmt/pool.proto b/src/proto/mgmt/pool.proto index faaaf3b1f85..728fc112cbe 100644 --- a/src/proto/mgmt/pool.proto +++ b/src/proto/mgmt/pool.proto @@ -1,6 +1,6 @@ // // (C) Copyright 2019-2024 Intel Corporation. -// (C) Copyright 2025 Hewlett Packard Enterprise Development LP +// (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -204,13 +204,18 @@ message StorageUsageStats { message PoolRebuildStatus { int32 status = 1; // DAOS error code enum State { - BUSY = 0; // DRS_IN_PROGRESS - IDLE = 1; // DRS_NOT_STARTED - DONE = 2; // DRS_COMPLETED + BUSY = 0; + IDLE = 1; + DONE = 2; + STOPPING = 3; + STOPPED = 4; + FAILING = 5; + FAILED = 6; } State state = 2; uint64 objects = 3; uint64 records = 4; + State derived_state = 5; } enum PoolServiceState { diff --git a/src/tests/ftest/control/dmg_pool_query_test.py b/src/tests/ftest/control/dmg_pool_query_test.py index f2280833bdf..bbb4ba30d9d 100644 --- a/src/tests/ftest/control/dmg_pool_query_test.py +++ b/src/tests/ftest/control/dmg_pool_query_test.py @@ -1,6 +1,6 @@ """ (C) Copyright 2020-2024 Intel Corporation. - (C) Copyright 2025 Hewlett Packard Enterprise Development LP + (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP SPDX-License-Identifier: BSD-2-Clause-Patent """ @@ -77,6 +77,7 @@ def test_pool_query_basic(self): "rebuild": { "status": self.params.get("rebuild_status", path="/run/exp_vals/rebuild/*"), "state": self.params.get("state", path="/run/exp_vals/rebuild/*"), + "derived_state": self.params.get("state", path="/run/exp_vals/rebuild/*"), "objects": self.params.get("objects", path="/run/exp_vals/rebuild/*"), "records": self.params.get("records", path="/run/exp_vals/rebuild/*"), "total_objects": self.params.get("total_objects", path="/run/exp_vals/rebuild/*")