From aa2cba42c3891b9bb42c9aed334b70851ba615a5 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Sun, 8 Sep 2024 19:12:06 +0100 Subject: [PATCH] DAOS-14422 control: Update pool query UX for MD-on-SSD phase2 (#14844) Display MD-on-SSD specifics on pool query including VOS index file sizes. Tier-0 space usage reported is that of MD-on-SSD blobs and in phase2 mode these two sizes will be distinct. --- src/common/dav_v2/dav_iface.c | 8 +- src/control/cmd/daos/pretty/pool.go | 39 ++-- src/control/cmd/daos/pretty/pool_test.go | 16 +- src/control/cmd/dmg/pool.go | 46 ++-- src/control/cmd/dmg/pool_test.go | 12 +- src/control/cmd/dmg/pretty/pool.go | 4 +- src/control/cmd/dmg/pretty/pool_test.go | 27 +++ src/control/common/proto/mgmt/pool.pb.go | 216 ++++++++++-------- src/control/lib/control/pool.go | 2 +- src/control/lib/control/pool_test.go | 8 +- src/control/lib/daos/pool.go | 8 +- src/control/server/mgmt_pool.go | 23 +- src/mgmt/pool.pb-c.c | 38 ++- src/mgmt/pool.pb-c.h | 12 +- src/mgmt/srv_drpc.c | 14 +- src/proto/mgmt/pool.proto | 3 +- .../ftest/control/dmg_pool_query_test.py | 3 +- .../ftest/control/dmg_pool_query_test.yaml | 2 +- src/tests/ftest/pool/list_verbose.py | 4 +- 19 files changed, 287 insertions(+), 198 deletions(-) diff --git a/src/common/dav_v2/dav_iface.c b/src/common/dav_v2/dav_iface.c index 211d820ad17..65f1665a1ea 100644 --- a/src/common/dav_v2/dav_iface.c +++ b/src/common/dav_v2/dav_iface.c @@ -277,8 +277,7 @@ dav_obj_create_v2(const char *path, int flags, size_t sz, mode_t mode, struct um /* Open the file and obtain the size */ fd = open(path, O_RDWR|O_CLOEXEC); if (fd == -1) { - D_ERROR("obj_create_v2 open %s to fetch size: %s (%d)\n", path, - strerror(errno), errno); + DS_ERROR(errno, "obj_create_v2 open %s to fetch size", path); return NULL; } @@ -288,8 +287,7 @@ dav_obj_create_v2(const char *path, int flags, size_t sz, mode_t mode, struct um } else { fd = open(path, O_CREAT|O_EXCL|O_RDWR|O_CLOEXEC, mode); if (fd == -1) { - D_ERROR("obj_create_v2 open %s to alloc: %s (%d)\n", path, strerror(errno), - errno); + DS_ERROR(errno, "obj_create_v2 open %s to alloc", path); return NULL; } @@ -326,7 +324,7 @@ dav_obj_open_v2(const char *path, int flags, struct umem_store *store) fd = open(path, O_RDWR|O_CLOEXEC); if (fd == -1) { - D_ERROR("obj_create_v2 open %s: %s (%d)\n", path, strerror(errno), errno); + DS_ERROR(errno, "obj_create_v2 open %s", path); return NULL; } diff --git a/src/control/cmd/daos/pretty/pool.go b/src/control/cmd/daos/pretty/pool.go index 263692f2123..3f89971cb64 100644 --- a/src/control/cmd/daos/pretty/pool.go +++ b/src/control/cmd/daos/pretty/pool.go @@ -20,27 +20,24 @@ import ( const msgNoPools = "No pools in system" -func printPoolTiers(suss []*daos.StorageUsageStats, w *txtfmt.ErrWriter, fullStats bool) { - mdOnSSD := false +func printPoolTiers(memFileBytes uint64, suss []*daos.StorageUsageStats, w *txtfmt.ErrWriter, fullStats bool) { + mdOnSSD := memFileBytes != 0 for tierIdx, tierStats := range suss { - if tierIdx >= int(daos.StorageMediaTypeMax) { - tierStats.MediaType = daos.StorageMediaTypeMax // Print unknown type tier. - } - - switch { - case tierIdx == 0 && tierStats.MediaType == daos.StorageMediaTypeNvme: - // MD-on-SSD mode. - // TODO: Print VOS index aggregate file size across pool as distinct from - // Meta-blob aggregate size. - if fullStats { - fmt.Fprintf(w, "- Total memory-file size: %s\n", - humanize.Bytes(tierStats.Total)) + if mdOnSSD { + if tierIdx == 0 { + if fullStats { + fmt.Fprintf(w, "- Total memory-file size: %s\n", + humanize.Bytes(memFileBytes)) + } + fmt.Fprintf(w, "- Metadata storage:\n") + } else { + fmt.Fprintf(w, "- Data storage:\n") + } + } else { + if tierIdx >= int(daos.StorageMediaTypeMax) { + // Print unknown type tiers. + tierStats.MediaType = daos.StorageMediaTypeMax } - fmt.Fprintf(w, "- Metadata storage:\n") - mdOnSSD = true - case mdOnSSD: - fmt.Fprintf(w, "- Data storage:\n") - default: fmt.Fprintf(w, "- Storage tier %d (%s):\n", tierIdx, strings.ToUpper(tierStats.MediaType.String())) } @@ -93,7 +90,7 @@ func PrintPoolInfo(pi *daos.PoolInfo, out io.Writer) error { if pi.QueryMask.HasOption(daos.PoolQueryOptionSpace) && pi.TierStats != nil { fmt.Fprintln(w, "Pool space info:") fmt.Fprintf(w, "- Target count:%d\n", pi.ActiveTargets) - printPoolTiers(pi.TierStats, w, true) + printPoolTiers(pi.MemFileBytes, pi.TierStats, w, true) } return w.Err } @@ -109,7 +106,7 @@ func PrintPoolQueryTargetInfo(pqti *daos.PoolQueryTargetInfo, out io.Writer) err // Maintain output compatibility with the `daos pool query-targets` output. fmt.Fprintf(w, "Target: type %s, state %s\n", pqti.Type, pqti.State) if pqti.Space != nil { - printPoolTiers(pqti.Space, w, false) + printPoolTiers(pqti.MemFileBytes, pqti.Space, w, false) } return w.Err diff --git a/src/control/cmd/daos/pretty/pool_test.go b/src/control/cmd/daos/pretty/pool_test.go index 2112a17243b..938b73d0c86 100644 --- a/src/control/cmd/daos/pretty/pool_test.go +++ b/src/control/cmd/daos/pretty/pool_test.go @@ -289,14 +289,15 @@ Pool space info: { Total: 2, Free: 1, - MediaType: daos.StorageMediaTypeNvme, + MediaType: daos.StorageMediaTypeScm, }, { - Total: 2, - Free: 1, + Total: 4, + Free: 2, MediaType: daos.StorageMediaTypeNvme, }, }, + MemFileBytes: 1, }, expPrintStr: fmt.Sprintf(` Pool %s, ntarget=2, disabled=1, leader=42, version=100, state=Degraded @@ -305,13 +306,13 @@ Pool health info: - Rebuild busy, 42 objs, 21 recs Pool space info: - Target count:1 -- Total memory-file size: 2 B +- Total memory-file size: 1 B - Metadata storage: Total size: 2 B Free: 1 B, min:0 B, max:0 B, mean:0 B - Data storage: - Total size: 2 B - Free: 1 B, min:0 B, max:0 B, mean:0 B + Total size: 4 B + Free: 2 B, min:0 B, max:0 B, mean:0 B `, poolUUID.String()), }, } { @@ -507,7 +508,7 @@ Target: type unknown, state drain { Total: 6000000000, Free: 5000000000, - MediaType: daos.StorageMediaTypeNvme, + MediaType: daos.StorageMediaTypeScm, }, { Total: 100000000000, @@ -515,6 +516,7 @@ Target: type unknown, state drain MediaType: daos.StorageMediaTypeNvme, }, }, + MemFileBytes: 3000000000, }, expPrintStr: ` Target: type unknown, state down_out diff --git a/src/control/cmd/dmg/pool.go b/src/control/cmd/dmg/pool.go index f1f148d246a..44bec6ce2d6 100644 --- a/src/control/cmd/dmg/pool.go +++ b/src/control/cmd/dmg/pool.go @@ -51,7 +51,9 @@ type PoolCmd struct { var ( // Default to 6% SCM:94% NVMe - defaultTierRatios = []float64{0.06, 0.94} + defaultTierRatios = []float64{0.06, 0.94} + errPoolCreateIncompatOpts = errors.New("unsupported option combination, use (--scm-size and " + + "--nvme-size) or (--meta-size and --data-size) or (--size)") ) type tierRatioFlag struct { @@ -203,7 +205,7 @@ type PoolCreateCmd struct { NVMeSize sizeFlag `short:"n" long:"nvme-size" description:"Per-engine NVMe allocation for DAOS pool (manual)"` MetaSize sizeFlag `long:"meta-size" description:"Per-engine Metadata-on-SSD allocation for DAOS pool (manual). Only valid in MD-on-SSD mode"` DataSize sizeFlag `long:"data-size" description:"Per-engine Data-on-SSD allocation for DAOS pool (manual). Only valid in MD-on-SSD mode"` - MemRatio tierRatioFlag `long:"mem-ratio" description:"Percentage of the pool metadata storage size that should be used as the memory file (cache) size. An example value of 25.5 would result in a memory file size of 0.255 times the value set in --meta-size. Only valid in MD-on-SSD mode"` + MemRatio tierRatioFlag `long:"mem-ratio" description:"Percentage of the pool metadata storage size (on SSD) that should be used as the memory file size (on ram-disk). Default value is 100% and only valid in MD-on-SSD mode"` RankList ui.RankSetFlag `short:"r" long:"ranks" description:"Storage engine unique identifiers (ranks) for DAOS pool"` Args struct { @@ -247,14 +249,10 @@ func (cmd *PoolCreateCmd) setMemRatio(req *control.PoolCreateReq, defVal float32 } func (cmd *PoolCreateCmd) storageAutoPercentage(ctx context.Context, req *control.PoolCreateReq) error { - switch { - case cmd.ScmSize.IsSet() || cmd.NVMeSize.IsSet(): - return errIncompatFlags("size", "scm-size", "nvme-size") - case cmd.MetaSize.IsSet() || cmd.DataSize.IsSet(): - return errIncompatFlags("size", "meta-size", "data-size") - case cmd.NumRanks > 0: + if cmd.NumRanks > 0 { return errIncompatFlags("size", "nranks") - case cmd.TierRatio.IsSet(): + } + if cmd.TierRatio.IsSet() { return errIncompatFlags("size=%", "tier-ratio") } cmd.Infof("Creating DAOS pool with %s of all storage", cmd.Size) @@ -271,12 +269,7 @@ func (cmd *PoolCreateCmd) storageAutoPercentage(ctx context.Context, req *contro } func (cmd *PoolCreateCmd) storageAutoTotal(req *control.PoolCreateReq) error { - switch { - case cmd.ScmSize.IsSet() || cmd.NVMeSize.IsSet(): - return errIncompatFlags("size", "scm-size", "nvme-size") - case cmd.MetaSize.IsSet() || cmd.DataSize.IsSet(): - return errIncompatFlags("size", "meta-size", "data-size") - case cmd.NumRanks > 0 && !cmd.RankList.Empty(): + if cmd.NumRanks > 0 && !cmd.RankList.Empty() { return errIncompatFlags("nranks", "ranks") } @@ -301,13 +294,6 @@ func (cmd *PoolCreateCmd) storageAutoTotal(req *control.PoolCreateReq) error { } func (cmd *PoolCreateCmd) storageManualMdOnSsd(req *control.PoolCreateReq) error { - if cmd.ScmSize.IsSet() { - return errIncompatFlags("mem-size", "scm-size") - } - if cmd.NVMeSize.IsSet() { - return errIncompatFlags("data-size", "nvme-size") - } - metaBytes := cmd.MetaSize.bytes dataBytes := cmd.DataSize.bytes req.TierBytes = []uint64{metaBytes, dataBytes} @@ -341,8 +327,6 @@ func (cmd *PoolCreateCmd) storageManual(req *control.PoolCreateReq) error { return errIncompatFlags("mem-ratio", "scm-size", "nvme-size") case cmd.NVMeSize.IsSet() && !cmd.ScmSize.IsSet(): return errors.New("--nvme-size cannot be set without --scm-size") - case !cmd.ScmSize.IsSet(): - return errors.New("at least one size parameter must be set") } scmBytes := cmd.ScmSize.bytes @@ -388,6 +372,20 @@ func (cmd *PoolCreateCmd) Execute(args []string) error { } } + // Refuse unsupported input value combinations. + + pmemParams := cmd.ScmSize.IsSet() || cmd.NVMeSize.IsSet() + mdParams := cmd.MetaSize.IsSet() || cmd.DataSize.IsSet() + + switch { + case (pmemParams || mdParams) && cmd.Size.IsSet(): + return errPoolCreateIncompatOpts + case pmemParams && mdParams: + return errPoolCreateIncompatOpts + case !pmemParams && !mdParams && !cmd.Size.IsSet(): + return errPoolCreateIncompatOpts + } + // Validate supported input values and set request fields. switch { diff --git a/src/control/cmd/dmg/pool_test.go b/src/control/cmd/dmg/pool_test.go index d6ce6f875ed..cc422edeb51 100644 --- a/src/control/cmd/dmg/pool_test.go +++ b/src/control/cmd/dmg/pool_test.go @@ -233,7 +233,7 @@ func TestPoolCommands(t *testing.T) { "Create pool with missing size", "pool create label", "", - errors.New("at least one size parameter must be set"), + errPoolCreateIncompatOpts, }, { "Create pool with missing label", @@ -245,13 +245,13 @@ func TestPoolCommands(t *testing.T) { "Create pool with incompatible arguments (auto nvme-size)", fmt.Sprintf("pool create label --size %s --nvme-size %s", testSizeStr, testSizeStr), "", - errors.New("may not be mixed"), + errPoolCreateIncompatOpts, }, { "Create pool with incompatible arguments (auto scm-size)", fmt.Sprintf("pool create label --size %s --scm-size %s", testSizeStr, testSizeStr), "", - errors.New("may not be mixed"), + errPoolCreateIncompatOpts, }, { "Create pool with incompatible arguments (% size nranks)", @@ -287,19 +287,19 @@ func TestPoolCommands(t *testing.T) { "Create pool with incompatible arguments (auto with meta-size)", fmt.Sprintf("pool create label --size %s --meta-size 32G", testSizeStr), "", - errors.New("may not be mixed"), + errPoolCreateIncompatOpts, }, { "Create pool with incompatible arguments (scm-size with meta-size)", fmt.Sprintf("pool create label --scm-size %s --meta-size 32G", testSizeStr), "", - errors.New("may not be mixed"), + errPoolCreateIncompatOpts, }, { "Create pool with incompatible arguments (scm-size with data-size)", fmt.Sprintf("pool create label --scm-size %s --data-size 32G", testSizeStr), "", - errors.New("may not be mixed"), + errPoolCreateIncompatOpts, }, { "Create pool with too-large tier-ratio (auto)", diff --git a/src/control/cmd/dmg/pretty/pool.go b/src/control/cmd/dmg/pretty/pool.go index 8e71e4518d0..d28cc2f8061 100644 --- a/src/control/cmd/dmg/pretty/pool.go +++ b/src/control/cmd/dmg/pretty/pool.go @@ -57,7 +57,7 @@ func printTierBytesRow(fmtName string, tierBytes uint64, numRanks int) txtfmt.Ta } } -func getPoolRespStorageRows(mdOnSSD bool, tierBytes []uint64, tierRatios []float64, numRanks int) (title string, rows []txtfmt.TableRow) { +func getPoolCreateRespRows(mdOnSSD bool, tierBytes []uint64, tierRatios []float64, numRanks int) (title string, rows []txtfmt.TableRow) { title = "Pool created with " tierName := "SCM" if mdOnSSD { @@ -124,7 +124,7 @@ func PrintPoolCreateResponse(pcr *control.PoolCreateResp, out io.Writer, opts .. mdOnSsdEnabled := pcr.MemFileBytes > 0 - title, tierRows := getPoolRespStorageRows(mdOnSsdEnabled, pcr.TierBytes, tierRatios, + title, tierRows := getPoolCreateRespRows(mdOnSsdEnabled, pcr.TierBytes, tierRatios, numRanks) // Print memory-file to meta-blob ratio for MD-on-SSD. diff --git a/src/control/cmd/dmg/pretty/pool_test.go b/src/control/cmd/dmg/pretty/pool_test.go index 313114e35fc..bbc880f5b82 100644 --- a/src/control/cmd/dmg/pretty/pool_test.go +++ b/src/control/cmd/dmg/pretty/pool_test.go @@ -582,6 +582,33 @@ one 6.0 TB Ready 83%% 16%% 0/16 verbose: true, expPrintStr: msgNoPools + "\n", }, + "verbose, two pools": { + resp: &control.ListPoolsResp{ + Pools: []*daos.PoolInfo{ + { + UUID: test.MockPoolUUID(1), + TierStats: exampleTierStats, + TotalTargets: 16, + ActiveTargets: 16, + DisabledTargets: 0, + State: daos.PoolServiceStateReady, + PoolLayoutVer: 1, + UpgradeLayoutVer: 2, + Rebuild: &daos.PoolRebuildStatus{ + State: daos.PoolRebuildStateIdle, + }, + QueryMask: daos.DefaultPoolQueryMask, + }, + }, + }, + verbose: true, + expPrintStr: ` +Label UUID State SvcReps SCM Size SCM Used SCM Imbalance NVME Size NVME Used NVME Imbalance Disabled UpgradeNeeded? Rebuild State +----- ---- ----- ------- -------- -------- ------------- --------- --------- -------------- -------- -------------- ------------- +- 00000001-0001-0001-0001-000000000001 Ready N/A 100 GB 80 GB 16% 6.0 TB 5.0 TB 8% 0/16 1->2 idle + +`, + }, } { t.Run(name, func(t *testing.T) { var bld strings.Builder diff --git a/src/control/common/proto/mgmt/pool.pb.go b/src/control/common/proto/mgmt/pool.pb.go index 43a84bb8541..4c1103520d1 100644 --- a/src/control/common/proto/mgmt/pool.pb.go +++ b/src/control/common/proto/mgmt/pool.pb.go @@ -1850,6 +1850,7 @@ type PoolQueryResp struct { SvcLdr uint32 `protobuf:"varint,18,opt,name=svc_ldr,json=svcLdr,proto3" json:"svc_ldr,omitempty"` // current raft leader (2.6+) SvcReps []uint32 `protobuf:"varint,19,rep,packed,name=svc_reps,json=svcReps,proto3" json:"svc_reps,omitempty"` // service replica ranks QueryMask uint64 `protobuf:"varint,20,opt,name=query_mask,json=queryMask,proto3" json:"query_mask,omitempty"` // Bitmask of pool query options used + MemFileBytes uint64 `protobuf:"varint,21,opt,name=mem_file_bytes,json=memFileBytes,proto3" json:"mem_file_bytes,omitempty"` // per-pool accumulated value of memory file sizes } func (x *PoolQueryResp) Reset() { @@ -2017,6 +2018,13 @@ func (x *PoolQueryResp) GetQueryMask() uint64 { return 0 } +func (x *PoolQueryResp) GetMemFileBytes() uint64 { + if x != nil { + return x.MemFileBytes + } + return 0 +} + type PoolProperty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2621,7 +2629,8 @@ type PoolQueryTargetInfo struct { Type PoolQueryTargetInfo_TargetType `protobuf:"varint,1,opt,name=type,proto3,enum=mgmt.PoolQueryTargetInfo_TargetType" json:"type,omitempty"` // Target type jsee enum daos_target_type_t State PoolQueryTargetInfo_TargetState `protobuf:"varint,2,opt,name=state,proto3,enum=mgmt.PoolQueryTargetInfo_TargetState" json:"state,omitempty"` // target state see enum daos_target_state_t // TODO: target performance data - Space []*StorageTargetUsage `protobuf:"bytes,3,rep,name=space,proto3" json:"space,omitempty"` // this target's usage per storage tier + Space []*StorageTargetUsage `protobuf:"bytes,3,rep,name=space,proto3" json:"space,omitempty"` // this target's usage per storage tier + MemFileBytes uint64 `protobuf:"varint,4,opt,name=mem_file_bytes,json=memFileBytes,proto3" json:"mem_file_bytes,omitempty"` // per-target value of memory file size } func (x *PoolQueryTargetInfo) Reset() { @@ -2677,6 +2686,13 @@ func (x *PoolQueryTargetInfo) GetSpace() []*StorageTargetUsage { return nil } +func (x *PoolQueryTargetInfo) GetMemFileBytes() uint64 { + if x != nil { + return x.MemFileBytes + } + return 0 +} + // PoolQueryTargetResp represents a pool target query response type PoolQueryTargetResp struct { state protoimpl.MessageState @@ -3043,7 +3059,7 @@ var file_mgmt_pool_proto_rawDesc = []byte{ 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x25, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, 0x53, 0x59, 0x10, 0x02, 0x22, - 0xc0, 0x05, 0x0a, 0x0d, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0xe6, 0x05, 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, @@ -3085,104 +3101,108 @@ var file_mgmt_pool_proto_rawDesc = []byte{ 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, 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, 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, 0x29, - 0x0a, 0x0f, 0x50, 0x6f, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 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, 0x81, 0x01, 0x0a, 0x12, 0x50, 0x6f, - 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, + 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, 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, 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, 0xda, 0x02, 0x0a, 0x13, 0x50, 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 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, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 0x22, 0x3b, 0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x48, 0x44, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x44, 0x10, 0x02, - 0x12, 0x06, 0x0a, 0x02, 0x50, 0x4d, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x4d, 0x10, 0x04, - 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, 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, 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, 0x56, 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, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x67, 0x72, 0x61, 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, + 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, 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, 0x29, 0x0a, 0x0f, 0x50, 0x6f, 0x6f, 0x6c, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 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, + 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, 0x80, 0x03, 0x0a, 0x13, 0x50, + 0x6f, 0x6f, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x24, 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, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 0x22, + 0x3b, 0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x44, + 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x44, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, + 0x50, 0x4d, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x4d, 0x10, 0x04, 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, 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, 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, 0x56, 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, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x67, 0x72, 0x61, 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/control/lib/control/pool.go b/src/control/lib/control/pool.go index f9f54336399..8be314c5d95 100644 --- a/src/control/lib/control/pool.go +++ b/src/control/lib/control/pool.go @@ -225,7 +225,7 @@ type ( SvcReps []uint32 `json:"svc_reps"` TgtRanks []uint32 `json:"tgt_ranks"` TierBytes []uint64 `json:"tier_bytes"` // Per-rank storage tier sizes. - MemFileBytes uint64 `json:"mem_file_bytes"` // MD-on-SSD mode only. + MemFileBytes uint64 `json:"mem_file_bytes"` // Per-rank. MD-on-SSD mode only. } ) diff --git a/src/control/lib/control/pool_test.go b/src/control/lib/control/pool_test.go index 09dc80b4995..abacd6a7f1e 100644 --- a/src/control/lib/control/pool_test.go +++ b/src/control/lib/control/pool_test.go @@ -807,7 +807,7 @@ func TestControl_PoolQueryResp_MarshalJSON(t *testing.T) { UpgradeLayoutVer: 8, }, }, - exp: `{"query_mask":"rebuild,space","state":"Ready","uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":[0,1,2],"rebuild":null,"tier_stats":null,"pool_layout_ver":7,"upgrade_layout_ver":8,"status":42}`, + exp: `{"query_mask":"rebuild,space","state":"Ready","uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":[0,1,2],"rebuild":null,"tier_stats":null,"pool_layout_ver":7,"upgrade_layout_ver":8,"mem_file_bytes":0,"status":42}`, }, "valid rankset": { pqr: &PoolQueryResp{ @@ -827,9 +827,10 @@ func TestControl_PoolQueryResp_MarshalJSON(t *testing.T) { DisabledRanks: &ranklist.RankSet{}, PoolLayoutVer: 7, UpgradeLayoutVer: 8, + MemFileBytes: 1000, }, }, - exp: `{"query_mask":"rebuild,space","state":"Ready","uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":[0,1,2],"rebuild":null,"tier_stats":null,"enabled_ranks":[0,1,2,3,5],"disabled_ranks":[],"pool_layout_ver":7,"upgrade_layout_ver":8,"status":42}`, + exp: `{"query_mask":"rebuild,space","state":"Ready","uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":[0,1,2],"rebuild":null,"tier_stats":null,"enabled_ranks":[0,1,2,3,5],"disabled_ranks":[],"pool_layout_ver":7,"upgrade_layout_ver":8,"mem_file_bytes":1000,"status":42}`, }, } { t.Run(name, func(t *testing.T) { @@ -871,7 +872,7 @@ func TestControl_PoolQueryResp_UnmarshalJSON(t *testing.T) { }, }, "valid rankset": { - data: `{"enabled_ranks":"[0,1-3,5]","disabled_ranks":"[]","status":0,"uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":null,"rebuild":null,"tier_stats":null,"pool_layout_ver":7,"upgrade_layout_ver":8}`, + data: `{"enabled_ranks":"[0,1-3,5]","disabled_ranks":"[]","status":0,"uuid":"` + poolUUID.String() + `","total_targets":1,"active_targets":2,"total_engines":3,"disabled_targets":4,"version":5,"svc_ldr":6,"svc_reps":null,"rebuild":null,"tier_stats":null,"pool_layout_ver":7,"upgrade_layout_ver":8,"mem_file_bytes":1000}`, expResp: PoolQueryResp{ Status: 0, PoolInfo: daos.PoolInfo{ @@ -886,6 +887,7 @@ func TestControl_PoolQueryResp_UnmarshalJSON(t *testing.T) { DisabledRanks: &ranklist.RankSet{}, PoolLayoutVer: 7, UpgradeLayoutVer: 8, + MemFileBytes: 1000, }, }, }, diff --git a/src/control/lib/daos/pool.go b/src/control/lib/daos/pool.go index 5697705bb4a..ef5cee3a930 100644 --- a/src/control/lib/daos/pool.go +++ b/src/control/lib/daos/pool.go @@ -79,6 +79,7 @@ type ( DisabledRanks *ranklist.RankSet `json:"disabled_ranks,omitempty"` PoolLayoutVer uint32 `json:"pool_layout_ver"` UpgradeLayoutVer uint32 `json:"upgrade_layout_ver"` + MemFileBytes uint64 `json:"mem_file_bytes"` } PoolQueryTargetType int32 @@ -86,9 +87,10 @@ type ( // PoolQueryTargetInfo contains information about a single target PoolQueryTargetInfo struct { - Type PoolQueryTargetType `json:"target_type"` - State PoolQueryTargetState `json:"target_state"` - Space []*StorageUsageStats `json:"space"` + Type PoolQueryTargetType `json:"target_type"` + State PoolQueryTargetState `json:"target_state"` + Space []*StorageUsageStats `json:"space"` + MemFileBytes uint64 `json:"mem_file_bytes"` } // StorageTargetUsage represents DAOS target storage usage diff --git a/src/control/server/mgmt_pool.go b/src/control/server/mgmt_pool.go index c94572e80bf..dbec23fd3bf 100644 --- a/src/control/server/mgmt_pool.go +++ b/src/control/server/mgmt_pool.go @@ -182,6 +182,8 @@ func (svc *mgmtSvc) calculateCreateStorage(req *mgmtpb.PoolCreateReq) error { case mdOnSSD && req.MemRatio == 0: // Set reasonable default if not set in MD-on-SSD mode. req.MemRatio = storage.DefaultMemoryFileRatio + svc.log.Infof("Default memory-file:md-on-ssd ratio of %d%% applied", + int(storage.DefaultMemoryFileRatio)*100) } // NB: The following logic is based on the assumption that a request will always include SCM @@ -957,14 +959,11 @@ func (svc *mgmtSvc) PoolQuery(ctx context.Context, req *mgmtpb.PoolQueryReq) (*m // Preserve compatibility with pre-2.6 callers. resp.Leader = resp.SvcLdr - // Update media type of storage tier #0 if MD-on-SSD is enabled. - // TODO DAOS-14223: Do we need this if we are returning memory_file_bytes? + // TODO DAOS-16209: After VOS query API is updated, zero-value mem_file_bytes will be + // returned in non-MD-on-SSD mode and this hack can be removed. storage := svc.harness.Instances()[0].GetStorage() - if storage.ControlMetadataPathConfigured() { - if len(resp.TierStats) > 0 { - svc.log.Debugf("md-on-ssd pool query, set tier-0 to NVMe") - resp.TierStats[0].MediaType = mgmtpb.StorageMediaType_NVME - } + if !storage.ControlMetadataPathConfigured() { + resp.MemFileBytes = 0 } return resp, nil @@ -986,14 +985,12 @@ func (svc *mgmtSvc) PoolQueryTarget(ctx context.Context, req *mgmtpb.PoolQueryTa return nil, errors.Wrap(err, "unmarshal PoolQueryTarget response") } - // Update media type of storage tier #0 if MD-on-SSD is enabled. + // TODO DAOS-16209: After VOS query API is updated, zero-value mem_file_bytes will be + // returned in non-MD-on-SSD mode and this hack can be removed. storage := svc.harness.Instances()[0].GetStorage() - if storage.ControlMetadataPathConfigured() { - svc.log.Debugf("md-on-ssd pool query-target, set tier-0 to NVMe") + if !storage.ControlMetadataPathConfigured() { for _, tgtInfo := range resp.Infos { - if len(tgtInfo.Space) > 0 { - tgtInfo.Space[0].MediaType = mgmtpb.StorageMediaType_NVME - } + tgtInfo.MemFileBytes = 0 } } diff --git a/src/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index 06cdca9daaf..dfcbdc24c99 100644 --- a/src/mgmt/pool.pb-c.c +++ b/src/mgmt/pool.pb-c.c @@ -3305,7 +3305,7 @@ const ProtobufCMessageDescriptor mgmt__pool_rebuild_status__descriptor = (ProtobufCMessageInit) mgmt__pool_rebuild_status__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor mgmt__pool_query_resp__field_descriptors[19] = +static const ProtobufCFieldDescriptor mgmt__pool_query_resp__field_descriptors[20] = { { "status", @@ -3535,6 +3535,18 @@ static const ProtobufCFieldDescriptor mgmt__pool_query_resp__field_descriptors[1 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "mem_file_bytes", + 21, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT64, + 0, /* quantifier_offset */ + offsetof(Mgmt__PoolQueryResp, mem_file_bytes), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned mgmt__pool_query_resp__field_indices_by_name[] = { 4, /* field[4] = active_targets */ @@ -3543,6 +3555,7 @@ static const unsigned mgmt__pool_query_resp__field_indices_by_name[] = { 10, /* field[10] = enabled_ranks */ 2, /* field[2] = label */ 9, /* field[9] = leader */ + 19, /* field[19] = mem_file_bytes */ 13, /* field[13] = pool_layout_ver */ 18, /* field[18] = query_mask */ 6, /* field[6] = rebuild */ @@ -3561,7 +3574,7 @@ static const ProtobufCIntRange mgmt__pool_query_resp__number_ranges[2 + 1] = { { 1, 0 }, { 10, 8 }, - { 0, 19 } + { 0, 20 } }; const ProtobufCMessageDescriptor mgmt__pool_query_resp__descriptor = { @@ -3571,7 +3584,7 @@ const ProtobufCMessageDescriptor mgmt__pool_query_resp__descriptor = "Mgmt__PoolQueryResp", "mgmt", sizeof(Mgmt__PoolQueryResp), - 19, + 20, mgmt__pool_query_resp__field_descriptors, mgmt__pool_query_resp__field_indices_by_name, 2, mgmt__pool_query_resp__number_ranges, @@ -4213,7 +4226,7 @@ const ProtobufCEnumDescriptor mgmt__pool_query_target_info__target_state__descri mgmt__pool_query_target_info__target_state__value_ranges, NULL,NULL,NULL,NULL /* reserved[1234] */ }; -static const ProtobufCFieldDescriptor mgmt__pool_query_target_info__field_descriptors[3] = +static const ProtobufCFieldDescriptor mgmt__pool_query_target_info__field_descriptors[4] = { { "type", @@ -4251,8 +4264,21 @@ static const ProtobufCFieldDescriptor mgmt__pool_query_target_info__field_descri 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "mem_file_bytes", + 4, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_UINT64, + 0, /* quantifier_offset */ + offsetof(Mgmt__PoolQueryTargetInfo, mem_file_bytes), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned mgmt__pool_query_target_info__field_indices_by_name[] = { + 3, /* field[3] = mem_file_bytes */ 2, /* field[2] = space */ 1, /* field[1] = state */ 0, /* field[0] = type */ @@ -4260,7 +4286,7 @@ static const unsigned mgmt__pool_query_target_info__field_indices_by_name[] = { static const ProtobufCIntRange mgmt__pool_query_target_info__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 3 } + { 0, 4 } }; const ProtobufCMessageDescriptor mgmt__pool_query_target_info__descriptor = { @@ -4270,7 +4296,7 @@ const ProtobufCMessageDescriptor mgmt__pool_query_target_info__descriptor = "Mgmt__PoolQueryTargetInfo", "mgmt", sizeof(Mgmt__PoolQueryTargetInfo), - 3, + 4, mgmt__pool_query_target_info__field_descriptors, mgmt__pool_query_target_info__field_indices_by_name, 1, mgmt__pool_query_target_info__number_ranges, diff --git a/src/mgmt/pool.pb-c.h b/src/mgmt/pool.pb-c.h index 4be390e85f2..5ae75572370 100644 --- a/src/mgmt/pool.pb-c.h +++ b/src/mgmt/pool.pb-c.h @@ -865,10 +865,14 @@ struct _Mgmt__PoolQueryResp * Bitmask of pool query options used */ uint64_t query_mask; + /* + * per-pool accumulated value of memory file sizes + */ + uint64_t mem_file_bytes; }; #define MGMT__POOL_QUERY_RESP__INIT \ { PROTOBUF_C_MESSAGE_INIT (&mgmt__pool_query_resp__descriptor) \ - , 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, NULL, 0,NULL, 0, 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, MGMT__POOL_SERVICE_STATE__Creating, 0, 0,NULL, 0 } + , 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, NULL, 0,NULL, 0, 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, MGMT__POOL_SERVICE_STATE__Creating, 0, 0,NULL, 0, 0 } typedef enum { @@ -1110,10 +1114,14 @@ struct _Mgmt__PoolQueryTargetInfo */ size_t n_space; Mgmt__StorageTargetUsage **space; + /* + * per-target value of memory file size + */ + uint64_t mem_file_bytes; }; #define MGMT__POOL_QUERY_TARGET_INFO__INIT \ { PROTOBUF_C_MESSAGE_INIT (&mgmt__pool_query_target_info__descriptor) \ - , MGMT__POOL_QUERY_TARGET_INFO__TARGET_TYPE__UNKNOWN, MGMT__POOL_QUERY_TARGET_INFO__TARGET_STATE__STATE_UNKNOWN, 0,NULL } + , MGMT__POOL_QUERY_TARGET_INFO__TARGET_TYPE__UNKNOWN, MGMT__POOL_QUERY_TARGET_INFO__TARGET_STATE__STATE_UNKNOWN, 0,NULL, 0 } /* diff --git a/src/mgmt/srv_drpc.c b/src/mgmt/srv_drpc.c index 5643e9eaf6c..9a2f013d32c 100644 --- a/src/mgmt/srv_drpc.c +++ b/src/mgmt/srv_drpc.c @@ -517,9 +517,10 @@ ds_mgmt_drpc_pool_create(Drpc__Call *drpc_req, Drpc__Response *drpc_resp) d_rank_list_free(svc); /** - * FIXME DAOS-16209: Populate per-rank VOS-file sizes. For now just calculate here based on - * the supplied input values but really should be returned from ds_mgmt_pool_query() through - * the VOS query API and set in pool_create_fill_resp(). Return zero for non-MD-on-SSD mode. + * TODO DAOS-16209: Populate per-rank VOS-file sizes. For now just calculate here based on + * the supplied input values but really should be returned from + * ds_mgmt_pool_query() through the VOS query API and set in + * pool_create_fill_resp(). Return zero for non-MD-on-SSD mode. */ resp.mem_file_bytes = req->tier_bytes[DAOS_MEDIA_SCM] * req->mem_ratio; @@ -1845,6 +1846,13 @@ ds_mgmt_drpc_pool_query(Drpc__Call *drpc_req, Drpc__Response *drpc_resp) pool_rebuild_status_from_info(&rebuild, &pool_info.pi_rebuild_st); resp.rebuild = &rebuild; + /** + * TODO DAOS-16209: Populate VOS-file sizes in response. For now just return the meta-blob + * size until VOS query API is updated. When updated, zero-value should + * be returned in non-MD-on-SSD mode. + */ + resp.mem_file_bytes = scm.total; + error: resp.status = rc; diff --git a/src/proto/mgmt/pool.proto b/src/proto/mgmt/pool.proto index 7add15bac50..ad6920bbf6a 100644 --- a/src/proto/mgmt/pool.proto +++ b/src/proto/mgmt/pool.proto @@ -239,7 +239,7 @@ message PoolQueryResp { uint32 svc_ldr = 18; // current raft leader (2.6+) repeated uint32 svc_reps = 19; // service replica ranks uint64 query_mask = 20; // Bitmask of pool query options used - // TODO DAOS-14223: Add mem_file_bytes. + uint64 mem_file_bytes = 21; // per-pool accumulated value of memory file sizes } message PoolProperty { @@ -330,6 +330,7 @@ message PoolQueryTargetInfo { TargetState state = 2; // target state see enum daos_target_state_t // TODO: target performance data repeated StorageTargetUsage space = 3; // this target's usage per storage tier + uint64 mem_file_bytes = 4; // per-target value of memory file size } // PoolQueryTargetResp represents a pool target query response diff --git a/src/tests/ftest/control/dmg_pool_query_test.py b/src/tests/ftest/control/dmg_pool_query_test.py index ec8c56c6260..8bfabc70bd0 100644 --- a/src/tests/ftest/control/dmg_pool_query_test.py +++ b/src/tests/ftest/control/dmg_pool_query_test.py @@ -96,7 +96,8 @@ def test_pool_query_basic(self): "tier_name": "NVME", "size": self.params.get("total", path="/run/exp_vals/nvme/*") } - ] + ], + "mem_file_bytes": 0 } self.assertDictEqual( diff --git a/src/tests/ftest/control/dmg_pool_query_test.yaml b/src/tests/ftest/control/dmg_pool_query_test.yaml index 8c92ae36945..3d12a5c5bfc 100644 --- a/src/tests/ftest/control/dmg_pool_query_test.yaml +++ b/src/tests/ftest/control/dmg_pool_query_test.yaml @@ -35,7 +35,7 @@ exp_vals: replicas: [0] query_mask: "rebuild,space" scm: - total: 16000008192 + total: 16000000000 nvme: total: 32000000000 rebuild: diff --git a/src/tests/ftest/pool/list_verbose.py b/src/tests/ftest/pool/list_verbose.py index 68df5f876a4..c90998169f2 100644 --- a/src/tests/ftest/pool/list_verbose.py +++ b/src/tests/ftest/pool/list_verbose.py @@ -105,7 +105,9 @@ def create_expected(self, pool, scm_free, nvme_free, scm_imbalance, "size": nvme_size, "free": nvme_free, "imbalance": nvme_imbalance - }], + }, + ], + "mem_file_bytes": 0 } @staticmethod