From 920633a677ec3905b71178abf9c71c1414c9894a Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Tue, 30 Jun 2026 01:29:07 +0100 Subject: [PATCH] DAOS-19260 control: Allow format on specific engine index Features: control Signed-off-by: Tom Nabarro --- src/control/cmd/dmg/storage.go | 16 +- src/control/common/proto/ctl/storage.pb.go | 526 +++++++-------------- src/control/lib/control/storage.go | 13 +- src/control/server/ctl_storage_rpc.go | 17 + src/proto/ctl/storage.proto | 5 +- 5 files changed, 207 insertions(+), 370 deletions(-) diff --git a/src/control/cmd/dmg/storage.go b/src/control/cmd/dmg/storage.go index d92ee424623..190a84646dc 100644 --- a/src/control/cmd/dmg/storage.go +++ b/src/control/cmd/dmg/storage.go @@ -98,10 +98,11 @@ type storageFormatCmd struct { ctlInvokerCmd hostListCmd cmdutil.JSONOutputCmd - Verbose bool `short:"v" long:"verbose" description:"Show results of each SCM & NVMe device format operation"` - Force bool `long:"force" description:"Force storage format on a host, stopping any running engines (CAUTION: destructive operation)"` - Replace bool `long:"replace" description:"Replace an excluded rank. Allows a DAOS engine instance to reclaim its old rank number after metadata is lost due to PMem or other storage media failure"` - Rank *uint32 `long:"rank" description:"Specific rank to replace (only valid with --replace)"` + Verbose bool `short:"v" long:"verbose" description:"Show results of each SCM & NVMe device format operation"` + Force bool `long:"force" description:"Force storage format on a host, stopping any running engines (CAUTION: destructive operation)"` + Replace bool `long:"replace" description:"Replace an excluded rank. Allows a DAOS engine instance to reclaim its old rank number after metadata is lost due to PMem or other storage media failure"` + Rank *uint32 `long:"rank" description:"Specific rank to replace (only valid with --replace)"` + EngineIdx *uint32 `long:"engine-idx" description:"Specific engine instance index to format (optional, by default all engines are formatted)"` } // Execute is run when storageFormatCmd activates. @@ -127,7 +128,12 @@ func (cmd *storageFormatCmd) Execute(args []string) (err error) { rank = *cmd.Rank } - req := &control.StorageFormatReq{Reformat: cmd.Force, Replace: cmd.Replace, Rank: rank} + req := &control.StorageFormatReq{ + Reformat: cmd.Force, + Replace: cmd.Replace, + Rank: rank, + EngineIdx: cmd.EngineIdx, + } req.SetHostList(cmd.getHostList()) resp, err := control.StorageFormat(ctx, cmd.ctlInvoker, req) diff --git a/src/control/common/proto/ctl/storage.pb.go b/src/control/common/proto/ctl/storage.pb.go index f320bc36970..ab60ef50264 100644 --- a/src/control/common/proto/ctl/storage.pb.go +++ b/src/control/common/proto/ctl/storage.pb.go @@ -1,13 +1,13 @@ // // (C) Copyright 2019-2022 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 // // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 +// protoc-gen-go v1.36.10 // protoc v3.14.0 // source: ctl/storage.proto @@ -18,6 +18,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -28,21 +29,18 @@ const ( ) type StorageScanReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nvme *ScanNvmeReq `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` + Scm *ScanScmReq `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` unknownFields protoimpl.UnknownFields - - Nvme *ScanNvmeReq `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` - Scm *ScanScmReq `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StorageScanReq) Reset() { *x = StorageScanReq{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageScanReq) String() string { @@ -53,7 +51,7 @@ func (*StorageScanReq) ProtoMessage() {} func (x *StorageScanReq) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83,26 +81,23 @@ func (x *StorageScanReq) GetScm() *ScanScmReq { } type MemInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NumaNodeIndex uint32 `protobuf:"varint,1,opt,name=numa_node_index,json=numaNodeIndex,proto3" json:"numa_node_index,omitempty"` - HugepagesTotal uint64 `protobuf:"varint,2,opt,name=hugepages_total,json=hugepagesTotal,proto3" json:"hugepages_total,omitempty"` - HugepagesFree uint64 `protobuf:"varint,3,opt,name=hugepages_free,json=hugepagesFree,proto3" json:"hugepages_free,omitempty"` - HugepagesSurplus uint64 `protobuf:"varint,4,opt,name=hugepages_surplus,json=hugepagesSurplus,proto3" json:"hugepages_surplus,omitempty"` - MemTotalKb uint64 `protobuf:"varint,5,opt,name=mem_total_kb,json=memTotalKb,proto3" json:"mem_total_kb,omitempty"` - MemFreeKb uint64 `protobuf:"varint,6,opt,name=mem_free_kb,json=memFreeKb,proto3" json:"mem_free_kb,omitempty"` - MemUsedKb uint64 `protobuf:"varint,7,opt,name=mem_used_kb,json=memUsedKb,proto3" json:"mem_used_kb,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + NumaNodeIndex uint32 `protobuf:"varint,1,opt,name=numa_node_index,json=numaNodeIndex,proto3" json:"numa_node_index,omitempty"` + HugepagesTotal uint64 `protobuf:"varint,2,opt,name=hugepages_total,json=hugepagesTotal,proto3" json:"hugepages_total,omitempty"` + HugepagesFree uint64 `protobuf:"varint,3,opt,name=hugepages_free,json=hugepagesFree,proto3" json:"hugepages_free,omitempty"` + HugepagesSurplus uint64 `protobuf:"varint,4,opt,name=hugepages_surplus,json=hugepagesSurplus,proto3" json:"hugepages_surplus,omitempty"` + MemTotalKb uint64 `protobuf:"varint,5,opt,name=mem_total_kb,json=memTotalKb,proto3" json:"mem_total_kb,omitempty"` + MemFreeKb uint64 `protobuf:"varint,6,opt,name=mem_free_kb,json=memFreeKb,proto3" json:"mem_free_kb,omitempty"` + MemUsedKb uint64 `protobuf:"varint,7,opt,name=mem_used_kb,json=memUsedKb,proto3" json:"mem_used_kb,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MemInfo) Reset() { *x = MemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemInfo) String() string { @@ -113,7 +108,7 @@ func (*MemInfo) ProtoMessage() {} func (x *MemInfo) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,28 +173,25 @@ func (x *MemInfo) GetMemUsedKb() uint64 { } type SysMemInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HugepagesTotal uint64 `protobuf:"varint,1,opt,name=hugepages_total,json=hugepagesTotal,proto3" json:"hugepages_total,omitempty"` - HugepagesFree uint64 `protobuf:"varint,2,opt,name=hugepages_free,json=hugepagesFree,proto3" json:"hugepages_free,omitempty"` - HugepagesReserved uint64 `protobuf:"varint,3,opt,name=hugepages_reserved,json=hugepagesReserved,proto3" json:"hugepages_reserved,omitempty"` - HugepagesSurplus uint64 `protobuf:"varint,4,opt,name=hugepages_surplus,json=hugepagesSurplus,proto3" json:"hugepages_surplus,omitempty"` - HugepageSizeKb uint32 `protobuf:"varint,5,opt,name=hugepage_size_kb,json=hugepageSizeKb,proto3" json:"hugepage_size_kb,omitempty"` - MemTotalKb uint64 `protobuf:"varint,6,opt,name=mem_total_kb,json=memTotalKb,proto3" json:"mem_total_kb,omitempty"` - MemFreeKb uint64 `protobuf:"varint,7,opt,name=mem_free_kb,json=memFreeKb,proto3" json:"mem_free_kb,omitempty"` - MemAvailableKb uint64 `protobuf:"varint,8,opt,name=mem_available_kb,json=memAvailableKb,proto3" json:"mem_available_kb,omitempty"` - NumaNodes []*MemInfo `protobuf:"bytes,9,rep,name=numa_nodes,json=numaNodes,proto3" json:"numa_nodes,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + HugepagesTotal uint64 `protobuf:"varint,1,opt,name=hugepages_total,json=hugepagesTotal,proto3" json:"hugepages_total,omitempty"` + HugepagesFree uint64 `protobuf:"varint,2,opt,name=hugepages_free,json=hugepagesFree,proto3" json:"hugepages_free,omitempty"` + HugepagesReserved uint64 `protobuf:"varint,3,opt,name=hugepages_reserved,json=hugepagesReserved,proto3" json:"hugepages_reserved,omitempty"` + HugepagesSurplus uint64 `protobuf:"varint,4,opt,name=hugepages_surplus,json=hugepagesSurplus,proto3" json:"hugepages_surplus,omitempty"` + HugepageSizeKb uint32 `protobuf:"varint,5,opt,name=hugepage_size_kb,json=hugepageSizeKb,proto3" json:"hugepage_size_kb,omitempty"` + MemTotalKb uint64 `protobuf:"varint,6,opt,name=mem_total_kb,json=memTotalKb,proto3" json:"mem_total_kb,omitempty"` + MemFreeKb uint64 `protobuf:"varint,7,opt,name=mem_free_kb,json=memFreeKb,proto3" json:"mem_free_kb,omitempty"` + MemAvailableKb uint64 `protobuf:"varint,8,opt,name=mem_available_kb,json=memAvailableKb,proto3" json:"mem_available_kb,omitempty"` + NumaNodes []*MemInfo `protobuf:"bytes,9,rep,name=numa_nodes,json=numaNodes,proto3" json:"numa_nodes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SysMemInfo) Reset() { *x = SysMemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SysMemInfo) String() string { @@ -210,7 +202,7 @@ func (*SysMemInfo) ProtoMessage() {} func (x *SysMemInfo) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,22 +281,19 @@ func (x *SysMemInfo) GetNumaNodes() []*MemInfo { } type StorageScanResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nvme *ScanNvmeResp `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` + Scm *ScanScmResp `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` + SysMemInfo *SysMemInfo `protobuf:"bytes,3,opt,name=sys_mem_info,json=sysMemInfo,proto3" json:"sys_mem_info,omitempty"` unknownFields protoimpl.UnknownFields - - Nvme *ScanNvmeResp `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` - Scm *ScanScmResp `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` - SysMemInfo *SysMemInfo `protobuf:"bytes,3,opt,name=sys_mem_info,json=sysMemInfo,proto3" json:"sys_mem_info,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StorageScanResp) Reset() { *x = StorageScanResp{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageScanResp) String() string { @@ -315,7 +304,7 @@ func (*StorageScanResp) ProtoMessage() {} func (x *StorageScanResp) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,24 +341,22 @@ func (x *StorageScanResp) GetSysMemInfo() *SysMemInfo { } type StorageFormatReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nvme *FormatNvmeReq `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` + Scm *FormatScmReq `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` + Reformat bool `protobuf:"varint,3,opt,name=reformat,proto3" json:"reformat,omitempty"` + Replace bool `protobuf:"varint,4,opt,name=replace,proto3" json:"replace,omitempty"` + Rank uint32 `protobuf:"varint,5,opt,name=rank,proto3" json:"rank,omitempty"` // Specific rank to replace (only valid with replace=true) + EngineIdx uint32 `protobuf:"varint,6,opt,name=engine_idx,json=engineIdx,proto3" json:"engine_idx,omitempty"` // Specific engine instance index to format (optional) unknownFields protoimpl.UnknownFields - - Nvme *FormatNvmeReq `protobuf:"bytes,1,opt,name=nvme,proto3" json:"nvme,omitempty"` - Scm *FormatScmReq `protobuf:"bytes,2,opt,name=scm,proto3" json:"scm,omitempty"` - Reformat bool `protobuf:"varint,3,opt,name=reformat,proto3" json:"reformat,omitempty"` - Replace bool `protobuf:"varint,4,opt,name=replace,proto3" json:"replace,omitempty"` - Rank uint32 `protobuf:"varint,5,opt,name=rank,proto3" json:"rank,omitempty"` // Specific rank to replace (only valid with replace=true) + sizeCache protoimpl.SizeCache } func (x *StorageFormatReq) Reset() { *x = StorageFormatReq{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormatReq) String() string { @@ -380,7 +367,7 @@ func (*StorageFormatReq) ProtoMessage() {} func (x *StorageFormatReq) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,22 +417,26 @@ func (x *StorageFormatReq) GetRank() uint32 { return 0 } +func (x *StorageFormatReq) GetEngineIdx() uint32 { + if x != nil { + return x.EngineIdx + } + return 0 +} + type StorageFormatResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Crets []*NvmeControllerResult `protobuf:"bytes,1,rep,name=crets,proto3" json:"crets,omitempty"` // One per controller format attempt + Mrets []*ScmMountResult `protobuf:"bytes,2,rep,name=mrets,proto3" json:"mrets,omitempty"` // One per scm format and mount attempt unknownFields protoimpl.UnknownFields - - Crets []*NvmeControllerResult `protobuf:"bytes,1,rep,name=crets,proto3" json:"crets,omitempty"` // One per controller format attempt - Mrets []*ScmMountResult `protobuf:"bytes,2,rep,name=mrets,proto3" json:"mrets,omitempty"` // One per scm format and mount attempt + sizeCache protoimpl.SizeCache } func (x *StorageFormatResp) Reset() { *x = StorageFormatResp{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormatResp) String() string { @@ -456,7 +447,7 @@ func (*StorageFormatResp) ProtoMessage() {} func (x *StorageFormatResp) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,20 +477,17 @@ func (x *StorageFormatResp) GetMrets() []*ScmMountResult { } type NvmeRebindReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + PciAddr string `protobuf:"bytes,1,opt,name=pci_addr,json=pciAddr,proto3" json:"pci_addr,omitempty"` // an NVMe controller PCI address unknownFields protoimpl.UnknownFields - - PciAddr string `protobuf:"bytes,1,opt,name=pci_addr,json=pciAddr,proto3" json:"pci_addr,omitempty"` // an NVMe controller PCI address + sizeCache protoimpl.SizeCache } func (x *NvmeRebindReq) Reset() { *x = NvmeRebindReq{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NvmeRebindReq) String() string { @@ -510,7 +498,7 @@ func (*NvmeRebindReq) ProtoMessage() {} func (x *NvmeRebindReq) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,20 +521,17 @@ func (x *NvmeRebindReq) GetPciAddr() string { } type NvmeRebindResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + State *ResponseState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` unknownFields protoimpl.UnknownFields - - State *ResponseState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + sizeCache protoimpl.SizeCache } func (x *NvmeRebindResp) Reset() { *x = NvmeRebindResp{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NvmeRebindResp) String() string { @@ -557,7 +542,7 @@ func (*NvmeRebindResp) ProtoMessage() {} func (x *NvmeRebindResp) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,22 +565,19 @@ func (x *NvmeRebindResp) GetState() *ResponseState { } type NvmeAddDeviceReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PciAddr string `protobuf:"bytes,1,opt,name=pci_addr,json=pciAddr,proto3" json:"pci_addr,omitempty"` // PCI address of NVMe controller to add - EngineIndex uint32 `protobuf:"varint,2,opt,name=engine_index,json=engineIndex,proto3" json:"engine_index,omitempty"` // Index of DAOS engine to add device to - StorageTierIndex int32 `protobuf:"varint,3,opt,name=storage_tier_index,json=storageTierIndex,proto3" json:"storage_tier_index,omitempty"` // Index of storage tier to add device to + state protoimpl.MessageState `protogen:"open.v1"` + PciAddr string `protobuf:"bytes,1,opt,name=pci_addr,json=pciAddr,proto3" json:"pci_addr,omitempty"` // PCI address of NVMe controller to add + EngineIndex uint32 `protobuf:"varint,2,opt,name=engine_index,json=engineIndex,proto3" json:"engine_index,omitempty"` // Index of DAOS engine to add device to + StorageTierIndex int32 `protobuf:"varint,3,opt,name=storage_tier_index,json=storageTierIndex,proto3" json:"storage_tier_index,omitempty"` // Index of storage tier to add device to + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NvmeAddDeviceReq) Reset() { *x = NvmeAddDeviceReq{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NvmeAddDeviceReq) String() string { @@ -606,7 +588,7 @@ func (*NvmeAddDeviceReq) ProtoMessage() {} func (x *NvmeAddDeviceReq) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,20 +625,17 @@ func (x *NvmeAddDeviceReq) GetStorageTierIndex() int32 { } type NvmeAddDeviceResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + State *ResponseState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` unknownFields protoimpl.UnknownFields - - State *ResponseState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + sizeCache protoimpl.SizeCache } func (x *NvmeAddDeviceResp) Reset() { *x = NvmeAddDeviceResp{} - if protoimpl.UnsafeEnabled { - mi := &file_ctl_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ctl_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NvmeAddDeviceResp) String() string { @@ -667,7 +646,7 @@ func (*NvmeAddDeviceResp) ProtoMessage() {} func (x *NvmeAddDeviceResp) ProtoReflect() protoreflect.Message { mi := &file_ctl_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,125 +670,75 @@ func (x *NvmeAddDeviceResp) GetState() *ResponseState { var File_ctl_storage_proto protoreflect.FileDescriptor -var file_ctl_storage_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x63, 0x74, 0x6c, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x63, 0x74, 0x6c, 0x1a, 0x16, 0x63, 0x74, 0x6c, 0x2f, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x76, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x15, 0x63, 0x74, 0x6c, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x63, - 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x63, 0x74, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x0e, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x04, 0x6e, - 0x76, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x74, 0x6c, 0x2e, - 0x53, 0x63, 0x61, 0x6e, 0x4e, 0x76, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x52, 0x04, 0x6e, 0x76, 0x6d, - 0x65, 0x12, 0x21, 0x0a, 0x03, 0x73, 0x63, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x53, 0x63, 0x61, 0x6e, 0x53, 0x63, 0x6d, 0x52, 0x65, 0x71, 0x52, - 0x03, 0x73, 0x63, 0x6d, 0x22, 0x90, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x61, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0f, 0x68, 0x75, 0x67, 0x65, - 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0e, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x66, - 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x68, 0x75, 0x67, 0x65, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x68, 0x75, 0x67, 0x65, - 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x10, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x75, - 0x72, 0x70, 0x6c, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x5f, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x6b, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x65, 0x6d, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4b, 0x62, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x5f, 0x66, - 0x72, 0x65, 0x65, 0x5f, 0x6b, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, - 0x6d, 0x46, 0x72, 0x65, 0x65, 0x4b, 0x62, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x5f, 0x75, - 0x73, 0x65, 0x64, 0x5f, 0x6b, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, - 0x6d, 0x55, 0x73, 0x65, 0x64, 0x4b, 0x62, 0x22, 0xfb, 0x02, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x4d, - 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0e, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, - 0x25, 0x0a, 0x0e, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x66, 0x72, 0x65, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, - 0x65, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x11, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, - 0x65, 0x73, 0x5f, 0x73, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x10, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x75, 0x72, 0x70, 0x6c, - 0x75, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x5f, 0x6b, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x68, 0x75, - 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x4b, 0x62, 0x12, 0x20, 0x0a, 0x0c, - 0x6d, 0x65, 0x6d, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6b, 0x62, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4b, 0x62, 0x12, 0x1e, - 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x6b, 0x62, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x46, 0x72, 0x65, 0x65, 0x4b, 0x62, 0x12, 0x28, - 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x6b, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x62, 0x12, 0x2b, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x61, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, - 0x74, 0x6c, 0x2e, 0x4d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x61, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x76, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x53, 0x63, - 0x61, 0x6e, 0x4e, 0x76, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x04, 0x6e, 0x76, 0x6d, 0x65, - 0x12, 0x22, 0x0a, 0x03, 0x73, 0x63, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x63, 0x74, 0x6c, 0x2e, 0x53, 0x63, 0x61, 0x6e, 0x53, 0x63, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x52, - 0x03, 0x73, 0x63, 0x6d, 0x12, 0x31, 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x5f, 0x6d, 0x65, 0x6d, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x74, 0x6c, - 0x2e, 0x53, 0x79, 0x73, 0x4d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, - 0x4d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x04, - 0x6e, 0x76, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x74, 0x6c, - 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4e, 0x76, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x52, 0x04, - 0x6e, 0x76, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x03, 0x73, 0x63, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, - 0x6d, 0x52, 0x65, 0x71, 0x52, 0x03, 0x73, 0x63, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, - 0x61, 0x6e, 0x6b, 0x22, 0x6f, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x4e, 0x76, - 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x05, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x6d, 0x72, 0x65, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x53, - 0x63, 0x6d, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x6d, - 0x72, 0x65, 0x74, 0x73, 0x22, 0x2a, 0x0a, 0x0d, 0x4e, 0x76, 0x6d, 0x65, 0x52, 0x65, 0x62, 0x69, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x63, 0x69, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x63, 0x69, 0x41, 0x64, 0x64, 0x72, - 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x76, 0x6d, 0x65, 0x52, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x7e, 0x0a, 0x10, - 0x4e, 0x76, 0x6d, 0x65, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x19, 0x0a, 0x08, 0x70, 0x63, 0x69, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x63, 0x69, 0x41, 0x64, 0x64, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2c, - 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x54, 0x69, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3d, 0x0a, 0x11, - 0x4e, 0x76, 0x6d, 0x65, 0x41, 0x64, 0x64, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x74, 0x6c, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x39, 0x5a, 0x37, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2d, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x64, 0x61, 0x6f, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x74, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_ctl_storage_proto_rawDesc = "" + + "\n" + + "\x11ctl/storage.proto\x12\x03ctl\x1a\x16ctl/storage_nvme.proto\x1a\x15ctl/storage_scm.proto\x1a\x10ctl/common.proto\"Y\n" + + "\x0eStorageScanReq\x12$\n" + + "\x04nvme\x18\x01 \x01(\v2\x10.ctl.ScanNvmeReqR\x04nvme\x12!\n" + + "\x03scm\x18\x02 \x01(\v2\x0f.ctl.ScanScmReqR\x03scm\"\x90\x02\n" + + "\aMemInfo\x12&\n" + + "\x0fnuma_node_index\x18\x01 \x01(\rR\rnumaNodeIndex\x12'\n" + + "\x0fhugepages_total\x18\x02 \x01(\x04R\x0ehugepagesTotal\x12%\n" + + "\x0ehugepages_free\x18\x03 \x01(\x04R\rhugepagesFree\x12+\n" + + "\x11hugepages_surplus\x18\x04 \x01(\x04R\x10hugepagesSurplus\x12 \n" + + "\fmem_total_kb\x18\x05 \x01(\x04R\n" + + "memTotalKb\x12\x1e\n" + + "\vmem_free_kb\x18\x06 \x01(\x04R\tmemFreeKb\x12\x1e\n" + + "\vmem_used_kb\x18\a \x01(\x04R\tmemUsedKb\"\xfb\x02\n" + + "\n" + + "SysMemInfo\x12'\n" + + "\x0fhugepages_total\x18\x01 \x01(\x04R\x0ehugepagesTotal\x12%\n" + + "\x0ehugepages_free\x18\x02 \x01(\x04R\rhugepagesFree\x12-\n" + + "\x12hugepages_reserved\x18\x03 \x01(\x04R\x11hugepagesReserved\x12+\n" + + "\x11hugepages_surplus\x18\x04 \x01(\x04R\x10hugepagesSurplus\x12(\n" + + "\x10hugepage_size_kb\x18\x05 \x01(\rR\x0ehugepageSizeKb\x12 \n" + + "\fmem_total_kb\x18\x06 \x01(\x04R\n" + + "memTotalKb\x12\x1e\n" + + "\vmem_free_kb\x18\a \x01(\x04R\tmemFreeKb\x12(\n" + + "\x10mem_available_kb\x18\b \x01(\x04R\x0ememAvailableKb\x12+\n" + + "\n" + + "numa_nodes\x18\t \x03(\v2\f.ctl.MemInfoR\tnumaNodes\"\x8f\x01\n" + + "\x0fStorageScanResp\x12%\n" + + "\x04nvme\x18\x01 \x01(\v2\x11.ctl.ScanNvmeRespR\x04nvme\x12\"\n" + + "\x03scm\x18\x02 \x01(\v2\x10.ctl.ScanScmRespR\x03scm\x121\n" + + "\fsys_mem_info\x18\x03 \x01(\v2\x0f.ctl.SysMemInfoR\n" + + "sysMemInfo\"\xc8\x01\n" + + "\x10StorageFormatReq\x12&\n" + + "\x04nvme\x18\x01 \x01(\v2\x12.ctl.FormatNvmeReqR\x04nvme\x12#\n" + + "\x03scm\x18\x02 \x01(\v2\x11.ctl.FormatScmReqR\x03scm\x12\x1a\n" + + "\breformat\x18\x03 \x01(\bR\breformat\x12\x18\n" + + "\areplace\x18\x04 \x01(\bR\areplace\x12\x12\n" + + "\x04rank\x18\x05 \x01(\rR\x04rank\x12\x1d\n" + + "\n" + + "engine_idx\x18\x06 \x01(\rR\tengineIdx\"o\n" + + "\x11StorageFormatResp\x12/\n" + + "\x05crets\x18\x01 \x03(\v2\x19.ctl.NvmeControllerResultR\x05crets\x12)\n" + + "\x05mrets\x18\x02 \x03(\v2\x13.ctl.ScmMountResultR\x05mrets\"*\n" + + "\rNvmeRebindReq\x12\x19\n" + + "\bpci_addr\x18\x01 \x01(\tR\apciAddr\":\n" + + "\x0eNvmeRebindResp\x12(\n" + + "\x05state\x18\x01 \x01(\v2\x12.ctl.ResponseStateR\x05state\"~\n" + + "\x10NvmeAddDeviceReq\x12\x19\n" + + "\bpci_addr\x18\x01 \x01(\tR\apciAddr\x12!\n" + + "\fengine_index\x18\x02 \x01(\rR\vengineIndex\x12,\n" + + "\x12storage_tier_index\x18\x03 \x01(\x05R\x10storageTierIndex\"=\n" + + "\x11NvmeAddDeviceResp\x12(\n" + + "\x05state\x18\x01 \x01(\v2\x12.ctl.ResponseStateR\x05stateB9Z7github.com/daos-stack/daos/src/control/common/proto/ctlb\x06proto3" var ( file_ctl_storage_proto_rawDescOnce sync.Once - file_ctl_storage_proto_rawDescData = file_ctl_storage_proto_rawDesc + file_ctl_storage_proto_rawDescData []byte ) func file_ctl_storage_proto_rawDescGZIP() []byte { file_ctl_storage_proto_rawDescOnce.Do(func() { - file_ctl_storage_proto_rawDescData = protoimpl.X.CompressGZIP(file_ctl_storage_proto_rawDescData) + file_ctl_storage_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ctl_storage_proto_rawDesc), len(file_ctl_storage_proto_rawDesc))) }) return file_ctl_storage_proto_rawDescData } var file_ctl_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_ctl_storage_proto_goTypes = []interface{}{ +var file_ctl_storage_proto_goTypes = []any{ (*StorageScanReq)(nil), // 0: ctl.StorageScanReq (*MemInfo)(nil), // 1: ctl.MemInfo (*SysMemInfo)(nil), // 2: ctl.SysMemInfo @@ -858,133 +787,11 @@ func file_ctl_storage_proto_init() { file_ctl_storage_nvme_proto_init() file_ctl_storage_scm_proto_init() file_ctl_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_ctl_storage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageScanReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SysMemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageScanResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageFormatReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageFormatResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NvmeRebindReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NvmeRebindResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NvmeAddDeviceReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ctl_storage_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NvmeAddDeviceResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ctl_storage_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_ctl_storage_proto_rawDesc), len(file_ctl_storage_proto_rawDesc)), NumEnums: 0, NumMessages: 10, NumExtensions: 0, @@ -995,7 +802,6 @@ func file_ctl_storage_proto_init() { MessageInfos: file_ctl_storage_proto_msgTypes, }.Build() File_ctl_storage_proto = out.File - file_ctl_storage_proto_rawDesc = nil file_ctl_storage_proto_goTypes = nil file_ctl_storage_proto_depIdxs = nil } diff --git a/src/control/lib/control/storage.go b/src/control/lib/control/storage.go index 18300053c4f..1b0eb8dca25 100644 --- a/src/control/lib/control/storage.go +++ b/src/control/lib/control/storage.go @@ -310,9 +310,10 @@ type ( // StorageFormatReq contains the parameters for a storage format request. StorageFormatReq struct { unaryRequest - Reformat bool `json:"reformat"` - Replace bool `json:"replace"` - Rank uint32 `json:"rank"` // Specific rank to replace (only valid with replace=true) + Reformat bool `json:"reformat"` + Replace bool `json:"replace"` + Rank uint32 `json:"rank"` // Specific rank to replace (only valid with replace=true) + EngineIdx *uint32 `json:"engine_idx"` // Specific engine instance index to format (optional) } // StorageFormatResp contains the response from a storage format request. @@ -455,6 +456,12 @@ func StorageFormat(ctx context.Context, rpcClient UnaryInvoker, req *StorageForm if err := convert.Types(req, pbReq); err != nil { return nil, err } + // Handle EngineIdx conversion: nil pointer -> MaxUint32 (sentinel for "all engines") + if req.EngineIdx != nil { + pbReq.EngineIdx = *req.EngineIdx + } else { + pbReq.EngineIdx = ^uint32(0) // MaxUint32 + } req.setRPC(func(ctx context.Context, conn *grpc.ClientConn) (proto.Message, error) { return ctlpb.NewCtlSvcClient(conn).StorageFormat(ctx, pbReq) }) diff --git a/src/control/server/ctl_storage_rpc.go b/src/control/server/ctl_storage_rpc.go index b2d7eaf10c0..6d9b7a897a1 100644 --- a/src/control/server/ctl_storage_rpc.go +++ b/src/control/server/ctl_storage_rpc.go @@ -1074,6 +1074,23 @@ func (cs *ControlService) StorageFormat(ctx context.Context, req *ctlpb.StorageF return resp, nil } + // Filter instances if engine-idx is specified (MaxUint32 means all engines) + if req.EngineIdx != ^uint32(0) { + engineIdx := req.EngineIdx + var filteredInstances []Engine + for _, instance := range instances { + if instance.Index() == engineIdx { + filteredInstances = append(filteredInstances, instance) + break + } + } + if len(filteredInstances) == 0 { + return nil, errors.Errorf("engine instance %d not found", engineIdx) + } + instances = filteredInstances + cs.log.Debugf("filtering to engine instance %d only", engineIdx) + } + // DAOS-15947: control_metadata format is valid in --replace case where multiple engines // require replacement or format on the same host. No need to handle independently for // individual engine as if control_metadata is missing then it needs to be created. diff --git a/src/proto/ctl/storage.proto b/src/proto/ctl/storage.proto index d51d302876f..73a958db9a6 100644 --- a/src/proto/ctl/storage.proto +++ b/src/proto/ctl/storage.proto @@ -55,8 +55,9 @@ message StorageFormatReq { FormatNvmeReq nvme = 1; FormatScmReq scm = 2; bool reformat = 3; - bool replace = 4; - uint32 rank = 5; // Specific rank to replace (only valid with replace=true) + bool replace = 4; + uint32 rank = 5; // Specific rank to replace (only valid with replace=true) + uint32 engine_idx = 6; // Specific engine instance index to format (optional) } message StorageFormatResp {