From 61cc7aa17967252491d08589128e7b0a21bfcb04 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Mon, 29 Dec 2025 13:29:19 +0000 Subject: [PATCH 1/6] DAOS-18347 control: Add rebuild states to pool query Features: control Signed-off-by: Tom Nabarro --- src/control/common/proto/mgmt/pool.pb.go | 355 ++++++++++++----------- src/mgmt/pool.pb-c.c | 18 +- src/mgmt/pool.pb-c.h | 15 +- src/mgmt/srv_drpc.c | 32 +- src/proto/mgmt/pool.proto | 10 +- 5 files changed, 236 insertions(+), 194 deletions(-) diff --git a/src/control/common/proto/mgmt/pool.pb.go b/src/control/common/proto/mgmt/pool.pb.go index 74767f17fd7..0b60f5f284b 100644 --- a/src/control/common/proto/mgmt/pool.pb.go +++ b/src/control/common/proto/mgmt/pool.pb.go @@ -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, } ) @@ -3217,7 +3229,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, 0xef, 0x01, 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 +3238,180 @@ 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, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 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, 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, - 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, + 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, + 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x74, 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, 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, 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, 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, + 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, 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, + 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, 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, + 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 ( diff --git a/src/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index 3c59fbd0523..b78218b32e5 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 }, + { "STOPPING", 3 }, + { "StOPPED", 4 }, }; const ProtobufCEnumDescriptor mgmt__pool_rebuild_status__state__descriptor = { @@ -3349,9 +3357,9 @@ 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, diff --git a/src/mgmt/pool.pb-c.h b/src/mgmt/pool.pb-c.h index d357bc1f33b..1e0948b2463 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 { diff --git a/src/mgmt/srv_drpc.c b/src/mgmt/srv_drpc.c index 47202fce0a2..0a80259d075 100644 --- a/src/mgmt/srv_drpc.c +++ b/src/mgmt/srv_drpc.c @@ -1752,18 +1752,38 @@ static void pool_rebuild_status_from_info(Mgmt__PoolRebuildStatus *rebuild, struct daos_rebuild_status *info) { + bool cancelled = (info->rs_errno == -DER_OP_CANCELED); + rebuild->status = info->rs_errno; if (rebuild->status == 0) { rebuild->objects = info->rs_obj_nr; rebuild->records = info->rs_rec_nr; } - if ((info->rs_version == 0) || (info->rs_state == DRS_NOT_STARTED)) - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__IDLE; - else if (info->rs_state == DRS_COMPLETED) - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__DONE; - else - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__BUSY; + if ((info->rs_version == 0) || (info->rs_state == DRS_NOT_STARTED)) { + if (cancelled) { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__STOPPED; + rebuild->status = 0; + } else if (info->rs_errno != 0) { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILED; + } else { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__IDLE; + } + } else if (info->rs_state == DRS_COMPLETED) { + if (info->rs_errno != 0) + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILED; + else + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__DONE; + } else { + if (cancelled) { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__STOPPING; + rebuild->status = 0; + } else if (info->rs_errno != 0) { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILING; + } else { + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__BUSY; + } + } } static void diff --git a/src/proto/mgmt/pool.proto b/src/proto/mgmt/pool.proto index faaaf3b1f85..5216c870539 100644 --- a/src/proto/mgmt/pool.proto +++ b/src/proto/mgmt/pool.proto @@ -204,9 +204,13 @@ 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; From 0c5727e853bf5678eb0e2c3761beecf9e260fc52 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Mon, 5 Jan 2026 15:14:06 +0000 Subject: [PATCH 2/6] adjust states before drpc response Features: control Signed-off-by: Tom Nabarro --- src/control/common/proto/mgmt/pool.pb.go | 8 +- src/mgmt/pool.pb-c.c | 4 +- src/mgmt/pool.pb-c.h | 2 +- src/mgmt/tests/srv_drpc_tests.c | 192 +++++++++++++++++++++-- src/proto/mgmt/pool.proto | 4 +- 5 files changed, 184 insertions(+), 26 deletions(-) diff --git a/src/control/common/proto/mgmt/pool.pb.go b/src/control/common/proto/mgmt/pool.pb.go index 0b60f5f284b..44cc1d1c09e 100644 --- a/src/control/common/proto/mgmt/pool.pb.go +++ b/src/control/common/proto/mgmt/pool.pb.go @@ -135,7 +135,7 @@ const ( PoolRebuildStatus_IDLE PoolRebuildStatus_State = 1 PoolRebuildStatus_DONE PoolRebuildStatus_State = 2 PoolRebuildStatus_STOPPING PoolRebuildStatus_State = 3 - PoolRebuildStatus_StOPPED PoolRebuildStatus_State = 4 + PoolRebuildStatus_STOPPED PoolRebuildStatus_State = 4 PoolRebuildStatus_FAILING PoolRebuildStatus_State = 5 PoolRebuildStatus_FAILED PoolRebuildStatus_State = 6 ) @@ -147,7 +147,7 @@ var ( 1: "IDLE", 2: "DONE", 3: "STOPPING", - 4: "StOPPED", + 4: "STOPPED", 5: "FAILING", 6: "FAILED", } @@ -156,7 +156,7 @@ var ( "IDLE": 1, "DONE": 2, "STOPPING": 3, - "StOPPED": 4, + "STOPPED": 4, "FAILING": 5, "FAILED": 6, } @@ -3242,7 +3242,7 @@ var file_mgmt_pool_proto_rawDesc = []byte{ 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, 0x74, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x12, + 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, diff --git a/src/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index b78218b32e5..14c74bb5fbf 100644 --- a/src/mgmt/pool.pb-c.c +++ b/src/mgmt/pool.pb-c.c @@ -3333,7 +3333,7 @@ static const ProtobufCEnumValue mgmt__pool_rebuild_status__state__enum_values_by { "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 }, + { "STOPPED", "MGMT__POOL_REBUILD_STATUS__STATE__STOPPED", 4 }, { "FAILING", "MGMT__POOL_REBUILD_STATUS__STATE__FAILING", 5 }, { "FAILED", "MGMT__POOL_REBUILD_STATUS__STATE__FAILED", 6 }, }; @@ -3347,8 +3347,8 @@ static const ProtobufCEnumValueIndex mgmt__pool_rebuild_status__state__enum_valu { "FAILED", 6 }, { "FAILING", 5 }, { "IDLE", 1 }, + { "STOPPED", 4 }, { "STOPPING", 3 }, - { "StOPPED", 4 }, }; const ProtobufCEnumDescriptor mgmt__pool_rebuild_status__state__descriptor = { diff --git a/src/mgmt/pool.pb-c.h b/src/mgmt/pool.pb-c.h index 1e0948b2463..aa9eaed7468 100644 --- a/src/mgmt/pool.pb-c.h +++ b/src/mgmt/pool.pb-c.h @@ -61,7 +61,7 @@ typedef enum _Mgmt__PoolRebuildStatus__State { MGMT__POOL_REBUILD_STATUS__STATE__IDLE = 1, 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__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) diff --git a/src/mgmt/tests/srv_drpc_tests.c b/src/mgmt/tests/srv_drpc_tests.c index 5c79cab0734..2bc34e19338 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_success_rebuild_err(void **state) +test_drpc_pool_query_rebuild_idle_misc_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__FAILED, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_done_misc_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__FAILED, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_busy_misc_err(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1518,7 +1576,102 @@ test_drpc_pool_query_success_rebuild_err(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__FAILING, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_idle_cancelled(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_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; + /* rebuild errno should have been reset if DER_OP_CANCELED returned */ + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_errno = -DER_OP_CANCELED; + + 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__STOPPED, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_done_cancelled(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_OP_CANCELED; + 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__FAILED, &resp); + + D_FREE(call.body.data); + D_FREE(resp.body.data); +} + +static void +test_drpc_pool_query_rebuild_busy_cancelled(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_state = DRS_IN_PROGRESS; + + 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; + /* rebuild errno should have been reset if DER_OP_CANCELED returned */ + ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_errno = -DER_OP_CANCELED; + + 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__STOPPING, &resp); D_FREE(call.body.data); D_FREE(resp.body.data); @@ -3409,10 +3562,15 @@ 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_misc_err), + QUERY_TEST(test_drpc_pool_query_rebuild_done_misc_err), + QUERY_TEST(test_drpc_pool_query_rebuild_busy_misc_err), + QUERY_TEST(test_drpc_pool_query_rebuild_idle_cancelled), + QUERY_TEST(test_drpc_pool_query_rebuild_done_cancelled), + QUERY_TEST(test_drpc_pool_query_rebuild_busy_cancelled), 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 5216c870539..af3a27d8f88 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 // @@ -208,7 +208,7 @@ message PoolRebuildStatus { IDLE = 1; DONE = 2; STOPPING = 3; - StOPPED = 4; + STOPPED = 4; FAILING = 5; FAILED = 6; } From 1e079cd57699294c46ae22e9ac1e0b3dfdf8c54c Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Tue, 6 Jan 2026 12:25:39 +0000 Subject: [PATCH 3/6] update state definitions in src/control/lib/daos, increase code coverage Features: control Signed-off-by: Tom Nabarro --- src/control/cmd/daos/pretty/pool_test.go | 150 ++++++++++++++++++- src/control/lib/control/pool_test.go | 178 ++++++++++++++++++++++- src/control/lib/daos/pool.go | 10 +- src/control/lib/daos/pool_test.go | 90 +++++++++++- 4 files changed, 424 insertions(+), 4 deletions(-) diff --git a/src/control/cmd/daos/pretty/pool_test.go b/src/control/cmd/daos/pretty/pool_test.go index d1364805212..ea6270c1376 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 // @@ -355,6 +355,154 @@ 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, + 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.PoolRebuildStateStopped, + 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 stopped, 0 objs, 0 recs +`, poolUUID.String()), + }, + "rebuild state failed with idle": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateFailed, + Status: -5, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild failed, status=-5 +`, poolUUID.String()), + }, + "rebuild state done": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: 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 with done": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateFailed, + Status: -10, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild failed, status=-10 +`, poolUUID.String()), + }, + "rebuild state busy": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: 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.PoolRebuildStateStopping, + Status: 0, + Objects: 100, + Records: 500, + }, + }, + expPrintStr: fmt.Sprintf(` +Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready +Pool health info: +- Rebuild stopping, 100 objs, 500 recs +`, poolUUID.String()), + }, + "rebuild state failing": { + pi: &daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 8, + ActiveTargets: 8, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: 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 failed, status=-1 `, poolUUID.String()), }, } { diff --git a/src/control/lib/control/pool_test.go b/src/control/lib/control/pool_test.go index d93e0c5c8ce..609472c0f81 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 // @@ -2008,6 +2008,182 @@ func TestControl_PoolQuery(t *testing.T) { }, expErr: errors.New("> 1 occurrences of prop 4 in resp"), }, + "query with rebuild state stopping": { + 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_STOPPING, + Objects: 100, + Records: 500, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateStopping, + Objects: 100, + Records: 500, + }, + }, + }, + }, + "query with rebuild state stopped": { + 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_STOPPED, + Objects: 0, + Records: 0, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateStopped, + Objects: 0, + Records: 0, + }, + }, + }, + }, + "query with rebuild state 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_FAILING, + 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.PoolRebuildStateFailing, + Status: -1, + Objects: 75, + Records: 300, + }, + }, + }, + }, + "query with rebuild state 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_FAILED, + Status: -5, + }, + }, + ), + }, + expResp: &PoolQueryResp{ + PoolInfo: daos.PoolInfo{ + UUID: poolUUID, + TotalTargets: 42, + ActiveTargets: 42, + State: daos.PoolServiceStateReady, + Rebuild: &daos.PoolRebuildStatus{ + State: 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, + 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, + }, + }, + }, + }, } { t.Run(name, func(t *testing.T) { log, buf := logging.NewTestLogger(t.Name()) diff --git a/src/control/lib/daos/pool.go b/src/control/lib/daos/pool.go index d51b6312cf6..aad2e65af2f 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 @@ -428,6 +428,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..0e61b90d4ed 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,91 @@ 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") + }) + } +} From 104634978f60b4217205b0bcf1fa5c569f218d48 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Tue, 6 Jan 2026 14:55:19 +0000 Subject: [PATCH 4/6] minor test corrections Signed-off-by: Tom Nabarro --- src/control/cmd/daos/pretty/pool_test.go | 23 +++-------------------- src/control/lib/daos/status.go | 3 +++ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/control/cmd/daos/pretty/pool_test.go b/src/control/cmd/daos/pretty/pool_test.go index ea6270c1376..d7231a2feb5 100644 --- a/src/control/cmd/daos/pretty/pool_test.go +++ b/src/control/cmd/daos/pretty/pool_test.go @@ -393,23 +393,6 @@ Pool health info: Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready Pool health info: - Rebuild stopped, 0 objs, 0 recs -`, poolUUID.String()), - }, - "rebuild state failed with idle": { - pi: &daos.PoolInfo{ - UUID: poolUUID, - TotalTargets: 8, - ActiveTargets: 8, - State: daos.PoolServiceStateReady, - Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateFailed, - Status: -5, - }, - }, - expPrintStr: fmt.Sprintf(` -Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready -Pool health info: -- Rebuild failed, status=-5 `, poolUUID.String()), }, "rebuild state done": { @@ -431,7 +414,7 @@ Pool health info: - Rebuild done, 200 objs, 1000 recs `, poolUUID.String()), }, - "rebuild state failed with done": { + "rebuild state failed": { pi: &daos.PoolInfo{ UUID: poolUUID, TotalTargets: 8, @@ -439,13 +422,13 @@ Pool health info: State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ State: daos.PoolRebuildStateFailed, - Status: -10, + Status: int32(daos.OpCanceled), }, }, expPrintStr: fmt.Sprintf(` Pool %s, ntarget=8, disabled=0, leader=0, version=0, state=Ready Pool health info: -- Rebuild failed, status=-10 +- Rebuild failed, status=-2027 `, poolUUID.String()), }, "rebuild state busy": { 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 ( From c0063890d5218c07b77c797e889c8524314483b9 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Mon, 12 Jan 2026 12:02:48 +0000 Subject: [PATCH 5/6] add derived_state to pool rebuild status Features: control Signed-off-by: Tom Nabarro --- src/control/cmd/daos/pretty/pool.go | 5 +- src/control/cmd/daos/pretty/pool_test.go | 80 ++--- src/control/common/proto/mgmt/pool.pb.go | 387 ++++++++++++----------- src/control/lib/control/pool.go | 6 +- src/control/lib/control/pool_test.go | 79 +++-- src/control/lib/daos/api/pool.go | 4 + src/control/lib/daos/pool.go | 35 ++ src/control/lib/daos/pool_test.go | 135 ++++++++ src/mgmt/pool.pb-c.c | 19 +- src/mgmt/pool.pb-c.h | 3 +- src/mgmt/srv_drpc.c | 32 +- src/mgmt/tests/srv_drpc_tests.c | 116 +------ src/proto/mgmt/pool.proto | 1 + 13 files changed, 506 insertions(+), 396 deletions(-) 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 d7231a2feb5..8bb07a787f1 100644 --- a/src/control/cmd/daos/pretty/pool_test.go +++ b/src/control/cmd/daos/pretty/pool_test.go @@ -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): @@ -364,10 +365,11 @@ Pool space info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateIdle, - Status: 0, - Objects: 0, - Records: 0, + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, + Status: 0, + Objects: 0, + Records: 0, }, }, expPrintStr: fmt.Sprintf(` @@ -383,16 +385,17 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateStopped, - Status: 0, - Objects: 0, - Records: 0, + 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, 0 objs, 0 recs +- Rebuild stopped (state=done, status=-2027) `, poolUUID.String()), }, "rebuild state done": { @@ -402,10 +405,11 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateDone, - Status: 0, - Objects: 200, - Records: 1000, + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateDone, + Status: 0, + Objects: 200, + Records: 1000, }, }, expPrintStr: fmt.Sprintf(` @@ -421,14 +425,15 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateFailed, - Status: int32(daos.OpCanceled), + 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, status=-2027 +- Rebuild failed (state=done, status=-1) `, poolUUID.String()), }, "rebuild state busy": { @@ -438,10 +443,11 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateBusy, - Status: 0, - Objects: 150, - Records: 750, + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateBusy, + Status: 0, + Objects: 150, + Records: 750, }, }, expPrintStr: fmt.Sprintf(` @@ -457,16 +463,17 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateStopping, - Status: 0, - Objects: 100, - Records: 500, + 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, 100 objs, 500 recs +- Rebuild stopping (state=busy, status=-2027) `, poolUUID.String()), }, "rebuild state failing": { @@ -476,16 +483,17 @@ Pool health info: ActiveTargets: 8, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateFailing, - Status: -1, - Objects: 75, - Records: 300, + 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 failed, status=-1 +- 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 44cc1d1c09e..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 // @@ -1742,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() { @@ -1808,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 @@ -3229,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, 0xef, 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, @@ -3238,180 +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, 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, 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, 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, + 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, 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, 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, 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, + 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, 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, + 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, 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, + 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 ( @@ -3477,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 609472c0f81..eed5044a5f9 100644 --- a/src/control/lib/control/pool_test.go +++ b/src/control/lib/control/pool_test.go @@ -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,7 +2010,7 @@ func TestControl_PoolQuery(t *testing.T) { }, expErr: errors.New("> 1 occurrences of prop 4 in resp"), }, - "query with rebuild state stopping": { + "query with rebuild state busy with DER_OP_CANCELED (stopping)": { mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, &mgmtpb.PoolQueryResp{ @@ -2017,7 +2019,8 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: mgmtpb.PoolServiceState_Ready, Rebuild: &mgmtpb.PoolRebuildStatus{ - State: mgmtpb.PoolRebuildStatus_STOPPING, + Status: int32(daos.OpCanceled), + State: mgmtpb.PoolRebuildStatus_BUSY, Objects: 100, Records: 500, }, @@ -2031,14 +2034,16 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateStopping, - Objects: 100, - Records: 500, + Status: int32(daos.OpCanceled), + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateStopping, + Objects: 100, + Records: 500, }, }, }, }, - "query with rebuild state stopped": { + "query with rebuild state idle with DER_OP_CANCELED (stopped)": { mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, &mgmtpb.PoolQueryResp{ @@ -2047,7 +2052,8 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: mgmtpb.PoolServiceState_Ready, Rebuild: &mgmtpb.PoolRebuildStatus{ - State: mgmtpb.PoolRebuildStatus_STOPPED, + Status: int32(daos.OpCanceled), + State: mgmtpb.PoolRebuildStatus_IDLE, Objects: 0, Records: 0, }, @@ -2061,14 +2067,16 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateStopped, - Objects: 0, - Records: 0, + Status: int32(daos.OpCanceled), + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateStopped, + Objects: 0, + Records: 0, }, }, }, }, - "query with rebuild state failing": { + "query with rebuild state busy with error (failing)": { mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, &mgmtpb.PoolQueryResp{ @@ -2077,7 +2085,7 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: mgmtpb.PoolServiceState_Ready, Rebuild: &mgmtpb.PoolRebuildStatus{ - State: mgmtpb.PoolRebuildStatus_FAILING, + State: mgmtpb.PoolRebuildStatus_BUSY, Status: -1, Objects: 75, Records: 300, @@ -2092,15 +2100,16 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateFailing, - Status: -1, - Objects: 75, - Records: 300, + State: daos.PoolRebuildStateBusy, + DerivedState: daos.PoolRebuildStateFailing, + Status: -1, + Objects: 75, + Records: 300, }, }, }, }, - "query with rebuild state failed": { + "query with rebuild state idle with error (failed)": { mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, &mgmtpb.PoolQueryResp{ @@ -2109,7 +2118,7 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: mgmtpb.PoolServiceState_Ready, Rebuild: &mgmtpb.PoolRebuildStatus{ - State: mgmtpb.PoolRebuildStatus_FAILED, + State: mgmtpb.PoolRebuildStatus_IDLE, Status: -5, }, }, @@ -2122,8 +2131,9 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateFailed, - Status: -5, + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateFailed, + Status: -5, }, }, }, @@ -2151,9 +2161,10 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateDone, - Objects: 200, - Records: 1000, + State: daos.PoolRebuildStateDone, + DerivedState: daos.PoolRebuildStateDone, + Objects: 200, + Records: 1000, }, }, }, @@ -2179,7 +2190,8 @@ func TestControl_PoolQuery(t *testing.T) { ActiveTargets: 42, State: daos.PoolServiceStateReady, Rebuild: &daos.PoolRebuildStatus{ - State: daos.PoolRebuildStateIdle, + State: daos.PoolRebuildStateIdle, + DerivedState: daos.PoolRebuildStateIdle, }, }, }, @@ -2748,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 aad2e65af2f..88dc167058d 100644 --- a/src/control/lib/daos/pool.go +++ b/src/control/lib/daos/pool.go @@ -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 diff --git a/src/control/lib/daos/pool_test.go b/src/control/lib/daos/pool_test.go index 0e61b90d4ed..5c90e03784d 100644 --- a/src/control/lib/daos/pool_test.go +++ b/src/control/lib/daos/pool_test.go @@ -426,3 +426,138 @@ func TestDaos_PoolRebuildState_UnmarshalJSON(t *testing.T) { }) } } + +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/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index 14c74bb5fbf..82c188b5609 100644 --- a/src/mgmt/pool.pb-c.c +++ b/src/mgmt/pool.pb-c.c @@ -3365,7 +3365,7 @@ const ProtobufCEnumDescriptor mgmt__pool_rebuild_status__state__descriptor = 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", @@ -3415,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 */ @@ -3425,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 = { @@ -3435,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 aa9eaed7468..a41ebb658ce 100644 --- a/src/mgmt/pool.pb-c.h +++ b/src/mgmt/pool.pb-c.h @@ -774,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/srv_drpc.c b/src/mgmt/srv_drpc.c index 0a80259d075..47202fce0a2 100644 --- a/src/mgmt/srv_drpc.c +++ b/src/mgmt/srv_drpc.c @@ -1752,38 +1752,18 @@ static void pool_rebuild_status_from_info(Mgmt__PoolRebuildStatus *rebuild, struct daos_rebuild_status *info) { - bool cancelled = (info->rs_errno == -DER_OP_CANCELED); - rebuild->status = info->rs_errno; if (rebuild->status == 0) { rebuild->objects = info->rs_obj_nr; rebuild->records = info->rs_rec_nr; } - if ((info->rs_version == 0) || (info->rs_state == DRS_NOT_STARTED)) { - if (cancelled) { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__STOPPED; - rebuild->status = 0; - } else if (info->rs_errno != 0) { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILED; - } else { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__IDLE; - } - } else if (info->rs_state == DRS_COMPLETED) { - if (info->rs_errno != 0) - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILED; - else - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__DONE; - } else { - if (cancelled) { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__STOPPING; - rebuild->status = 0; - } else if (info->rs_errno != 0) { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__FAILING; - } else { - rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__BUSY; - } - } + if ((info->rs_version == 0) || (info->rs_state == DRS_NOT_STARTED)) + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__IDLE; + else if (info->rs_state == DRS_COMPLETED) + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__DONE; + else + rebuild->state = MGMT__POOL_REBUILD_STATUS__STATE__BUSY; } static void diff --git a/src/mgmt/tests/srv_drpc_tests.c b/src/mgmt/tests/srv_drpc_tests.c index 2bc34e19338..aac8c4351ed 100644 --- a/src/mgmt/tests/srv_drpc_tests.c +++ b/src/mgmt/tests/srv_drpc_tests.c @@ -1490,7 +1490,7 @@ test_drpc_pool_query_rebuild_busy_success(void **state) } static void -test_drpc_pool_query_rebuild_idle_misc_err(void **state) +test_drpc_pool_query_rebuild_idle_err(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1514,14 +1514,14 @@ test_drpc_pool_query_rebuild_idle_misc_err(void **state) ds_mgmt_drpc_pool_query(&call, &resp); - expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__FAILED, &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_misc_err(void **state) +test_drpc_pool_query_rebuild_done_err(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1545,14 +1545,14 @@ test_drpc_pool_query_rebuild_done_misc_err(void **state) ds_mgmt_drpc_pool_query(&call, &resp); - expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__FAILED, &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_rebuild_busy_misc_err(void **state) +test_drpc_pool_query_rebuild_busy_err(void **state) { Drpc__Call call = DRPC__CALL__INIT; Drpc__Response resp = DRPC__RESPONSE__INIT; @@ -1576,102 +1576,7 @@ test_drpc_pool_query_rebuild_busy_misc_err(void **state) ds_mgmt_drpc_pool_query(&call, &resp); - expect_query_resp_with_info(&exp_info, MGMT__POOL_REBUILD_STATUS__STATE__FAILING, &resp); - - D_FREE(call.body.data); - D_FREE(resp.body.data); -} - -static void -test_drpc_pool_query_rebuild_idle_cancelled(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_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; - /* rebuild errno should have been reset if DER_OP_CANCELED returned */ - ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_errno = -DER_OP_CANCELED; - - 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__STOPPED, &resp); - - D_FREE(call.body.data); - D_FREE(resp.body.data); -} - -static void -test_drpc_pool_query_rebuild_done_cancelled(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_OP_CANCELED; - 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__FAILED, &resp); - - D_FREE(call.body.data); - D_FREE(resp.body.data); -} - -static void -test_drpc_pool_query_rebuild_busy_cancelled(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_state = DRS_IN_PROGRESS; - - 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; - /* rebuild errno should have been reset if DER_OP_CANCELED returned */ - ds_mgmt_pool_query_info_out.pi_rebuild_st.rs_errno = -DER_OP_CANCELED; - - 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__STOPPING, &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); @@ -3565,12 +3470,9 @@ main(void) 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_misc_err), - QUERY_TEST(test_drpc_pool_query_rebuild_done_misc_err), - QUERY_TEST(test_drpc_pool_query_rebuild_busy_misc_err), - QUERY_TEST(test_drpc_pool_query_rebuild_idle_cancelled), - QUERY_TEST(test_drpc_pool_query_rebuild_done_cancelled), - QUERY_TEST(test_drpc_pool_query_rebuild_busy_cancelled), + 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 af3a27d8f88..728fc112cbe 100644 --- a/src/proto/mgmt/pool.proto +++ b/src/proto/mgmt/pool.proto @@ -215,6 +215,7 @@ message PoolRebuildStatus { State state = 2; uint64 objects = 3; uint64 records = 4; + State derived_state = 5; } enum PoolServiceState { From 336aee5a7dbab057e3e9b65800569c4cd9830f41 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Fri, 16 Jan 2026 17:27:20 +0000 Subject: [PATCH 6/6] add derived_state in dmg_pool_query_test.py Features: control Signed-off-by: Tom Nabarro --- src/tests/ftest/control/dmg_pool_query_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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/*")