From 95581260e4d75122fbf044cfec280ced3bc74fba Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Fri, 12 Sep 2025 15:20:59 +0100 Subject: [PATCH 1/3] DAOS-17832 control: Add dmg system rebuild start|stop cmds Features: control Allow-unstable-test: true Signed-off-by: Tom Nabarro --- src/control/cmd/dmg/command_test.go | 8 +- src/control/cmd/dmg/pool.go | 12 +- src/control/cmd/dmg/pool_test.go | 24 +- src/control/cmd/dmg/system.go | 60 ++ src/control/cmd/dmg/system_test.go | 37 ++ src/control/common/proto/mgmt/mgmt.pb.go | 386 +++++------ src/control/common/proto/mgmt/mgmt_grpc.pb.go | 40 ++ src/control/common/proto/mgmt/system.pb.go | 606 ++++++++++++------ src/control/lib/control/pool.go | 33 +- src/control/lib/control/pool_test.go | 56 +- src/control/lib/control/system.go | 75 ++- src/control/lib/control/system_test.go | 120 ++++ src/control/security/grpc_authorization.go | 1 + .../security/grpc_authorization_test.go | 1 + src/control/server/mgmt_system.go | 82 ++- src/control/server/mgmt_system_test.go | 2 + src/control/server/storage/mocks.go | 2 - src/mgmt/pool.pb-c.c | 20 +- src/mgmt/system.pb-c.c | 245 +++++++ src/mgmt/system.pb-c.h | 118 +++- src/proto/mgmt/mgmt.proto | 2 + src/proto/mgmt/system.proto | 25 +- 22 files changed, 1491 insertions(+), 464 deletions(-) diff --git a/src/control/cmd/dmg/command_test.go b/src/control/cmd/dmg/command_test.go index 5daa6fe5730..ea09adbca12 100644 --- a/src/control/cmd/dmg/command_test.go +++ b/src/control/cmd/dmg/command_test.go @@ -180,12 +180,14 @@ func (bci *bridgeConnInvoker) InvokeUnaryRPC(ctx context.Context, uReq control.U resp = control.MockMSResponse("", nil, &mgmtpb.PoolRanksResp{}) case *control.PoolExtendReq: resp = control.MockMSResponse("", nil, &mgmtpb.PoolExtendResp{}) - case *control.PoolRebuildReq: - if req.Op == control.PoolRebuildOpCodeStart { + case *control.PoolRebuildManageReq: + if req.OpCode == control.PoolRebuildOpCodeStart { resp = control.MockMSResponse("", nil, &mgmtpb.DaosResp{}) - } else if req.Op == control.PoolRebuildOpCodeStop { + } else if req.OpCode == control.PoolRebuildOpCodeStop { resp = control.MockMSResponse("", nil, &mgmtpb.DaosResp{}) } + case *control.SystemRebuildManageReq: + resp = control.MockMSResponse("", nil, &mgmtpb.SystemRebuildManageResp{}) case *control.SystemCheckEnableReq: resp = control.MockMSResponse("", nil, &mgmtpb.DaosResp{}) case *control.SystemCheckDisableReq: diff --git a/src/control/cmd/dmg/pool.go b/src/control/cmd/dmg/pool.go index 3d831279b93..7314d91b855 100644 --- a/src/control/cmd/dmg/pool.go +++ b/src/control/cmd/dmg/pool.go @@ -1067,13 +1067,13 @@ type poolRebuildOpCmd struct { } func (cmd *poolRebuildOpCmd) execute(opCode control.PoolRebuildOpCode, force bool) (errOut error) { - req := &control.PoolRebuildReq{ - ID: cmd.PoolID().String(), - Op: opCode, - Force: force, + req := &control.PoolRebuildManageReq{ + ID: cmd.PoolID().String(), + OpCode: opCode, + Force: force, } - err := control.PoolRebuild(cmd.MustLogCtx(), cmd.ctlInvoker, req) + err := control.PoolRebuildManage(cmd.MustLogCtx(), cmd.ctlInvoker, req) if err != nil || cmd.JSONOutputEnabled() { if err != nil { cmd.ctlInvoker.Debug(err.Error()) @@ -1082,7 +1082,7 @@ func (cmd *poolRebuildOpCmd) execute(opCode control.PoolRebuildOpCode, force boo return err } - msg := fmt.Sprintf("Pool-rebuild %s request succeeded", opCode.String()) + msg := fmt.Sprintf("Pool-rebuild %s request succeeded", opCode) cmd.ctlInvoker.Debug(msg) cmd.Info(msg) diff --git a/src/control/cmd/dmg/pool_test.go b/src/control/cmd/dmg/pool_test.go index 49ebb03ad58..397e714c277 100644 --- a/src/control/cmd/dmg/pool_test.go +++ b/src/control/cmd/dmg/pool_test.go @@ -1213,9 +1213,9 @@ func TestPoolCommands(t *testing.T) { "Start interactive rebuild on pool with ID", "pool rebuild start 031bcaf8-f0f5-42ef-b3c5-ee048676dceb", strings.Join([]string{ - printRequest(t, &control.PoolRebuildReq{ - ID: "031bcaf8-f0f5-42ef-b3c5-ee048676dceb", - Op: control.PoolRebuildOpCodeStart, + printRequest(t, &control.PoolRebuildManageReq{ + ID: "031bcaf8-f0f5-42ef-b3c5-ee048676dceb", + OpCode: control.PoolRebuildOpCodeStart, }), }, " "), nil, @@ -1224,9 +1224,9 @@ func TestPoolCommands(t *testing.T) { "Start interactive rebuild on pool with label", "pool rebuild start test_label", strings.Join([]string{ - printRequest(t, &control.PoolRebuildReq{ - ID: "test_label", - Op: control.PoolRebuildOpCodeStart, + printRequest(t, &control.PoolRebuildManageReq{ + ID: "test_label", + OpCode: control.PoolRebuildOpCodeStart, }), }, " "), nil, @@ -1247,9 +1247,9 @@ func TestPoolCommands(t *testing.T) { "Stop interactive rebuild on pool with ID", "pool rebuild stop 031bcaf8-f0f5-42ef-b3c5-ee048676dceb", strings.Join([]string{ - printRequest(t, &control.PoolRebuildReq{ - ID: "031bcaf8-f0f5-42ef-b3c5-ee048676dceb", - Op: control.PoolRebuildOpCodeStop, + printRequest(t, &control.PoolRebuildManageReq{ + ID: "031bcaf8-f0f5-42ef-b3c5-ee048676dceb", + OpCode: control.PoolRebuildOpCodeStop, }), }, " "), nil, @@ -1258,9 +1258,9 @@ func TestPoolCommands(t *testing.T) { "Stop interactive rebuild on pool with label", "pool rebuild stop test_label", strings.Join([]string{ - printRequest(t, &control.PoolRebuildReq{ - ID: "test_label", - Op: control.PoolRebuildOpCodeStop, + printRequest(t, &control.PoolRebuildManageReq{ + ID: "test_label", + OpCode: control.PoolRebuildOpCodeStop, }), }, " "), nil, diff --git a/src/control/cmd/dmg/system.go b/src/control/cmd/dmg/system.go index b898293899e..70ae0f81344 100644 --- a/src/control/cmd/dmg/system.go +++ b/src/control/cmd/dmg/system.go @@ -44,6 +44,7 @@ type SystemCmd struct { DelAttr systemDelAttrCmd `command:"del-attr" description:"Delete system attributes"` SetProp systemSetPropCmd `command:"set-prop" description:"Set system properties"` GetProp systemGetPropCmd `command:"get-prop" description:"Get system properties"` + Rebuild systemRebuildCmd `command:"rebuild" description:"Interactive rebuild commands"` } type baseCtlCmd struct { @@ -692,3 +693,62 @@ func (cmd *systemGetPropCmd) Execute(_ []string) error { return nil } + +// systemRebuildCmd represents the system rebuild subcommand. +type systemRebuildCmd struct { + Start systemRebuildStartCmd `command:"start" description:"System rebuild start requests submitted to pools"` + Stop systemRebuildStopCmd `command:"stop" description:"System rebuild stop requests submitted to pools"` +} + +type systemRebuildOpCmd struct { + baseCtlCmd +} + +func (cmd *systemRebuildOpCmd) execute(opCode control.PoolRebuildOpCode, force bool) (errOut error) { + defer func() { + errOut = errors.Wrapf(errOut, "system rebuild %s failed", opCode.String()) + }() + + if cmd.config == nil { + return errors.New("no configuration loaded") + } + + req := &control.SystemRebuildManageReq{ + OpCode: opCode, + Force: force, + } + + resp, err := control.SystemRebuildManage(cmd.MustLogCtx(), cmd.ctlInvoker, req) + if err != nil { + return err // control api returned an error, disregard response + } + + if cmd.JSONOutputEnabled() { + return cmd.OutputJSON(resp, resp.Errors()) + } + + if resp.Errors() != nil { + return errors.Wrapf(resp.Errors(), "System-rebuild %s request failed", + opCode.String()) + } + + cmd.Infof("System-rebuild %s request succeeded", opCode.String()) + return nil +} + +type systemRebuildStartCmd struct { + systemRebuildOpCmd +} + +func (cmd *systemRebuildStartCmd) Execute(_ []string) error { + return cmd.execute(control.PoolRebuildOpCodeStart, false) +} + +type systemRebuildStopCmd struct { + systemRebuildOpCmd + Force bool `short:"f" long:"force" description:"Forcibly stop interactive rebuild"` +} + +func (cmd *systemRebuildStopCmd) Execute(_ []string) error { + return cmd.execute(control.PoolRebuildOpCodeStop, cmd.Force) +} diff --git a/src/control/cmd/dmg/system_test.go b/src/control/cmd/dmg/system_test.go index a35b0541691..2f1c1838060 100644 --- a/src/control/cmd/dmg/system_test.go +++ b/src/control/cmd/dmg/system_test.go @@ -387,6 +387,43 @@ func TestDmg_SystemCommands(t *testing.T) { "", errors.New("not provided"), }, + { + "system rebuild start", + "system rebuild start", + strings.Join([]string{ + printRequest(t, &control.SystemRebuildManageReq{ + OpCode: control.PoolRebuildOpCodeStart, + }), + }, " "), + nil, + }, + { + "system rebuild start with force", + "system rebuild start --force", + "", + errors.New("unknown flag"), + }, + { + "system rebuild stop", + "system rebuild stop", + strings.Join([]string{ + printRequest(t, &control.SystemRebuildManageReq{ + OpCode: control.PoolRebuildOpCodeStop, + }), + }, " "), + nil, + }, + { + "system rebuild stop with force", + "system rebuild stop --force", + strings.Join([]string{ + printRequest(t, &control.SystemRebuildManageReq{ + OpCode: control.PoolRebuildOpCodeStop, + Force: true, + }), + }, " "), + nil, + }, { "leader query", "system leader-query", diff --git a/src/control/common/proto/mgmt/mgmt.pb.go b/src/control/common/proto/mgmt/mgmt.pb.go index 80307782f00..304606a770d 100644 --- a/src/control/common/proto/mgmt/mgmt.pb.go +++ b/src/control/common/proto/mgmt/mgmt.pb.go @@ -42,7 +42,7 @@ var file_mgmt_mgmt_proto_rawDesc = []byte{ 0x11, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x63, 0x68, 0x6b, 0x2f, 0x63, 0x68, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x63, 0x68, 0x6b, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x32, 0xc2, 0x16, 0x0a, 0x07, 0x4d, 0x67, 0x6d, 0x74, 0x53, 0x76, 0x63, 0x12, + 0x6f, 0x74, 0x6f, 0x32, 0x98, 0x17, 0x0a, 0x07, 0x4d, 0x67, 0x6d, 0x74, 0x53, 0x76, 0x63, 0x12, 0x27, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x0d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, @@ -155,78 +155,84 @@ var file_mgmt_mgmt_proto_rawDesc = []byte{ 0x6d, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x61, 0x73, 0x65, 0x12, 0x14, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x17, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x17, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x12, 0x11, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x12, 0x39, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x12, 0x16, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x39, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x70, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, - 0x37, 0x0a, 0x11, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x2e, 0x63, 0x68, 0x6b, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, - 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x14, 0x46, 0x61, 0x75, 0x6c, - 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x13, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0b, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x12, 0x14, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3b, 0x0a, + 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x14, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x15, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, + 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x10, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x13, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0f, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x12, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x71, 0x1a, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x13, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x1a, 0x14, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x14, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x14, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x17, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x11, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x12, 0x11, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, + 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, + 0x74, 0x74, 0x72, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, + 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x00, 0x12, 0x42, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x11, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x2e, 0x63, 0x68, 0x6b, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x0e, 0x2e, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x34, + 0x0a, 0x14, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, + 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0a, 0x2e, 0x63, 0x68, 0x6b, 0x2e, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x18, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x67, 0x6d, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0a, 0x2e, 0x63, 0x68, 0x6b, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x0e, 0x2e, 0x6d, - 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, - 0x0a, 0x18, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x67, 0x6d, - 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0a, 0x2e, 0x63, 0x68, 0x6b, - 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x0e, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, - 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 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, + 0x67, 0x6d, 0x74, 0x2e, 0x44, 0x61, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 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 file_mgmt_mgmt_proto_goTypes = []interface{}{ @@ -259,56 +265,58 @@ var file_mgmt_mgmt_proto_goTypes = []interface{}{ (*SystemStartReq)(nil), // 26: mgmt.SystemStartReq (*SystemExcludeReq)(nil), // 27: mgmt.SystemExcludeReq (*SystemDrainReq)(nil), // 28: mgmt.SystemDrainReq - (*SystemEraseReq)(nil), // 29: mgmt.SystemEraseReq - (*SystemCleanupReq)(nil), // 30: mgmt.SystemCleanupReq - (*CheckEnableReq)(nil), // 31: mgmt.CheckEnableReq - (*CheckDisableReq)(nil), // 32: mgmt.CheckDisableReq - (*CheckStartReq)(nil), // 33: mgmt.CheckStartReq - (*CheckStopReq)(nil), // 34: mgmt.CheckStopReq - (*CheckQueryReq)(nil), // 35: mgmt.CheckQueryReq - (*CheckSetPolicyReq)(nil), // 36: mgmt.CheckSetPolicyReq - (*CheckGetPolicyReq)(nil), // 37: mgmt.CheckGetPolicyReq - (*CheckActReq)(nil), // 38: mgmt.CheckActReq - (*SystemSetAttrReq)(nil), // 39: mgmt.SystemSetAttrReq - (*SystemGetAttrReq)(nil), // 40: mgmt.SystemGetAttrReq - (*SystemSetPropReq)(nil), // 41: mgmt.SystemSetPropReq - (*SystemGetPropReq)(nil), // 42: mgmt.SystemGetPropReq - (*chk.CheckReport)(nil), // 43: chk.CheckReport - (*chk.Fault)(nil), // 44: chk.Fault - (*JoinResp)(nil), // 45: mgmt.JoinResp - (*shared.ClusterEventResp)(nil), // 46: shared.ClusterEventResp - (*LeaderQueryResp)(nil), // 47: mgmt.LeaderQueryResp - (*PoolCreateResp)(nil), // 48: mgmt.PoolCreateResp - (*PoolDestroyResp)(nil), // 49: mgmt.PoolDestroyResp - (*PoolEvictResp)(nil), // 50: mgmt.PoolEvictResp - (*PoolExcludeResp)(nil), // 51: mgmt.PoolExcludeResp - (*PoolDrainResp)(nil), // 52: mgmt.PoolDrainResp - (*PoolExtendResp)(nil), // 53: mgmt.PoolExtendResp - (*PoolReintResp)(nil), // 54: mgmt.PoolReintResp - (*PoolQueryResp)(nil), // 55: mgmt.PoolQueryResp - (*PoolQueryTargetResp)(nil), // 56: mgmt.PoolQueryTargetResp - (*PoolSetPropResp)(nil), // 57: mgmt.PoolSetPropResp - (*PoolGetPropResp)(nil), // 58: mgmt.PoolGetPropResp - (*ACLResp)(nil), // 59: mgmt.ACLResp - (*PoolUpgradeResp)(nil), // 60: mgmt.PoolUpgradeResp - (*DaosResp)(nil), // 61: mgmt.DaosResp - (*GetAttachInfoResp)(nil), // 62: mgmt.GetAttachInfoResp - (*ListPoolsResp)(nil), // 63: mgmt.ListPoolsResp - (*ListContResp)(nil), // 64: mgmt.ListContResp - (*SystemQueryResp)(nil), // 65: mgmt.SystemQueryResp - (*SystemStopResp)(nil), // 66: mgmt.SystemStopResp - (*SystemStartResp)(nil), // 67: mgmt.SystemStartResp - (*SystemExcludeResp)(nil), // 68: mgmt.SystemExcludeResp - (*SystemDrainResp)(nil), // 69: mgmt.SystemDrainResp - (*SystemEraseResp)(nil), // 70: mgmt.SystemEraseResp - (*SystemCleanupResp)(nil), // 71: mgmt.SystemCleanupResp - (*CheckStartResp)(nil), // 72: mgmt.CheckStartResp - (*CheckStopResp)(nil), // 73: mgmt.CheckStopResp - (*CheckQueryResp)(nil), // 74: mgmt.CheckQueryResp - (*CheckGetPolicyResp)(nil), // 75: mgmt.CheckGetPolicyResp - (*CheckActResp)(nil), // 76: mgmt.CheckActResp - (*SystemGetAttrResp)(nil), // 77: mgmt.SystemGetAttrResp - (*SystemGetPropResp)(nil), // 78: mgmt.SystemGetPropResp + (*SystemRebuildManageReq)(nil), // 29: mgmt.SystemRebuildManageReq + (*SystemEraseReq)(nil), // 30: mgmt.SystemEraseReq + (*SystemCleanupReq)(nil), // 31: mgmt.SystemCleanupReq + (*CheckEnableReq)(nil), // 32: mgmt.CheckEnableReq + (*CheckDisableReq)(nil), // 33: mgmt.CheckDisableReq + (*CheckStartReq)(nil), // 34: mgmt.CheckStartReq + (*CheckStopReq)(nil), // 35: mgmt.CheckStopReq + (*CheckQueryReq)(nil), // 36: mgmt.CheckQueryReq + (*CheckSetPolicyReq)(nil), // 37: mgmt.CheckSetPolicyReq + (*CheckGetPolicyReq)(nil), // 38: mgmt.CheckGetPolicyReq + (*CheckActReq)(nil), // 39: mgmt.CheckActReq + (*SystemSetAttrReq)(nil), // 40: mgmt.SystemSetAttrReq + (*SystemGetAttrReq)(nil), // 41: mgmt.SystemGetAttrReq + (*SystemSetPropReq)(nil), // 42: mgmt.SystemSetPropReq + (*SystemGetPropReq)(nil), // 43: mgmt.SystemGetPropReq + (*chk.CheckReport)(nil), // 44: chk.CheckReport + (*chk.Fault)(nil), // 45: chk.Fault + (*JoinResp)(nil), // 46: mgmt.JoinResp + (*shared.ClusterEventResp)(nil), // 47: shared.ClusterEventResp + (*LeaderQueryResp)(nil), // 48: mgmt.LeaderQueryResp + (*PoolCreateResp)(nil), // 49: mgmt.PoolCreateResp + (*PoolDestroyResp)(nil), // 50: mgmt.PoolDestroyResp + (*PoolEvictResp)(nil), // 51: mgmt.PoolEvictResp + (*PoolExcludeResp)(nil), // 52: mgmt.PoolExcludeResp + (*PoolDrainResp)(nil), // 53: mgmt.PoolDrainResp + (*PoolExtendResp)(nil), // 54: mgmt.PoolExtendResp + (*PoolReintResp)(nil), // 55: mgmt.PoolReintResp + (*PoolQueryResp)(nil), // 56: mgmt.PoolQueryResp + (*PoolQueryTargetResp)(nil), // 57: mgmt.PoolQueryTargetResp + (*PoolSetPropResp)(nil), // 58: mgmt.PoolSetPropResp + (*PoolGetPropResp)(nil), // 59: mgmt.PoolGetPropResp + (*ACLResp)(nil), // 60: mgmt.ACLResp + (*PoolUpgradeResp)(nil), // 61: mgmt.PoolUpgradeResp + (*DaosResp)(nil), // 62: mgmt.DaosResp + (*GetAttachInfoResp)(nil), // 63: mgmt.GetAttachInfoResp + (*ListPoolsResp)(nil), // 64: mgmt.ListPoolsResp + (*ListContResp)(nil), // 65: mgmt.ListContResp + (*SystemQueryResp)(nil), // 66: mgmt.SystemQueryResp + (*SystemStopResp)(nil), // 67: mgmt.SystemStopResp + (*SystemStartResp)(nil), // 68: mgmt.SystemStartResp + (*SystemExcludeResp)(nil), // 69: mgmt.SystemExcludeResp + (*SystemDrainResp)(nil), // 70: mgmt.SystemDrainResp + (*SystemRebuildManageResp)(nil), // 71: mgmt.SystemRebuildManageResp + (*SystemEraseResp)(nil), // 72: mgmt.SystemEraseResp + (*SystemCleanupResp)(nil), // 73: mgmt.SystemCleanupResp + (*CheckStartResp)(nil), // 74: mgmt.CheckStartResp + (*CheckStopResp)(nil), // 75: mgmt.CheckStopResp + (*CheckQueryResp)(nil), // 76: mgmt.CheckQueryResp + (*CheckGetPolicyResp)(nil), // 77: mgmt.CheckGetPolicyResp + (*CheckActResp)(nil), // 78: mgmt.CheckActResp + (*SystemGetAttrResp)(nil), // 79: mgmt.SystemGetAttrResp + (*SystemGetPropResp)(nil), // 80: mgmt.SystemGetPropResp } var file_mgmt_mgmt_proto_depIdxs = []int32{ 0, // 0: mgmt.MgmtSvc.Join:input_type -> mgmt.JoinReq @@ -341,72 +349,74 @@ var file_mgmt_mgmt_proto_depIdxs = []int32{ 26, // 27: mgmt.MgmtSvc.SystemStart:input_type -> mgmt.SystemStartReq 27, // 28: mgmt.MgmtSvc.SystemExclude:input_type -> mgmt.SystemExcludeReq 28, // 29: mgmt.MgmtSvc.SystemDrain:input_type -> mgmt.SystemDrainReq - 29, // 30: mgmt.MgmtSvc.SystemErase:input_type -> mgmt.SystemEraseReq - 30, // 31: mgmt.MgmtSvc.SystemCleanup:input_type -> mgmt.SystemCleanupReq - 31, // 32: mgmt.MgmtSvc.SystemCheckEnable:input_type -> mgmt.CheckEnableReq - 32, // 33: mgmt.MgmtSvc.SystemCheckDisable:input_type -> mgmt.CheckDisableReq - 33, // 34: mgmt.MgmtSvc.SystemCheckStart:input_type -> mgmt.CheckStartReq - 34, // 35: mgmt.MgmtSvc.SystemCheckStop:input_type -> mgmt.CheckStopReq - 35, // 36: mgmt.MgmtSvc.SystemCheckQuery:input_type -> mgmt.CheckQueryReq - 36, // 37: mgmt.MgmtSvc.SystemCheckSetPolicy:input_type -> mgmt.CheckSetPolicyReq - 37, // 38: mgmt.MgmtSvc.SystemCheckGetPolicy:input_type -> mgmt.CheckGetPolicyReq - 38, // 39: mgmt.MgmtSvc.SystemCheckRepair:input_type -> mgmt.CheckActReq - 39, // 40: mgmt.MgmtSvc.SystemSetAttr:input_type -> mgmt.SystemSetAttrReq - 40, // 41: mgmt.MgmtSvc.SystemGetAttr:input_type -> mgmt.SystemGetAttrReq - 41, // 42: mgmt.MgmtSvc.SystemSetProp:input_type -> mgmt.SystemSetPropReq - 42, // 43: mgmt.MgmtSvc.SystemGetProp:input_type -> mgmt.SystemGetPropReq - 43, // 44: mgmt.MgmtSvc.FaultInjectReport:input_type -> chk.CheckReport - 44, // 45: mgmt.MgmtSvc.FaultInjectPoolFault:input_type -> chk.Fault - 44, // 46: mgmt.MgmtSvc.FaultInjectMgmtPoolFault:input_type -> chk.Fault - 45, // 47: mgmt.MgmtSvc.Join:output_type -> mgmt.JoinResp - 46, // 48: mgmt.MgmtSvc.ClusterEvent:output_type -> shared.ClusterEventResp - 47, // 49: mgmt.MgmtSvc.LeaderQuery:output_type -> mgmt.LeaderQueryResp - 48, // 50: mgmt.MgmtSvc.PoolCreate:output_type -> mgmt.PoolCreateResp - 49, // 51: mgmt.MgmtSvc.PoolDestroy:output_type -> mgmt.PoolDestroyResp - 50, // 52: mgmt.MgmtSvc.PoolEvict:output_type -> mgmt.PoolEvictResp - 51, // 53: mgmt.MgmtSvc.PoolExclude:output_type -> mgmt.PoolExcludeResp - 52, // 54: mgmt.MgmtSvc.PoolDrain:output_type -> mgmt.PoolDrainResp - 53, // 55: mgmt.MgmtSvc.PoolExtend:output_type -> mgmt.PoolExtendResp - 54, // 56: mgmt.MgmtSvc.PoolReintegrate:output_type -> mgmt.PoolReintResp - 55, // 57: mgmt.MgmtSvc.PoolQuery:output_type -> mgmt.PoolQueryResp - 56, // 58: mgmt.MgmtSvc.PoolQueryTarget:output_type -> mgmt.PoolQueryTargetResp - 57, // 59: mgmt.MgmtSvc.PoolSetProp:output_type -> mgmt.PoolSetPropResp - 58, // 60: mgmt.MgmtSvc.PoolGetProp:output_type -> mgmt.PoolGetPropResp - 59, // 61: mgmt.MgmtSvc.PoolGetACL:output_type -> mgmt.ACLResp - 59, // 62: mgmt.MgmtSvc.PoolOverwriteACL:output_type -> mgmt.ACLResp - 59, // 63: mgmt.MgmtSvc.PoolUpdateACL:output_type -> mgmt.ACLResp - 59, // 64: mgmt.MgmtSvc.PoolDeleteACL:output_type -> mgmt.ACLResp - 60, // 65: mgmt.MgmtSvc.PoolUpgrade:output_type -> mgmt.PoolUpgradeResp - 61, // 66: mgmt.MgmtSvc.PoolRebuildStart:output_type -> mgmt.DaosResp - 61, // 67: mgmt.MgmtSvc.PoolRebuildStop:output_type -> mgmt.DaosResp - 62, // 68: mgmt.MgmtSvc.GetAttachInfo:output_type -> mgmt.GetAttachInfoResp - 63, // 69: mgmt.MgmtSvc.ListPools:output_type -> mgmt.ListPoolsResp - 64, // 70: mgmt.MgmtSvc.ListContainers:output_type -> mgmt.ListContResp - 61, // 71: mgmt.MgmtSvc.ContSetOwner:output_type -> mgmt.DaosResp - 65, // 72: mgmt.MgmtSvc.SystemQuery:output_type -> mgmt.SystemQueryResp - 66, // 73: mgmt.MgmtSvc.SystemStop:output_type -> mgmt.SystemStopResp - 67, // 74: mgmt.MgmtSvc.SystemStart:output_type -> mgmt.SystemStartResp - 68, // 75: mgmt.MgmtSvc.SystemExclude:output_type -> mgmt.SystemExcludeResp - 69, // 76: mgmt.MgmtSvc.SystemDrain:output_type -> mgmt.SystemDrainResp - 70, // 77: mgmt.MgmtSvc.SystemErase:output_type -> mgmt.SystemEraseResp - 71, // 78: mgmt.MgmtSvc.SystemCleanup:output_type -> mgmt.SystemCleanupResp - 61, // 79: mgmt.MgmtSvc.SystemCheckEnable:output_type -> mgmt.DaosResp - 61, // 80: mgmt.MgmtSvc.SystemCheckDisable:output_type -> mgmt.DaosResp - 72, // 81: mgmt.MgmtSvc.SystemCheckStart:output_type -> mgmt.CheckStartResp - 73, // 82: mgmt.MgmtSvc.SystemCheckStop:output_type -> mgmt.CheckStopResp - 74, // 83: mgmt.MgmtSvc.SystemCheckQuery:output_type -> mgmt.CheckQueryResp - 61, // 84: mgmt.MgmtSvc.SystemCheckSetPolicy:output_type -> mgmt.DaosResp - 75, // 85: mgmt.MgmtSvc.SystemCheckGetPolicy:output_type -> mgmt.CheckGetPolicyResp - 76, // 86: mgmt.MgmtSvc.SystemCheckRepair:output_type -> mgmt.CheckActResp - 61, // 87: mgmt.MgmtSvc.SystemSetAttr:output_type -> mgmt.DaosResp - 77, // 88: mgmt.MgmtSvc.SystemGetAttr:output_type -> mgmt.SystemGetAttrResp - 61, // 89: mgmt.MgmtSvc.SystemSetProp:output_type -> mgmt.DaosResp - 78, // 90: mgmt.MgmtSvc.SystemGetProp:output_type -> mgmt.SystemGetPropResp - 61, // 91: mgmt.MgmtSvc.FaultInjectReport:output_type -> mgmt.DaosResp - 61, // 92: mgmt.MgmtSvc.FaultInjectPoolFault:output_type -> mgmt.DaosResp - 61, // 93: mgmt.MgmtSvc.FaultInjectMgmtPoolFault:output_type -> mgmt.DaosResp - 47, // [47:94] is the sub-list for method output_type - 0, // [0:47] is the sub-list for method input_type + 29, // 30: mgmt.MgmtSvc.SystemRebuildManage:input_type -> mgmt.SystemRebuildManageReq + 30, // 31: mgmt.MgmtSvc.SystemErase:input_type -> mgmt.SystemEraseReq + 31, // 32: mgmt.MgmtSvc.SystemCleanup:input_type -> mgmt.SystemCleanupReq + 32, // 33: mgmt.MgmtSvc.SystemCheckEnable:input_type -> mgmt.CheckEnableReq + 33, // 34: mgmt.MgmtSvc.SystemCheckDisable:input_type -> mgmt.CheckDisableReq + 34, // 35: mgmt.MgmtSvc.SystemCheckStart:input_type -> mgmt.CheckStartReq + 35, // 36: mgmt.MgmtSvc.SystemCheckStop:input_type -> mgmt.CheckStopReq + 36, // 37: mgmt.MgmtSvc.SystemCheckQuery:input_type -> mgmt.CheckQueryReq + 37, // 38: mgmt.MgmtSvc.SystemCheckSetPolicy:input_type -> mgmt.CheckSetPolicyReq + 38, // 39: mgmt.MgmtSvc.SystemCheckGetPolicy:input_type -> mgmt.CheckGetPolicyReq + 39, // 40: mgmt.MgmtSvc.SystemCheckRepair:input_type -> mgmt.CheckActReq + 40, // 41: mgmt.MgmtSvc.SystemSetAttr:input_type -> mgmt.SystemSetAttrReq + 41, // 42: mgmt.MgmtSvc.SystemGetAttr:input_type -> mgmt.SystemGetAttrReq + 42, // 43: mgmt.MgmtSvc.SystemSetProp:input_type -> mgmt.SystemSetPropReq + 43, // 44: mgmt.MgmtSvc.SystemGetProp:input_type -> mgmt.SystemGetPropReq + 44, // 45: mgmt.MgmtSvc.FaultInjectReport:input_type -> chk.CheckReport + 45, // 46: mgmt.MgmtSvc.FaultInjectPoolFault:input_type -> chk.Fault + 45, // 47: mgmt.MgmtSvc.FaultInjectMgmtPoolFault:input_type -> chk.Fault + 46, // 48: mgmt.MgmtSvc.Join:output_type -> mgmt.JoinResp + 47, // 49: mgmt.MgmtSvc.ClusterEvent:output_type -> shared.ClusterEventResp + 48, // 50: mgmt.MgmtSvc.LeaderQuery:output_type -> mgmt.LeaderQueryResp + 49, // 51: mgmt.MgmtSvc.PoolCreate:output_type -> mgmt.PoolCreateResp + 50, // 52: mgmt.MgmtSvc.PoolDestroy:output_type -> mgmt.PoolDestroyResp + 51, // 53: mgmt.MgmtSvc.PoolEvict:output_type -> mgmt.PoolEvictResp + 52, // 54: mgmt.MgmtSvc.PoolExclude:output_type -> mgmt.PoolExcludeResp + 53, // 55: mgmt.MgmtSvc.PoolDrain:output_type -> mgmt.PoolDrainResp + 54, // 56: mgmt.MgmtSvc.PoolExtend:output_type -> mgmt.PoolExtendResp + 55, // 57: mgmt.MgmtSvc.PoolReintegrate:output_type -> mgmt.PoolReintResp + 56, // 58: mgmt.MgmtSvc.PoolQuery:output_type -> mgmt.PoolQueryResp + 57, // 59: mgmt.MgmtSvc.PoolQueryTarget:output_type -> mgmt.PoolQueryTargetResp + 58, // 60: mgmt.MgmtSvc.PoolSetProp:output_type -> mgmt.PoolSetPropResp + 59, // 61: mgmt.MgmtSvc.PoolGetProp:output_type -> mgmt.PoolGetPropResp + 60, // 62: mgmt.MgmtSvc.PoolGetACL:output_type -> mgmt.ACLResp + 60, // 63: mgmt.MgmtSvc.PoolOverwriteACL:output_type -> mgmt.ACLResp + 60, // 64: mgmt.MgmtSvc.PoolUpdateACL:output_type -> mgmt.ACLResp + 60, // 65: mgmt.MgmtSvc.PoolDeleteACL:output_type -> mgmt.ACLResp + 61, // 66: mgmt.MgmtSvc.PoolUpgrade:output_type -> mgmt.PoolUpgradeResp + 62, // 67: mgmt.MgmtSvc.PoolRebuildStart:output_type -> mgmt.DaosResp + 62, // 68: mgmt.MgmtSvc.PoolRebuildStop:output_type -> mgmt.DaosResp + 63, // 69: mgmt.MgmtSvc.GetAttachInfo:output_type -> mgmt.GetAttachInfoResp + 64, // 70: mgmt.MgmtSvc.ListPools:output_type -> mgmt.ListPoolsResp + 65, // 71: mgmt.MgmtSvc.ListContainers:output_type -> mgmt.ListContResp + 62, // 72: mgmt.MgmtSvc.ContSetOwner:output_type -> mgmt.DaosResp + 66, // 73: mgmt.MgmtSvc.SystemQuery:output_type -> mgmt.SystemQueryResp + 67, // 74: mgmt.MgmtSvc.SystemStop:output_type -> mgmt.SystemStopResp + 68, // 75: mgmt.MgmtSvc.SystemStart:output_type -> mgmt.SystemStartResp + 69, // 76: mgmt.MgmtSvc.SystemExclude:output_type -> mgmt.SystemExcludeResp + 70, // 77: mgmt.MgmtSvc.SystemDrain:output_type -> mgmt.SystemDrainResp + 71, // 78: mgmt.MgmtSvc.SystemRebuildManage:output_type -> mgmt.SystemRebuildManageResp + 72, // 79: mgmt.MgmtSvc.SystemErase:output_type -> mgmt.SystemEraseResp + 73, // 80: mgmt.MgmtSvc.SystemCleanup:output_type -> mgmt.SystemCleanupResp + 62, // 81: mgmt.MgmtSvc.SystemCheckEnable:output_type -> mgmt.DaosResp + 62, // 82: mgmt.MgmtSvc.SystemCheckDisable:output_type -> mgmt.DaosResp + 74, // 83: mgmt.MgmtSvc.SystemCheckStart:output_type -> mgmt.CheckStartResp + 75, // 84: mgmt.MgmtSvc.SystemCheckStop:output_type -> mgmt.CheckStopResp + 76, // 85: mgmt.MgmtSvc.SystemCheckQuery:output_type -> mgmt.CheckQueryResp + 62, // 86: mgmt.MgmtSvc.SystemCheckSetPolicy:output_type -> mgmt.DaosResp + 77, // 87: mgmt.MgmtSvc.SystemCheckGetPolicy:output_type -> mgmt.CheckGetPolicyResp + 78, // 88: mgmt.MgmtSvc.SystemCheckRepair:output_type -> mgmt.CheckActResp + 62, // 89: mgmt.MgmtSvc.SystemSetAttr:output_type -> mgmt.DaosResp + 79, // 90: mgmt.MgmtSvc.SystemGetAttr:output_type -> mgmt.SystemGetAttrResp + 62, // 91: mgmt.MgmtSvc.SystemSetProp:output_type -> mgmt.DaosResp + 80, // 92: mgmt.MgmtSvc.SystemGetProp:output_type -> mgmt.SystemGetPropResp + 62, // 93: mgmt.MgmtSvc.FaultInjectReport:output_type -> mgmt.DaosResp + 62, // 94: mgmt.MgmtSvc.FaultInjectPoolFault:output_type -> mgmt.DaosResp + 62, // 95: mgmt.MgmtSvc.FaultInjectMgmtPoolFault:output_type -> mgmt.DaosResp + 48, // [48:96] is the sub-list for method output_type + 0, // [0:48] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/src/control/common/proto/mgmt/mgmt_grpc.pb.go b/src/control/common/proto/mgmt/mgmt_grpc.pb.go index d348663166f..64073124c04 100644 --- a/src/control/common/proto/mgmt/mgmt_grpc.pb.go +++ b/src/control/common/proto/mgmt/mgmt_grpc.pb.go @@ -58,6 +58,7 @@ const ( MgmtSvc_SystemStart_FullMethodName = "/mgmt.MgmtSvc/SystemStart" MgmtSvc_SystemExclude_FullMethodName = "/mgmt.MgmtSvc/SystemExclude" MgmtSvc_SystemDrain_FullMethodName = "/mgmt.MgmtSvc/SystemDrain" + MgmtSvc_SystemRebuildManage_FullMethodName = "/mgmt.MgmtSvc/SystemRebuildManage" MgmtSvc_SystemErase_FullMethodName = "/mgmt.MgmtSvc/SystemErase" MgmtSvc_SystemCleanup_FullMethodName = "/mgmt.MgmtSvc/SystemCleanup" MgmtSvc_SystemCheckEnable_FullMethodName = "/mgmt.MgmtSvc/SystemCheckEnable" @@ -149,6 +150,8 @@ type MgmtSvcClient interface { SystemExclude(ctx context.Context, in *SystemExcludeReq, opts ...grpc.CallOption) (*SystemExcludeResp, error) // Drain or reintegrate DAOS ranks from all pools SystemDrain(ctx context.Context, in *SystemDrainReq, opts ...grpc.CallOption) (*SystemDrainResp, error) + // Before interactive rebuild operation on all DAOS pools + SystemRebuildManage(ctx context.Context, in *SystemRebuildManageReq, opts ...grpc.CallOption) (*SystemRebuildManageResp, error) // Erase DAOS system database prior to reformat SystemErase(ctx context.Context, in *SystemEraseReq, opts ...grpc.CallOption) (*SystemEraseResp, error) // Clean up leaked resources for a given node @@ -493,6 +496,16 @@ func (c *mgmtSvcClient) SystemDrain(ctx context.Context, in *SystemDrainReq, opt return out, nil } +func (c *mgmtSvcClient) SystemRebuildManage(ctx context.Context, in *SystemRebuildManageReq, opts ...grpc.CallOption) (*SystemRebuildManageResp, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SystemRebuildManageResp) + err := c.cc.Invoke(ctx, MgmtSvc_SystemRebuildManage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *mgmtSvcClient) SystemErase(ctx context.Context, in *SystemEraseReq, opts ...grpc.CallOption) (*SystemEraseResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SystemEraseResp) @@ -735,6 +748,8 @@ type MgmtSvcServer interface { SystemExclude(context.Context, *SystemExcludeReq) (*SystemExcludeResp, error) // Drain or reintegrate DAOS ranks from all pools SystemDrain(context.Context, *SystemDrainReq) (*SystemDrainResp, error) + // Before interactive rebuild operation on all DAOS pools + SystemRebuildManage(context.Context, *SystemRebuildManageReq) (*SystemRebuildManageResp, error) // Erase DAOS system database prior to reformat SystemErase(context.Context, *SystemEraseReq) (*SystemEraseResp, error) // Clean up leaked resources for a given node @@ -869,6 +884,9 @@ func (UnimplementedMgmtSvcServer) SystemExclude(context.Context, *SystemExcludeR func (UnimplementedMgmtSvcServer) SystemDrain(context.Context, *SystemDrainReq) (*SystemDrainResp, error) { return nil, status.Errorf(codes.Unimplemented, "method SystemDrain not implemented") } +func (UnimplementedMgmtSvcServer) SystemRebuildManage(context.Context, *SystemRebuildManageReq) (*SystemRebuildManageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SystemRebuildManage not implemented") +} func (UnimplementedMgmtSvcServer) SystemErase(context.Context, *SystemEraseReq) (*SystemEraseResp, error) { return nil, status.Errorf(codes.Unimplemented, "method SystemErase not implemented") } @@ -1481,6 +1499,24 @@ func _MgmtSvc_SystemDrain_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _MgmtSvc_SystemRebuildManage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SystemRebuildManageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MgmtSvcServer).SystemRebuildManage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MgmtSvc_SystemRebuildManage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MgmtSvcServer).SystemRebuildManage(ctx, req.(*SystemRebuildManageReq)) + } + return interceptor(ctx, in, info, handler) +} + func _MgmtSvc_SystemErase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SystemEraseReq) if err := dec(in); err != nil { @@ -1914,6 +1950,10 @@ var MgmtSvc_ServiceDesc = grpc.ServiceDesc{ MethodName: "SystemDrain", Handler: _MgmtSvc_SystemDrain_Handler, }, + { + MethodName: "SystemRebuildManage", + Handler: _MgmtSvc_SystemRebuildManage_Handler, + }, { MethodName: "SystemErase", Handler: _MgmtSvc_SystemErase_Handler, diff --git a/src/control/common/proto/mgmt/system.pb.go b/src/control/common/proto/mgmt/system.pb.go index a467c03d7c9..b44981458aa 100644 --- a/src/control/common/proto/mgmt/system.pb.go +++ b/src/control/common/proto/mgmt/system.pb.go @@ -656,7 +656,7 @@ func (x *SystemDrainReq) GetReint() bool { return false } -// Response from pool-ranks operation. +// PoolRanksResp describes a response from pool-ranks operation. type PoolRanksResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -768,6 +768,190 @@ func (x *SystemDrainResp) GetResponses() []*PoolRanksResp { return nil } +// SystemRebuildManageReq supplies system-rebuild operational parameters. +type SystemRebuildManageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sys string `protobuf:"bytes,1,opt,name=sys,proto3" json:"sys,omitempty"` // DAOS system name + OpCode uint32 `protobuf:"varint,2,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"` // pool-rebuild operation to run on all pools + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` // Flag to indicate a forced operation +} + +func (x *SystemRebuildManageReq) Reset() { + *x = SystemRebuildManageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_system_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemRebuildManageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemRebuildManageReq) ProtoMessage() {} + +func (x *SystemRebuildManageReq) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_system_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemRebuildManageReq.ProtoReflect.Descriptor instead. +func (*SystemRebuildManageReq) Descriptor() ([]byte, []int) { + return file_mgmt_system_proto_rawDescGZIP(), []int{10} +} + +func (x *SystemRebuildManageReq) GetSys() string { + if x != nil { + return x.Sys + } + return "" +} + +func (x *SystemRebuildManageReq) GetOpCode() uint32 { + if x != nil { + return x.OpCode + } + return 0 +} + +func (x *SystemRebuildManageReq) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// PoolRebuildManageResult returns the result of a pool-rebuild-manage operation. +type PoolRebuildManageResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Pool ID + OpCode uint32 `protobuf:"varint,2,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"` // pool-rebuild operation to run on all pools + Errored bool `protobuf:"varint,3,opt,name=errored,proto3" json:"errored,omitempty"` + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *PoolRebuildManageResult) Reset() { + *x = PoolRebuildManageResult{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_system_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolRebuildManageResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolRebuildManageResult) ProtoMessage() {} + +func (x *PoolRebuildManageResult) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_system_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolRebuildManageResult.ProtoReflect.Descriptor instead. +func (*PoolRebuildManageResult) Descriptor() ([]byte, []int) { + return file_mgmt_system_proto_rawDescGZIP(), []int{11} +} + +func (x *PoolRebuildManageResult) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PoolRebuildManageResult) GetOpCode() uint32 { + if x != nil { + return x.OpCode + } + return 0 +} + +func (x *PoolRebuildManageResult) GetErrored() bool { + if x != nil { + return x.Errored + } + return false +} + +func (x *PoolRebuildManageResult) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +// SystemRebuildManageResp returns status of system-rebuild-manage request. +type SystemRebuildManageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*PoolRebuildManageResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // Pool-rebuild operation results. +} + +func (x *SystemRebuildManageResp) Reset() { + *x = SystemRebuildManageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_system_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemRebuildManageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemRebuildManageResp) ProtoMessage() {} + +func (x *SystemRebuildManageResp) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_system_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemRebuildManageResp.ProtoReflect.Descriptor instead. +func (*SystemRebuildManageResp) Descriptor() ([]byte, []int) { + return file_mgmt_system_proto_rawDescGZIP(), []int{12} +} + +func (x *SystemRebuildManageResp) GetResults() []*PoolRebuildManageResult { + if x != nil { + return x.Results + } + return nil +} + // SystemQueryReq supplies system query parameters. type SystemQueryReq struct { state protoimpl.MessageState @@ -783,7 +967,7 @@ type SystemQueryReq struct { func (x *SystemQueryReq) Reset() { *x = SystemQueryReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[10] + mi := &file_mgmt_system_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -796,7 +980,7 @@ func (x *SystemQueryReq) String() string { func (*SystemQueryReq) ProtoMessage() {} func (x *SystemQueryReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[10] + mi := &file_mgmt_system_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -809,7 +993,7 @@ func (x *SystemQueryReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemQueryReq.ProtoReflect.Descriptor instead. func (*SystemQueryReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{10} + return file_mgmt_system_proto_rawDescGZIP(), []int{13} } func (x *SystemQueryReq) GetSys() string { @@ -856,7 +1040,7 @@ type SystemQueryResp struct { func (x *SystemQueryResp) Reset() { *x = SystemQueryResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[11] + mi := &file_mgmt_system_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -869,7 +1053,7 @@ func (x *SystemQueryResp) String() string { func (*SystemQueryResp) ProtoMessage() {} func (x *SystemQueryResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[11] + mi := &file_mgmt_system_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -882,7 +1066,7 @@ func (x *SystemQueryResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemQueryResp.ProtoReflect.Descriptor instead. func (*SystemQueryResp) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{11} + return file_mgmt_system_proto_rawDescGZIP(), []int{14} } func (x *SystemQueryResp) GetMembers() []*SystemMember { @@ -932,7 +1116,7 @@ type SystemEraseReq struct { func (x *SystemEraseReq) Reset() { *x = SystemEraseReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[12] + mi := &file_mgmt_system_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -945,7 +1129,7 @@ func (x *SystemEraseReq) String() string { func (*SystemEraseReq) ProtoMessage() {} func (x *SystemEraseReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[12] + mi := &file_mgmt_system_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -958,7 +1142,7 @@ func (x *SystemEraseReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemEraseReq.ProtoReflect.Descriptor instead. func (*SystemEraseReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{12} + return file_mgmt_system_proto_rawDescGZIP(), []int{15} } func (x *SystemEraseReq) GetSys() string { @@ -979,7 +1163,7 @@ type SystemEraseResp struct { func (x *SystemEraseResp) Reset() { *x = SystemEraseResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[13] + mi := &file_mgmt_system_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -992,7 +1176,7 @@ func (x *SystemEraseResp) String() string { func (*SystemEraseResp) ProtoMessage() {} func (x *SystemEraseResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[13] + mi := &file_mgmt_system_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1005,7 +1189,7 @@ func (x *SystemEraseResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemEraseResp.ProtoReflect.Descriptor instead. func (*SystemEraseResp) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{13} + return file_mgmt_system_proto_rawDescGZIP(), []int{16} } func (x *SystemEraseResp) GetResults() []*shared.RankResult { @@ -1028,7 +1212,7 @@ type SystemCleanupReq struct { func (x *SystemCleanupReq) Reset() { *x = SystemCleanupReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[14] + mi := &file_mgmt_system_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1041,7 +1225,7 @@ func (x *SystemCleanupReq) String() string { func (*SystemCleanupReq) ProtoMessage() {} func (x *SystemCleanupReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[14] + mi := &file_mgmt_system_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1054,7 +1238,7 @@ func (x *SystemCleanupReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemCleanupReq.ProtoReflect.Descriptor instead. func (*SystemCleanupReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{14} + return file_mgmt_system_proto_rawDescGZIP(), []int{17} } func (x *SystemCleanupReq) GetSys() string { @@ -1083,7 +1267,7 @@ type SystemCleanupResp struct { func (x *SystemCleanupResp) Reset() { *x = SystemCleanupResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[15] + mi := &file_mgmt_system_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1096,7 +1280,7 @@ func (x *SystemCleanupResp) String() string { func (*SystemCleanupResp) ProtoMessage() {} func (x *SystemCleanupResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[15] + mi := &file_mgmt_system_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1109,7 +1293,7 @@ func (x *SystemCleanupResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemCleanupResp.ProtoReflect.Descriptor instead. func (*SystemCleanupResp) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{15} + return file_mgmt_system_proto_rawDescGZIP(), []int{18} } func (x *SystemCleanupResp) GetResults() []*SystemCleanupResp_CleanupResult { @@ -1132,7 +1316,7 @@ type SystemSetAttrReq struct { func (x *SystemSetAttrReq) Reset() { *x = SystemSetAttrReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[16] + mi := &file_mgmt_system_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1145,7 +1329,7 @@ func (x *SystemSetAttrReq) String() string { func (*SystemSetAttrReq) ProtoMessage() {} func (x *SystemSetAttrReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[16] + mi := &file_mgmt_system_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1158,7 +1342,7 @@ func (x *SystemSetAttrReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemSetAttrReq.ProtoReflect.Descriptor instead. func (*SystemSetAttrReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{16} + return file_mgmt_system_proto_rawDescGZIP(), []int{19} } func (x *SystemSetAttrReq) GetSys() string { @@ -1189,7 +1373,7 @@ type SystemGetAttrReq struct { func (x *SystemGetAttrReq) Reset() { *x = SystemGetAttrReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[17] + mi := &file_mgmt_system_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1202,7 +1386,7 @@ func (x *SystemGetAttrReq) String() string { func (*SystemGetAttrReq) ProtoMessage() {} func (x *SystemGetAttrReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[17] + mi := &file_mgmt_system_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1215,7 +1399,7 @@ func (x *SystemGetAttrReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemGetAttrReq.ProtoReflect.Descriptor instead. func (*SystemGetAttrReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{17} + return file_mgmt_system_proto_rawDescGZIP(), []int{20} } func (x *SystemGetAttrReq) GetSys() string { @@ -1244,7 +1428,7 @@ type SystemGetAttrResp struct { func (x *SystemGetAttrResp) Reset() { *x = SystemGetAttrResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[18] + mi := &file_mgmt_system_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1257,7 +1441,7 @@ func (x *SystemGetAttrResp) String() string { func (*SystemGetAttrResp) ProtoMessage() {} func (x *SystemGetAttrResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[18] + mi := &file_mgmt_system_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1270,7 +1454,7 @@ func (x *SystemGetAttrResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemGetAttrResp.ProtoReflect.Descriptor instead. func (*SystemGetAttrResp) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{18} + return file_mgmt_system_proto_rawDescGZIP(), []int{21} } func (x *SystemGetAttrResp) GetAttributes() map[string]string { @@ -1293,7 +1477,7 @@ type SystemSetPropReq struct { func (x *SystemSetPropReq) Reset() { *x = SystemSetPropReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[19] + mi := &file_mgmt_system_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1306,7 +1490,7 @@ func (x *SystemSetPropReq) String() string { func (*SystemSetPropReq) ProtoMessage() {} func (x *SystemSetPropReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[19] + mi := &file_mgmt_system_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1319,7 +1503,7 @@ func (x *SystemSetPropReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemSetPropReq.ProtoReflect.Descriptor instead. func (*SystemSetPropReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{19} + return file_mgmt_system_proto_rawDescGZIP(), []int{22} } func (x *SystemSetPropReq) GetSys() string { @@ -1350,7 +1534,7 @@ type SystemGetPropReq struct { func (x *SystemGetPropReq) Reset() { *x = SystemGetPropReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[20] + mi := &file_mgmt_system_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1363,7 +1547,7 @@ func (x *SystemGetPropReq) String() string { func (*SystemGetPropReq) ProtoMessage() {} func (x *SystemGetPropReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[20] + mi := &file_mgmt_system_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1376,7 +1560,7 @@ func (x *SystemGetPropReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemGetPropReq.ProtoReflect.Descriptor instead. func (*SystemGetPropReq) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{20} + return file_mgmt_system_proto_rawDescGZIP(), []int{23} } func (x *SystemGetPropReq) GetSys() string { @@ -1405,7 +1589,7 @@ type SystemGetPropResp struct { func (x *SystemGetPropResp) Reset() { *x = SystemGetPropResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[21] + mi := &file_mgmt_system_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1418,7 +1602,7 @@ func (x *SystemGetPropResp) String() string { func (*SystemGetPropResp) ProtoMessage() {} func (x *SystemGetPropResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[21] + mi := &file_mgmt_system_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1431,7 +1615,7 @@ func (x *SystemGetPropResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemGetPropResp.ProtoReflect.Descriptor instead. func (*SystemGetPropResp) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{21} + return file_mgmt_system_proto_rawDescGZIP(), []int{24} } func (x *SystemGetPropResp) GetProperties() map[string]string { @@ -1455,7 +1639,7 @@ type SystemCleanupResp_CleanupResult struct { func (x *SystemCleanupResp_CleanupResult) Reset() { *x = SystemCleanupResp_CleanupResult{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_system_proto_msgTypes[22] + mi := &file_mgmt_system_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1468,7 +1652,7 @@ func (x *SystemCleanupResp_CleanupResult) String() string { func (*SystemCleanupResp_CleanupResult) ProtoMessage() {} func (x *SystemCleanupResp_CleanupResult) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_system_proto_msgTypes[22] + mi := &file_mgmt_system_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1481,7 +1665,7 @@ func (x *SystemCleanupResp_CleanupResult) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemCleanupResp_CleanupResult.ProtoReflect.Descriptor instead. func (*SystemCleanupResp_CleanupResult) Descriptor() ([]byte, []int) { - return file_mgmt_system_proto_rawDescGZIP(), []int{15, 0} + return file_mgmt_system_proto_rawDescGZIP(), []int{18, 0} } func (x *SystemCleanupResp_CleanupResult) GetStatus() int32 { @@ -1606,101 +1790,119 @@ var file_mgmt_system_proto_rawDesc = []byte{ 0x12, 0x31, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x22, 0x6d, 0x0a, 0x0e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x73, 0x6b, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x61, - 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, - 0x74, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x62, 0x73, - 0x65, 0x6e, 0x74, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x64, 0x61, 0x74, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x0e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x22, 0x3f, 0x0a, - 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3e, - 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x73, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x22, 0xbe, - 0x01, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x68, 0x0a, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 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, 0x10, - 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, - 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xab, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, - 0x65, 0x71, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, - 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, - 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, + 0x73, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x16, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, + 0x17, 0x0a, 0x07, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x6f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x6e, + 0x0a, 0x17, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x70, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x70, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x52, + 0x0a, 0x17, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x22, 0x6d, 0x0a, 0x0e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x6f, 0x73, + 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, + 0x6b, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6e, + 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x62, 0x73, 0x65, + 0x6e, 0x74, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x64, + 0x61, 0x74, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x0e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x22, 0x3f, 0x0a, 0x0f, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x3e, 0x0a, + 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x73, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, - 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 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, 0x46, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x9b, 0x01, - 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 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, + 0x73, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x22, 0xbe, 0x01, + 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x68, 0x0a, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 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, 0x10, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, + 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xab, + 0x01, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, + 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, + 0x71, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, + 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x38, 0x0a, 0x10, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, + 0x74, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x46, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x38, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x9b, 0x01, 0x0a, + 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 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 ( @@ -1715,7 +1917,7 @@ func file_mgmt_system_proto_rawDescGZIP() []byte { return file_mgmt_system_proto_rawDescData } -var file_mgmt_system_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_mgmt_system_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_mgmt_system_proto_goTypes = []interface{}{ (*SystemMember)(nil), // 0: mgmt.SystemMember (*SystemStopReq)(nil), // 1: mgmt.SystemStopReq @@ -1727,43 +1929,47 @@ var file_mgmt_system_proto_goTypes = []interface{}{ (*SystemDrainReq)(nil), // 7: mgmt.SystemDrainReq (*PoolRanksResp)(nil), // 8: mgmt.PoolRanksResp (*SystemDrainResp)(nil), // 9: mgmt.SystemDrainResp - (*SystemQueryReq)(nil), // 10: mgmt.SystemQueryReq - (*SystemQueryResp)(nil), // 11: mgmt.SystemQueryResp - (*SystemEraseReq)(nil), // 12: mgmt.SystemEraseReq - (*SystemEraseResp)(nil), // 13: mgmt.SystemEraseResp - (*SystemCleanupReq)(nil), // 14: mgmt.SystemCleanupReq - (*SystemCleanupResp)(nil), // 15: mgmt.SystemCleanupResp - (*SystemSetAttrReq)(nil), // 16: mgmt.SystemSetAttrReq - (*SystemGetAttrReq)(nil), // 17: mgmt.SystemGetAttrReq - (*SystemGetAttrResp)(nil), // 18: mgmt.SystemGetAttrResp - (*SystemSetPropReq)(nil), // 19: mgmt.SystemSetPropReq - (*SystemGetPropReq)(nil), // 20: mgmt.SystemGetPropReq - (*SystemGetPropResp)(nil), // 21: mgmt.SystemGetPropResp - (*SystemCleanupResp_CleanupResult)(nil), // 22: mgmt.SystemCleanupResp.CleanupResult - nil, // 23: mgmt.SystemSetAttrReq.AttributesEntry - nil, // 24: mgmt.SystemGetAttrResp.AttributesEntry - nil, // 25: mgmt.SystemSetPropReq.PropertiesEntry - nil, // 26: mgmt.SystemGetPropResp.PropertiesEntry - (*shared.RankResult)(nil), // 27: shared.RankResult + (*SystemRebuildManageReq)(nil), // 10: mgmt.SystemRebuildManageReq + (*PoolRebuildManageResult)(nil), // 11: mgmt.PoolRebuildManageResult + (*SystemRebuildManageResp)(nil), // 12: mgmt.SystemRebuildManageResp + (*SystemQueryReq)(nil), // 13: mgmt.SystemQueryReq + (*SystemQueryResp)(nil), // 14: mgmt.SystemQueryResp + (*SystemEraseReq)(nil), // 15: mgmt.SystemEraseReq + (*SystemEraseResp)(nil), // 16: mgmt.SystemEraseResp + (*SystemCleanupReq)(nil), // 17: mgmt.SystemCleanupReq + (*SystemCleanupResp)(nil), // 18: mgmt.SystemCleanupResp + (*SystemSetAttrReq)(nil), // 19: mgmt.SystemSetAttrReq + (*SystemGetAttrReq)(nil), // 20: mgmt.SystemGetAttrReq + (*SystemGetAttrResp)(nil), // 21: mgmt.SystemGetAttrResp + (*SystemSetPropReq)(nil), // 22: mgmt.SystemSetPropReq + (*SystemGetPropReq)(nil), // 23: mgmt.SystemGetPropReq + (*SystemGetPropResp)(nil), // 24: mgmt.SystemGetPropResp + (*SystemCleanupResp_CleanupResult)(nil), // 25: mgmt.SystemCleanupResp.CleanupResult + nil, // 26: mgmt.SystemSetAttrReq.AttributesEntry + nil, // 27: mgmt.SystemGetAttrResp.AttributesEntry + nil, // 28: mgmt.SystemSetPropReq.PropertiesEntry + nil, // 29: mgmt.SystemGetPropResp.PropertiesEntry + (*shared.RankResult)(nil), // 30: shared.RankResult } var file_mgmt_system_proto_depIdxs = []int32{ - 27, // 0: mgmt.SystemStopResp.results:type_name -> shared.RankResult - 27, // 1: mgmt.SystemStartResp.results:type_name -> shared.RankResult - 27, // 2: mgmt.SystemExcludeResp.results:type_name -> shared.RankResult - 27, // 3: mgmt.PoolRanksResp.results:type_name -> shared.RankResult + 30, // 0: mgmt.SystemStopResp.results:type_name -> shared.RankResult + 30, // 1: mgmt.SystemStartResp.results:type_name -> shared.RankResult + 30, // 2: mgmt.SystemExcludeResp.results:type_name -> shared.RankResult + 30, // 3: mgmt.PoolRanksResp.results:type_name -> shared.RankResult 8, // 4: mgmt.SystemDrainResp.responses:type_name -> mgmt.PoolRanksResp - 0, // 5: mgmt.SystemQueryResp.members:type_name -> mgmt.SystemMember - 27, // 6: mgmt.SystemEraseResp.results:type_name -> shared.RankResult - 22, // 7: mgmt.SystemCleanupResp.results:type_name -> mgmt.SystemCleanupResp.CleanupResult - 23, // 8: mgmt.SystemSetAttrReq.attributes:type_name -> mgmt.SystemSetAttrReq.AttributesEntry - 24, // 9: mgmt.SystemGetAttrResp.attributes:type_name -> mgmt.SystemGetAttrResp.AttributesEntry - 25, // 10: mgmt.SystemSetPropReq.properties:type_name -> mgmt.SystemSetPropReq.PropertiesEntry - 26, // 11: mgmt.SystemGetPropResp.properties:type_name -> mgmt.SystemGetPropResp.PropertiesEntry - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 11, // 5: mgmt.SystemRebuildManageResp.results:type_name -> mgmt.PoolRebuildManageResult + 0, // 6: mgmt.SystemQueryResp.members:type_name -> mgmt.SystemMember + 30, // 7: mgmt.SystemEraseResp.results:type_name -> shared.RankResult + 25, // 8: mgmt.SystemCleanupResp.results:type_name -> mgmt.SystemCleanupResp.CleanupResult + 26, // 9: mgmt.SystemSetAttrReq.attributes:type_name -> mgmt.SystemSetAttrReq.AttributesEntry + 27, // 10: mgmt.SystemGetAttrResp.attributes:type_name -> mgmt.SystemGetAttrResp.AttributesEntry + 28, // 11: mgmt.SystemSetPropReq.properties:type_name -> mgmt.SystemSetPropReq.PropertiesEntry + 29, // 12: mgmt.SystemGetPropResp.properties:type_name -> mgmt.SystemGetPropResp.PropertiesEntry + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_mgmt_system_proto_init() } @@ -1893,7 +2099,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemQueryReq); i { + switch v := v.(*SystemRebuildManageReq); i { case 0: return &v.state case 1: @@ -1905,7 +2111,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemQueryResp); i { + switch v := v.(*PoolRebuildManageResult); i { case 0: return &v.state case 1: @@ -1917,7 +2123,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemEraseReq); i { + switch v := v.(*SystemRebuildManageResp); i { case 0: return &v.state case 1: @@ -1929,7 +2135,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemEraseResp); i { + switch v := v.(*SystemQueryReq); i { case 0: return &v.state case 1: @@ -1941,7 +2147,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemCleanupReq); i { + switch v := v.(*SystemQueryResp); i { case 0: return &v.state case 1: @@ -1953,7 +2159,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemCleanupResp); i { + switch v := v.(*SystemEraseReq); i { case 0: return &v.state case 1: @@ -1965,7 +2171,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemSetAttrReq); i { + switch v := v.(*SystemEraseResp); i { case 0: return &v.state case 1: @@ -1977,7 +2183,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemGetAttrReq); i { + switch v := v.(*SystemCleanupReq); i { case 0: return &v.state case 1: @@ -1989,7 +2195,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemGetAttrResp); i { + switch v := v.(*SystemCleanupResp); i { case 0: return &v.state case 1: @@ -2001,7 +2207,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemSetPropReq); i { + switch v := v.(*SystemSetAttrReq); i { case 0: return &v.state case 1: @@ -2013,7 +2219,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemGetPropReq); i { + switch v := v.(*SystemGetAttrReq); i { case 0: return &v.state case 1: @@ -2025,7 +2231,7 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SystemGetPropResp); i { + switch v := v.(*SystemGetAttrResp); i { case 0: return &v.state case 1: @@ -2037,6 +2243,42 @@ func file_mgmt_system_proto_init() { } } file_mgmt_system_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemSetPropReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_system_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemGetPropReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_system_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemGetPropResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_system_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemCleanupResp_CleanupResult); i { case 0: return &v.state @@ -2055,7 +2297,7 @@ func file_mgmt_system_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_system_proto_rawDesc, NumEnums: 0, - NumMessages: 27, + NumMessages: 30, NumExtensions: 0, NumServices: 0, }, diff --git a/src/control/lib/control/pool.go b/src/control/lib/control/pool.go index e63857f7c2e..fed90473447 100644 --- a/src/control/lib/control/pool.go +++ b/src/control/lib/control/pool.go @@ -1323,7 +1323,7 @@ func getMaxPoolSize(ctx context.Context, rpcClient UnaryInvoker, createReq *Pool return metaBytes, nvmeBytes, nil } -// PoolRebuildOpcode indicates the type of interactive rebuild operation to be triggered. +// PoolRebuildOpCode indicates the type of interactive rebuild operation to be triggered. type PoolRebuildOpCode int32 // PoolRebuildOpCode definitions for supported interactive rebuild operations. @@ -1341,26 +1341,33 @@ func (op PoolRebuildOpCode) String() string { }[op] } -// PoolRebuildReq contains pool-rebuild operation parameters. ID identifies the pool on which the +func (op PoolRebuildOpCode) IsValid() bool { + return map[PoolRebuildOpCode]bool{ + PoolRebuildOpCodeStart: true, + PoolRebuildOpCodeStop: true, + }[op] +} + +// PoolRebuildManageReq contains pool-rebuild operation parameters. ID identifies the pool on which the // rebuild operation (specified by the opcode) should be run. -type PoolRebuildReq struct { +type PoolRebuildManageReq struct { poolRequest - ID string - Op PoolRebuildOpCode - Force bool + ID string + OpCode PoolRebuildOpCode + Force bool } -// PoolRebuild sends a pool rebuild request relating to the requested opcode to the pool service +// PoolRebuildManage sends a pool rebuild request relating to the requested opcode to the pool service // leader. -func PoolRebuild(ctx context.Context, rpcClient UnaryInvoker, req *PoolRebuildReq) error { +func PoolRebuildManage(ctx context.Context, rpcClient UnaryInvoker, req *PoolRebuildManageReq) error { if req == nil { return errors.Errorf("nil %T in PoolRebuild()", req) } - if req.Op == PoolRebuildOpCodeStart { + if req.OpCode == PoolRebuildOpCodeStart { if req.Force { return errors.Errorf("force flag not supported with pool-rebuild opcode %s", - req.Op) + req.OpCode) } pbReq := &mgmtpb.PoolRebuildStartReq{ @@ -1371,7 +1378,7 @@ func PoolRebuild(ctx context.Context, rpcClient UnaryInvoker, req *PoolRebuildRe return mgmtpb.NewMgmtSvcClient(conn).PoolRebuildStart(ctx, pbReq) }) rpcClient.Debugf("pool-rebuild request: %s\n", pbUtil.Debug(pbReq)) - } else if req.Op == PoolRebuildOpCodeStop { + } else if req.OpCode == PoolRebuildOpCodeStop { pbReq := &mgmtpb.PoolRebuildStopReq{ Sys: req.getSystem(rpcClient), Id: req.ID, @@ -1382,7 +1389,7 @@ func PoolRebuild(ctx context.Context, rpcClient UnaryInvoker, req *PoolRebuildRe }) rpcClient.Debugf("pool-rebuild request: %s\n", pbUtil.Debug(pbReq)) } else { - return errors.Errorf("unrecognized pool-rebuild opcode %d", req.Op) + return errors.Errorf("invalid pool-rebuild opcode %d", req.OpCode) } ur, err := rpcClient.InvokeUnaryRPC(ctx, req) @@ -1390,5 +1397,5 @@ func PoolRebuild(ctx context.Context, rpcClient UnaryInvoker, req *PoolRebuildRe return err } - return errors.Wrapf(ur.getMSError(), "pool-rebuild %s failed", req.Op.String()) + return errors.Wrapf(ur.getMSError(), "pool-rebuild %s failed", req.OpCode) } diff --git a/src/control/lib/control/pool_test.go b/src/control/lib/control/pool_test.go index 08ab9f7fb56..90cd74d3be2 100644 --- a/src/control/lib/control/pool_test.go +++ b/src/control/lib/control/pool_test.go @@ -3601,22 +3601,22 @@ func TestControl_PoolCreateAllCmd(t *testing.T) { } } -func TestControl_PoolRebuild(t *testing.T) { +func TestControl_PoolRebuildManage(t *testing.T) { for name, tc := range map[string]struct { mic *MockInvokerConfig - req *PoolRebuildReq + req *PoolRebuildManageReq expErr error }{ "no opcode": { - req: &PoolRebuildReq{ + req: &PoolRebuildManageReq{ ID: test.MockUUID(), }, - expErr: errors.New("unrecognized pool-rebuild opcode"), + expErr: errors.New("invalid pool-rebuild opcode"), }, "local failure": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStart, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStart, }, mic: &MockInvokerConfig{ UnaryError: errors.New("local failed"), @@ -3624,9 +3624,9 @@ func TestControl_PoolRebuild(t *testing.T) { expErr: errors.New("local failed"), }, "remote failure": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStart, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStart, }, mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", errors.New("remote failed"), nil), @@ -3634,9 +3634,9 @@ func TestControl_PoolRebuild(t *testing.T) { expErr: errors.New("remote failed"), }, "-DER_GRPVER is retried": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStart, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStart, }, mic: &MockInvokerConfig{ UnaryResponseSet: []*UnaryResponse{ @@ -3646,9 +3646,9 @@ func TestControl_PoolRebuild(t *testing.T) { }, }, "-DER_AGAIN is retried": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStop, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStop, }, mic: &MockInvokerConfig{ UnaryResponseSet: []*UnaryResponse{ @@ -3658,9 +3658,9 @@ func TestControl_PoolRebuild(t *testing.T) { }, }, "start rebuild": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStart, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStart, }, mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, @@ -3669,18 +3669,18 @@ func TestControl_PoolRebuild(t *testing.T) { }, }, "start rebuild; with force flag": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStart, - Force: true, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStart, + Force: true, }, expErr: errors.New("force flag not supported"), }, "stop rebuild; with force flag": { - req: &PoolRebuildReq{ - ID: test.MockUUID(), - Op: PoolRebuildOpCodeStop, - Force: true, + req: &PoolRebuildManageReq{ + ID: test.MockUUID(), + OpCode: PoolRebuildOpCodeStop, + Force: true, }, mic: &MockInvokerConfig{ UnaryResponse: MockMSResponse("host1", nil, @@ -3701,7 +3701,7 @@ func TestControl_PoolRebuild(t *testing.T) { ctx := test.Context(t) mi := NewMockInvoker(log, mic) - gotErr := PoolRebuild(ctx, mi, tc.req) + gotErr := PoolRebuildManage(ctx, mi, tc.req) test.CmpErr(t, tc.expErr, gotErr) if tc.expErr != nil { return diff --git a/src/control/lib/control/system.go b/src/control/lib/control/system.go index a7203e08152..0671065aa66 100644 --- a/src/control/lib/control/system.go +++ b/src/control/lib/control/system.go @@ -1068,7 +1068,6 @@ func SystemCleanup(ctx context.Context, rpcClient UnaryInvoker, req *SystemClean type SystemSetAttrReq struct { unaryRequest msRequest - Attributes map[string]string } @@ -1103,7 +1102,6 @@ type ( SystemGetAttrReq struct { unaryRequest msRequest - Keys []string } @@ -1141,7 +1139,6 @@ func SystemGetAttr(ctx context.Context, rpcClient UnaryInvoker, req *SystemGetAt type SystemSetPropReq struct { unaryRequest msRequest - Properties map[daos.SystemPropertyKey]daos.SystemPropertyValue } @@ -1179,7 +1176,6 @@ type ( SystemGetPropReq struct { unaryRequest msRequest - Keys []daos.SystemPropertyKey } @@ -1246,3 +1242,74 @@ func SystemGetProp(ctx context.Context, rpcClient UnaryInvoker, req *SystemGetPr return resp, nil } + +// SystemRebuildManageReq sends an interactive pool rebuild request to each pool in a DAOS system. +type SystemRebuildManageReq struct { + unaryRequest + msRequest + OpCode PoolRebuildOpCode // Which pool rebuild operation to trigger + Force bool // Applies to stop interactive rebuild only +} + +// PoolRebuildManageResult describe the result of an interactive rebuild operation on a given pool. +type PoolRebuildManageResult struct { + ID string `json:"id"` + OpCode PoolRebuildOpCode `json:"op_code"` + Errored bool `json:"errored"` + Msg string `json:"msg"` +} + +// SystemRebuildManageResp contains the request response. +type SystemRebuildManageResp struct { + Results []*PoolRebuildManageResult `json:"results"` +} + +// Errors returns a single error combining all error messages associated with pool-rank results. +func (resp *SystemRebuildManageResp) Errors() error { + if resp == nil { + return errors.Errorf("nil %T", resp) + } + + var err error + for _, res := range resp.Results { + if res.Errored { + err = concatErrs(err, + errors.Errorf("pool-rebuild %s failed on pool %s: %s", + res.OpCode, res.ID, res.Msg)) + } + } + + return err +} + +// SystemRebuildManage will apply interactive rebuild operation to all pools. +func SystemRebuildManage(ctx context.Context, rpcClient UnaryInvoker, req *SystemRebuildManageReq) (*SystemRebuildManageResp, error) { + if req == nil { + return nil, errors.Errorf("nil %T request", req) + } + if !req.OpCode.IsValid() { + return nil, errors.Errorf("invalid pool-rebuild opcode %d", req.OpCode) + } + if req.Force && req.OpCode != PoolRebuildOpCodeStop { + return nil, errors.New("force flag only supported with rebuild stop opcode") + } + + pbReq := &mgmtpb.SystemRebuildManageReq{ + Sys: req.getSystem(rpcClient), + //Sys: req.Sys, // getSystem() used in control API rebuild later in call-stack. + OpCode: uint32(req.OpCode), + Force: req.Force, + } + req.setRPC(func(ctx context.Context, conn *grpc.ClientConn) (proto.Message, error) { + return mgmtpb.NewMgmtSvcClient(conn).SystemRebuildManage(ctx, pbReq) + }) + + rpcClient.Debugf("DAOS system rebuild request: %s", pbUtil.Debug(pbReq)) + ur, err := rpcClient.InvokeUnaryRPC(ctx, req) + if err != nil { + return nil, err + } + + resp := new(SystemRebuildManageResp) + return resp, convertMSResponse(ur, resp) +} diff --git a/src/control/lib/control/system_test.go b/src/control/lib/control/system_test.go index e9b69f4af38..fb2ecc87677 100644 --- a/src/control/lib/control/system_test.go +++ b/src/control/lib/control/system_test.go @@ -1887,3 +1887,123 @@ func TestControl_SystemGetAttr(t *testing.T) { }) } } + +func TestControl_SystemRebuildManage(t *testing.T) { + for name, tc := range map[string]struct { + req *SystemRebuildManageReq + uErr error + uResp *UnaryResponse + expErr error + expResp *SystemRebuildManageResp + expRespErr error + }{ + "nil req": { + req: nil, + expErr: errors.New("nil *control.SystemRebuildManageReq request"), + }, + "opcode not supplied": { + req: new(SystemRebuildManageReq), + expErr: errors.New("invalid pool-rebuild opcode"), + }, + "local failure": { + req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStart}, + uErr: errors.New("local failed"), + expErr: errors.New("local failed"), + }, + "remote failure": { + req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStart}, + uResp: MockMSResponse("host1", errors.New("remote failed"), nil), + expErr: errors.New("remote failed"), + }, + "dual pools; rebuild-start": { + req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStart}, + uResp: MockMSResponse("10.0.0.1:10001", nil, &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(PoolRebuildOpCodeStart), + }, + { + Id: test.MockUUID(2), + OpCode: uint32(PoolRebuildOpCodeStart), + }, + }, + }), + expResp: &SystemRebuildManageResp{ + Results: []*PoolRebuildManageResult{ + { + ID: test.MockUUID(1), + OpCode: PoolRebuildOpCodeStart, + }, + { + ID: test.MockUUID(2), + OpCode: PoolRebuildOpCodeStart, + }, + }, + }, + }, + "dual pools; rebuild-stop; with errors": { + req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStop}, + uResp: MockMSResponse("10.0.0.1:10001", nil, &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(PoolRebuildOpCodeStop), + Errored: true, + Msg: "fail1", + }, + { + Id: test.MockUUID(2), + OpCode: uint32(PoolRebuildOpCodeStop), + Errored: true, + Msg: "fail2", + }, + }, + }), + expResp: &SystemRebuildManageResp{ + Results: []*PoolRebuildManageResult{ + { + ID: test.MockUUID(1), + OpCode: PoolRebuildOpCodeStop, + Errored: true, + Msg: "fail1", + }, + { + ID: test.MockUUID(2), + OpCode: PoolRebuildOpCodeStop, + Errored: true, + Msg: "fail2", + }, + }, + }, + expRespErr: errors.Errorf("pool-rebuild stop failed on pool %s: %s, pool-rebuild "+ + "stop failed on pool %s: %s", test.MockUUID(1), "fail1", test.MockUUID(2), + "fail2"), + }, + } { + t.Run(name, func(t *testing.T) { + log, buf := logging.NewTestLogger(t.Name()) + defer test.ShowBufferOnFailure(t, buf) + + mi := NewMockInvoker(log, &MockInvokerConfig{ + UnaryError: tc.uErr, + UnaryResponse: tc.uResp, + }) + + gotResp, gotErr := SystemRebuildManage(test.Context(t), mi, tc.req) + test.CmpErr(t, tc.expErr, gotErr) + if tc.expErr != nil { + return + } + + cmpOpts := []cmp.Option{ + cmpopts.IgnoreUnexported(SystemRebuildManageResp{}), + } + if diff := cmp.Diff(tc.expResp, gotResp, cmpOpts...); diff != "" { + t.Fatalf("unexpected response (-want, +got):\n%s\n", diff) + } + + test.CmpErr(t, tc.expRespErr, gotResp.Errors()) + }) + } +} diff --git a/src/control/security/grpc_authorization.go b/src/control/security/grpc_authorization.go index 7acbc1277b9..ff009644418 100644 --- a/src/control/security/grpc_authorization.go +++ b/src/control/security/grpc_authorization.go @@ -53,6 +53,7 @@ var methodAuthorizations = map[string][]Component{ "/mgmt.MgmtSvc/SystemStop": {ComponentAdmin}, "/mgmt.MgmtSvc/SystemExclude": {ComponentAdmin}, "/mgmt.MgmtSvc/SystemDrain": {ComponentAdmin}, + "/mgmt.MgmtSvc/SystemRebuildManage": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolCreate": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolDestroy": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolQuery": {ComponentAdmin}, diff --git a/src/control/security/grpc_authorization_test.go b/src/control/security/grpc_authorization_test.go index 3db0a31b2f9..0b4056d0f58 100644 --- a/src/control/security/grpc_authorization_test.go +++ b/src/control/security/grpc_authorization_test.go @@ -78,6 +78,7 @@ func TestSecurity_ComponentHasAccess(t *testing.T) { "/mgmt.MgmtSvc/SystemStart": {ComponentAdmin}, "/mgmt.MgmtSvc/SystemExclude": {ComponentAdmin}, "/mgmt.MgmtSvc/SystemDrain": {ComponentAdmin}, + "/mgmt.MgmtSvc/SystemRebuildManage": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolCreate": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolDestroy": {ComponentAdmin}, "/mgmt.MgmtSvc/PoolQuery": {ComponentAdmin}, diff --git a/src/control/server/mgmt_system.go b/src/control/server/mgmt_system.go index c29f041773d..0ef7609b699 100644 --- a/src/control/server/mgmt_system.go +++ b/src/control/server/mgmt_system.go @@ -1207,19 +1207,10 @@ func (svc *mgmtSvc) queryPool(ctx context.Context, id string, getEnabled bool) ( return ranklist.MustCreateRankSet(rankStr), nil } -type poolRanksMap map[string]*ranklist.RankSet - -// Build mappings of pools to any ranks that match the input filter by iterating through the pool -// service list. Identify pools by label if possible. -func (svc *mgmtSvc) getPoolRanks(ctx context.Context, filterRanks *ranklist.RankSet, getEnabled bool) ([]string, poolRanksMap, error) { +func (svc *mgmtSvc) getPoolIDs() ([]string, error) { psList, err := svc.sysdb.PoolServiceList(false) if err != nil { - return nil, nil, err - } - - filterRanksMap := make(map[ranklist.Rank]struct{}) - for _, r := range filterRanks.Ranks() { - filterRanksMap[r] = struct{}{} + return nil, err } var poolIDs []string @@ -1233,6 +1224,24 @@ func (svc *mgmtSvc) getPoolRanks(ctx context.Context, filterRanks *ranklist.Rank } sort.Strings(poolIDs) + return poolIDs, err +} + +type poolRanksMap map[string]*ranklist.RankSet + +// Build mappings of pools to any ranks that match the input filter by iterating through the pool +// service list. Identify pools by label if possible. +func (svc *mgmtSvc) getPoolRanks(ctx context.Context, filterRanks *ranklist.RankSet, getEnabled bool) ([]string, poolRanksMap, error) { + filterRanksMap := make(map[ranklist.Rank]struct{}) + for _, r := range filterRanks.Ranks() { + filterRanksMap[r] = struct{}{} + } + + poolIDs, err := svc.getPoolIDs() + if err != nil { + return nil, nil, err + } + var outPoolIDs []string poolRanks := make(poolRanksMap) @@ -1382,6 +1391,57 @@ func (svc *mgmtSvc) SystemDrain(ctx context.Context, pbReq *mgmtpb.SystemDrainRe return pbResp, nil } +// SystemRebuildManage triggers pool-rebuild operations on all pools in system. +func (svc *mgmtSvc) SystemRebuildManage(ctx context.Context, pbReq *mgmtpb.SystemRebuildManageReq) (*mgmtpb.SystemRebuildManageResp, error) { + if pbReq == nil { + return nil, errors.Errorf("nil %T", pbReq) + } + + if err := svc.checkLeaderRequest(wrapCheckerReq(pbReq)); err != nil { + return nil, err + } + + poolIDs, err := svc.getPoolIDs() + if err != nil { + return nil, err + } + if len(poolIDs) == 0 { + return nil, errors.New("no pools found to operate on") + } + + var results []*control.PoolRebuildManageResult + for _, id := range poolIDs { + opCode := control.PoolRebuildOpCode(pbReq.OpCode) + + req := &control.PoolRebuildManageReq{ + ID: id, + OpCode: opCode, + Force: pbReq.Force, + } + svc.log.Tracef("%T: %+v", req, req) + + result := &control.PoolRebuildManageResult{ + ID: id, + OpCode: opCode, + } + + if err := control.PoolRebuildManage(ctx, svc.rpcClient, req); err != nil { + result.Errored = true + result.Msg = err.Error() + } + + svc.log.Tracef("%T: %+v", result, result) + results = append(results, result) + } + + pbResp := &mgmtpb.SystemRebuildManageResp{} + if err := convert.Types(results, &pbResp.Results); err != nil { + return nil, errors.Wrapf(err, "convert %T->%T", results, pbResp.Results) + } + + return pbResp, nil +} + // ClusterEvent management service gRPC handler receives ClusterEvent requests // from control-plane instances attempting to notify the MS of a cluster event // in the DAOS system (this handler should only get called on the MS leader). diff --git a/src/control/server/mgmt_system_test.go b/src/control/server/mgmt_system_test.go index 7a81492446d..d5c03c37dd7 100644 --- a/src/control/server/mgmt_system_test.go +++ b/src/control/server/mgmt_system_test.go @@ -2725,6 +2725,8 @@ func TestServer_MgmtSvc_SystemDrain(t *testing.T) { } } +// TODO: func TestServer_MgmtSvc_SystemRebuildManage(t *testing.T) { + func TestServer_MgmtSvc_SystemErase(t *testing.T) { hr := func(a int32, rrs ...*sharedpb.RankResult) *control.HostResponse { return &control.HostResponse{ diff --git a/src/control/server/storage/mocks.go b/src/control/server/storage/mocks.go index 0110bd5f51a..3d1647ad20c 100644 --- a/src/control/server/storage/mocks.go +++ b/src/control/server/storage/mocks.go @@ -231,8 +231,6 @@ func MockScmNamespaceRamdisk(varIdx ...int32) *ScmNamespace { return &ScmNamespace{ BlockDevice: "ramdisk", - // NumaNode: uint32(idx), - // Size: uint64(humanize.TByte) * uint64(idx+1), Mount: &ScmMountPoint{ Class: ClassRam, Path: fmt.Sprintf("/mnt/daos%d", idx), diff --git a/src/mgmt/pool.pb-c.c b/src/mgmt/pool.pb-c.c index 55e00aa001d..ea969075f4b 100644 --- a/src/mgmt/pool.pb-c.c +++ b/src/mgmt/pool.pb-c.c @@ -1891,19 +1891,15 @@ static const ProtobufCFieldDescriptor mgmt__pool_evict_req__field_descriptors[7] }, }; static const unsigned mgmt__pool_evict_req__field_indices_by_name[] = { - 4, /* field[4] = destroy */ - 5, /* field[5] = force_destroy */ - 3, /* field[3] = handles */ - 1, /* field[1] = id */ - 6, /* field[6] = machine */ - 2, /* field[2] = svc_ranks */ - 0, /* field[0] = sys */ -}; -static const ProtobufCIntRange mgmt__pool_evict_req__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 7 } + 4, /* field[4] = destroy */ + 5, /* field[5] = force_destroy */ + 3, /* field[3] = handles */ + 1, /* field[1] = id */ + 6, /* field[6] = machine */ + 2, /* field[2] = svc_ranks */ + 0, /* field[0] = sys */ }; +static const ProtobufCIntRange mgmt__pool_evict_req__number_ranges[1 + 1] = {{1, 0}, {0, 7}}; const ProtobufCMessageDescriptor mgmt__pool_evict_req__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, diff --git a/src/mgmt/system.pb-c.c b/src/mgmt/system.pb-c.c index 93bb19e5c07..e92a4b280fa 100644 --- a/src/mgmt/system.pb-c.c +++ b/src/mgmt/system.pb-c.c @@ -457,6 +457,132 @@ void mgmt__system_drain_resp__free_unpacked assert(message->base.descriptor == &mgmt__system_drain_resp__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } +void +mgmt__system_rebuild_manage_req__init(Mgmt__SystemRebuildManageReq *message) +{ + static const Mgmt__SystemRebuildManageReq init_value = + MGMT__SYSTEM_REBUILD_MANAGE_REQ__INIT; + *message = init_value; +} +size_t +mgmt__system_rebuild_manage_req__get_packed_size(const Mgmt__SystemRebuildManageReq *message) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_req__descriptor); + return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message)); +} +size_t +mgmt__system_rebuild_manage_req__pack(const Mgmt__SystemRebuildManageReq *message, uint8_t *out) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_req__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); +} +size_t +mgmt__system_rebuild_manage_req__pack_to_buffer(const Mgmt__SystemRebuildManageReq *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_req__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer); +} +Mgmt__SystemRebuildManageReq * +mgmt__system_rebuild_manage_req__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data) +{ + return (Mgmt__SystemRebuildManageReq *)protobuf_c_message_unpack( + &mgmt__system_rebuild_manage_req__descriptor, allocator, len, data); +} +void +mgmt__system_rebuild_manage_req__free_unpacked(Mgmt__SystemRebuildManageReq *message, + ProtobufCAllocator *allocator) +{ + if (!message) + return; + assert(message->base.descriptor == &mgmt__system_rebuild_manage_req__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); +} +void +mgmt__pool_rebuild_manage_result__init(Mgmt__PoolRebuildManageResult *message) +{ + static const Mgmt__PoolRebuildManageResult init_value = + MGMT__POOL_REBUILD_MANAGE_RESULT__INIT; + *message = init_value; +} +size_t +mgmt__pool_rebuild_manage_result__get_packed_size(const Mgmt__PoolRebuildManageResult *message) +{ + assert(message->base.descriptor == &mgmt__pool_rebuild_manage_result__descriptor); + return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message)); +} +size_t +mgmt__pool_rebuild_manage_result__pack(const Mgmt__PoolRebuildManageResult *message, uint8_t *out) +{ + assert(message->base.descriptor == &mgmt__pool_rebuild_manage_result__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); +} +size_t +mgmt__pool_rebuild_manage_result__pack_to_buffer(const Mgmt__PoolRebuildManageResult *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &mgmt__pool_rebuild_manage_result__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer); +} +Mgmt__PoolRebuildManageResult * +mgmt__pool_rebuild_manage_result__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data) +{ + return (Mgmt__PoolRebuildManageResult *)protobuf_c_message_unpack( + &mgmt__pool_rebuild_manage_result__descriptor, allocator, len, data); +} +void +mgmt__pool_rebuild_manage_result__free_unpacked(Mgmt__PoolRebuildManageResult *message, + ProtobufCAllocator *allocator) +{ + if (!message) + return; + assert(message->base.descriptor == &mgmt__pool_rebuild_manage_result__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); +} +void +mgmt__system_rebuild_manage_resp__init(Mgmt__SystemRebuildManageResp *message) +{ + static const Mgmt__SystemRebuildManageResp init_value = + MGMT__SYSTEM_REBUILD_MANAGE_RESP__INIT; + *message = init_value; +} +size_t +mgmt__system_rebuild_manage_resp__get_packed_size(const Mgmt__SystemRebuildManageResp *message) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_resp__descriptor); + return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message)); +} +size_t +mgmt__system_rebuild_manage_resp__pack(const Mgmt__SystemRebuildManageResp *message, uint8_t *out) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_resp__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); +} +size_t +mgmt__system_rebuild_manage_resp__pack_to_buffer(const Mgmt__SystemRebuildManageResp *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &mgmt__system_rebuild_manage_resp__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer); +} +Mgmt__SystemRebuildManageResp * +mgmt__system_rebuild_manage_resp__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data) +{ + return (Mgmt__SystemRebuildManageResp *)protobuf_c_message_unpack( + &mgmt__system_rebuild_manage_resp__descriptor, allocator, len, data); +} +void +mgmt__system_rebuild_manage_resp__free_unpacked(Mgmt__SystemRebuildManageResp *message, + ProtobufCAllocator *allocator) +{ + if (!message) + return; + assert(message->base.descriptor == &mgmt__system_rebuild_manage_resp__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); +} void mgmt__system_query_req__init (Mgmt__SystemQueryReq *message) { @@ -1823,6 +1949,125 @@ const ProtobufCMessageDescriptor mgmt__system_drain_resp__descriptor = (ProtobufCMessageInit) mgmt__system_drain_resp__init, NULL,NULL,NULL /* reserved[123] */ }; +static const ProtobufCFieldDescriptor mgmt__system_rebuild_manage_req__field_descriptors[3] = { + { + "sys", 1, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ + offsetof(Mgmt__SystemRebuildManageReq, sys), NULL, &protobuf_c_empty_string, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "op_code", 2, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT32, 0, /* quantifier_offset */ + offsetof(Mgmt__SystemRebuildManageReq, op_code), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "force", 3, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_BOOL, 0, /* quantifier_offset */ + offsetof(Mgmt__SystemRebuildManageReq, force), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned mgmt__system_rebuild_manage_req__field_indices_by_name[] = { + 2, /* field[2] = force */ + 1, /* field[1] = op_code */ + 0, /* field[0] = sys */ +}; +static const ProtobufCIntRange mgmt__system_rebuild_manage_req__number_ranges[1 + 1] = {{1, 0}, + {0, 3}}; +const ProtobufCMessageDescriptor mgmt__system_rebuild_manage_req__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.SystemRebuildManageReq", + "SystemRebuildManageReq", + "Mgmt__SystemRebuildManageReq", + "mgmt", + sizeof(Mgmt__SystemRebuildManageReq), + 3, + mgmt__system_rebuild_manage_req__field_descriptors, + mgmt__system_rebuild_manage_req__field_indices_by_name, + 1, + mgmt__system_rebuild_manage_req__number_ranges, + (ProtobufCMessageInit)mgmt__system_rebuild_manage_req__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor mgmt__pool_rebuild_manage_result__field_descriptors[4] = { + { + "id", 1, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ + offsetof(Mgmt__PoolRebuildManageResult, id), NULL, &protobuf_c_empty_string, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "op_code", 2, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT32, 0, /* quantifier_offset */ + offsetof(Mgmt__PoolRebuildManageResult, op_code), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "errored", 3, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_BOOL, 0, /* quantifier_offset */ + offsetof(Mgmt__PoolRebuildManageResult, errored), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "msg", 4, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ + offsetof(Mgmt__PoolRebuildManageResult, msg), NULL, &protobuf_c_empty_string, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned mgmt__pool_rebuild_manage_result__field_indices_by_name[] = { + 2, /* field[2] = errored */ + 0, /* field[0] = id */ + 3, /* field[3] = msg */ + 1, /* field[1] = op_code */ +}; +static const ProtobufCIntRange mgmt__pool_rebuild_manage_result__number_ranges[1 + 1] = {{1, 0}, + {0, 4}}; +const ProtobufCMessageDescriptor mgmt__pool_rebuild_manage_result__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.PoolRebuildManageResult", + "PoolRebuildManageResult", + "Mgmt__PoolRebuildManageResult", + "mgmt", + sizeof(Mgmt__PoolRebuildManageResult), + 4, + mgmt__pool_rebuild_manage_result__field_descriptors, + mgmt__pool_rebuild_manage_result__field_indices_by_name, + 1, + mgmt__pool_rebuild_manage_result__number_ranges, + (ProtobufCMessageInit)mgmt__pool_rebuild_manage_result__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor mgmt__system_rebuild_manage_resp__field_descriptors[1] = { + { + "results", 1, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(Mgmt__SystemRebuildManageResp, n_results), + offsetof(Mgmt__SystemRebuildManageResp, results), + &mgmt__pool_rebuild_manage_result__descriptor, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned mgmt__system_rebuild_manage_resp__field_indices_by_name[] = { + 0, /* field[0] = results */ +}; +static const ProtobufCIntRange mgmt__system_rebuild_manage_resp__number_ranges[1 + 1] = {{1, 0}, + {0, 1}}; +const ProtobufCMessageDescriptor mgmt__system_rebuild_manage_resp__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.SystemRebuildManageResp", + "SystemRebuildManageResp", + "Mgmt__SystemRebuildManageResp", + "mgmt", + sizeof(Mgmt__SystemRebuildManageResp), + 1, + mgmt__system_rebuild_manage_resp__field_descriptors, + mgmt__system_rebuild_manage_resp__field_indices_by_name, + 1, + mgmt__system_rebuild_manage_resp__number_ranges, + (ProtobufCMessageInit)mgmt__system_rebuild_manage_resp__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; static const ProtobufCFieldDescriptor mgmt__system_query_req__field_descriptors[4] = { { diff --git a/src/mgmt/system.pb-c.h b/src/mgmt/system.pb-c.h index 65c9a5a4238..deee1b31bca 100644 --- a/src/mgmt/system.pb-c.h +++ b/src/mgmt/system.pb-c.h @@ -26,6 +26,9 @@ typedef struct _Mgmt__SystemExcludeResp Mgmt__SystemExcludeResp; typedef struct _Mgmt__SystemDrainReq Mgmt__SystemDrainReq; typedef struct _Mgmt__PoolRanksResp Mgmt__PoolRanksResp; typedef struct _Mgmt__SystemDrainResp Mgmt__SystemDrainResp; +typedef struct _Mgmt__SystemRebuildManageReq Mgmt__SystemRebuildManageReq; +typedef struct _Mgmt__PoolRebuildManageResult Mgmt__PoolRebuildManageResult; +typedef struct _Mgmt__SystemRebuildManageResp Mgmt__SystemRebuildManageResp; typedef struct _Mgmt__SystemQueryReq Mgmt__SystemQueryReq; typedef struct _Mgmt__SystemQueryResp Mgmt__SystemQueryResp; typedef struct _Mgmt__SystemEraseReq Mgmt__SystemEraseReq; @@ -262,9 +265,8 @@ struct _Mgmt__SystemDrainReq { PROTOBUF_C_MESSAGE_INIT (&mgmt__system_drain_req__descriptor) \ , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0 } - /* - * Response from pool-ranks operation. + * PoolRanksResp describes a response from pool-ranks operation. */ struct _Mgmt__PoolRanksResp { @@ -304,6 +306,61 @@ struct _Mgmt__SystemDrainResp { PROTOBUF_C_MESSAGE_INIT (&mgmt__system_drain_resp__descriptor) \ , 0, 0,NULL } +/* + * SystemRebuildManageReq supplies system-rebuild operational parameters. + */ +struct _Mgmt__SystemRebuildManageReq { + ProtobufCMessage base; + /* + * DAOS system name + */ + char *sys; + /* + * pool-rebuild operation to run on all pools + */ + uint32_t op_code; + /* + * Flag to indicate a forced operation + */ + protobuf_c_boolean force; +}; +#define MGMT__SYSTEM_REBUILD_MANAGE_REQ__INIT \ + {PROTOBUF_C_MESSAGE_INIT(&mgmt__system_rebuild_manage_req__descriptor), \ + (char *)protobuf_c_empty_string, 0, 0} + +/* + * PoolRebuildManageResult returns the result of a pool-rebuild-manage operation. + */ +struct _Mgmt__PoolRebuildManageResult { + ProtobufCMessage base; + /* + * Pool ID + */ + char *id; + /* + * pool-rebuild operation to run on all pools + */ + uint32_t op_code; + protobuf_c_boolean errored; + char *msg; +}; +#define MGMT__POOL_REBUILD_MANAGE_RESULT__INIT \ + {PROTOBUF_C_MESSAGE_INIT(&mgmt__pool_rebuild_manage_result__descriptor), \ + (char *)protobuf_c_empty_string, 0, 0, (char *)protobuf_c_empty_string} + +/* + * SystemRebuildManageResp returns status of system-rebuild-manage request. + */ +struct _Mgmt__SystemRebuildManageResp { + ProtobufCMessage base; + /* + * Pool-rebuild operation results. + */ + size_t n_results; + Mgmt__PoolRebuildManageResult **results; +}; +#define MGMT__SYSTEM_REBUILD_MANAGE_RESP__INIT \ + {PROTOBUF_C_MESSAGE_INIT(&mgmt__system_rebuild_manage_resp__descriptor), 0, NULL} /* * SystemQueryReq supplies system query parameters. @@ -774,6 +831,54 @@ Mgmt__SystemDrainResp * void mgmt__system_drain_resp__free_unpacked (Mgmt__SystemDrainResp *message, ProtobufCAllocator *allocator); +/* Mgmt__SystemRebuildManageReq methods */ +void +mgmt__system_rebuild_manage_req__init(Mgmt__SystemRebuildManageReq *message); +size_t +mgmt__system_rebuild_manage_req__get_packed_size(const Mgmt__SystemRebuildManageReq *message); +size_t +mgmt__system_rebuild_manage_req__pack(const Mgmt__SystemRebuildManageReq *message, uint8_t *out); +size_t +mgmt__system_rebuild_manage_req__pack_to_buffer(const Mgmt__SystemRebuildManageReq *message, + ProtobufCBuffer *buffer); +Mgmt__SystemRebuildManageReq * +mgmt__system_rebuild_manage_req__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data); +void +mgmt__system_rebuild_manage_req__free_unpacked(Mgmt__SystemRebuildManageReq *message, + ProtobufCAllocator *allocator); +/* Mgmt__PoolRebuildManageResult methods */ +void +mgmt__pool_rebuild_manage_result__init(Mgmt__PoolRebuildManageResult *message); +size_t +mgmt__pool_rebuild_manage_result__get_packed_size(const Mgmt__PoolRebuildManageResult *message); +size_t +mgmt__pool_rebuild_manage_result__pack(const Mgmt__PoolRebuildManageResult *message, uint8_t *out); +size_t +mgmt__pool_rebuild_manage_result__pack_to_buffer(const Mgmt__PoolRebuildManageResult *message, + ProtobufCBuffer *buffer); +Mgmt__PoolRebuildManageResult * +mgmt__pool_rebuild_manage_result__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data); +void +mgmt__pool_rebuild_manage_result__free_unpacked(Mgmt__PoolRebuildManageResult *message, + ProtobufCAllocator *allocator); +/* Mgmt__SystemRebuildManageResp methods */ +void +mgmt__system_rebuild_manage_resp__init(Mgmt__SystemRebuildManageResp *message); +size_t +mgmt__system_rebuild_manage_resp__get_packed_size(const Mgmt__SystemRebuildManageResp *message); +size_t +mgmt__system_rebuild_manage_resp__pack(const Mgmt__SystemRebuildManageResp *message, uint8_t *out); +size_t +mgmt__system_rebuild_manage_resp__pack_to_buffer(const Mgmt__SystemRebuildManageResp *message, + ProtobufCBuffer *buffer); +Mgmt__SystemRebuildManageResp * +mgmt__system_rebuild_manage_resp__unpack(ProtobufCAllocator *allocator, size_t len, + const uint8_t *data); +void + mgmt__system_rebuild_manage_resp__free_unpacked(Mgmt__SystemRebuildManageResp *message, + ProtobufCAllocator *allocator); /* Mgmt__SystemQueryReq methods */ void mgmt__system_query_req__init (Mgmt__SystemQueryReq *message); @@ -1049,6 +1154,12 @@ typedef void (*Mgmt__PoolRanksResp_Closure) typedef void (*Mgmt__SystemDrainResp_Closure) (const Mgmt__SystemDrainResp *message, void *closure_data); +typedef void (*Mgmt__SystemRebuildManageReq_Closure)(const Mgmt__SystemRebuildManageReq *message, + void *closure_data); +typedef void (*Mgmt__PoolRebuildManageResult_Closure)(const Mgmt__PoolRebuildManageResult *message, + void *closure_data); +typedef void (*Mgmt__SystemRebuildManageResp_Closure)(const Mgmt__SystemRebuildManageResp *message, + void *closure_data); typedef void (*Mgmt__SystemQueryReq_Closure) (const Mgmt__SystemQueryReq *message, void *closure_data); @@ -1116,6 +1227,9 @@ extern const ProtobufCMessageDescriptor mgmt__system_exclude_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__system_drain_req__descriptor; extern const ProtobufCMessageDescriptor mgmt__pool_ranks_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__system_drain_resp__descriptor; +extern const ProtobufCMessageDescriptor mgmt__system_rebuild_manage_req__descriptor; +extern const ProtobufCMessageDescriptor mgmt__pool_rebuild_manage_result__descriptor; +extern const ProtobufCMessageDescriptor mgmt__system_rebuild_manage_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__system_query_req__descriptor; extern const ProtobufCMessageDescriptor mgmt__system_query_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__system_erase_req__descriptor; diff --git a/src/proto/mgmt/mgmt.proto b/src/proto/mgmt/mgmt.proto index 047302e9c86..74d71ae0f06 100644 --- a/src/proto/mgmt/mgmt.proto +++ b/src/proto/mgmt/mgmt.proto @@ -88,6 +88,8 @@ service MgmtSvc { rpc SystemExclude(SystemExcludeReq) returns(SystemExcludeResp) {} // Drain or reintegrate DAOS ranks from all pools rpc SystemDrain(SystemDrainReq) returns (SystemDrainResp) {} + // Before interactive rebuild operation on all DAOS pools + rpc SystemRebuildManage(SystemRebuildManageReq) returns (SystemRebuildManageResp) {} // Erase DAOS system database prior to reformat rpc SystemErase(SystemEraseReq) returns(SystemEraseResp) {} // Clean up leaked resources for a given node diff --git a/src/proto/mgmt/system.proto b/src/proto/mgmt/system.proto index 8744540f55e..d1d24d50e78 100644 --- a/src/proto/mgmt/system.proto +++ b/src/proto/mgmt/system.proto @@ -90,7 +90,7 @@ message SystemDrainReq bool reint = 4; // Flag to indicate if request is for drain or reint. } -// Response from pool-ranks operation. +// PoolRanksResp describes a response from pool-ranks operation. message PoolRanksResp { string id = 1; // Pool ID @@ -104,6 +104,29 @@ message SystemDrainResp repeated PoolRanksResp responses = 2; // Response from drain or reint calls on pool-ranks. } +// SystemRebuildManageReq supplies system-rebuild operational parameters. +message SystemRebuildManageReq +{ + string sys = 1; // DAOS system name + uint32 op_code = 2; // pool-rebuild operation to run on all pools + bool force = 3; // Flag to indicate a forced operation +} + +// PoolRebuildManageResult returns the result of a pool-rebuild-manage operation. +message PoolRebuildManageResult +{ + string id = 1; // Pool ID + uint32 op_code = 2; // pool-rebuild operation to run on all pools + bool errored = 3; + string msg = 4; +} + +// SystemRebuildManageResp returns status of system-rebuild-manage request. +message SystemRebuildManageResp +{ + repeated PoolRebuildManageResult results = 1; // Pool-rebuild operation results. +} + // SystemQueryReq supplies system query parameters. message SystemQueryReq { string sys = 1; // DAOS system name From 1fe4cd918aeb5eed20c46013c941e85002663217 Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Wed, 17 Sep 2025 10:50:48 +0100 Subject: [PATCH 2/3] add mgmt_system.go unit tests for pool rebuild manage Features: control Allow-unstable-test: true Signed-off-by: Tom Nabarro --- src/control/lib/control/pool.go | 17 ++- src/control/server/mgmt_system_test.go | 195 ++++++++++++++++++++++++- 2 files changed, 210 insertions(+), 2 deletions(-) diff --git a/src/control/lib/control/pool.go b/src/control/lib/control/pool.go index fed90473447..c01770c114c 100644 --- a/src/control/lib/control/pool.go +++ b/src/control/lib/control/pool.go @@ -1397,5 +1397,20 @@ func PoolRebuildManage(ctx context.Context, rpcClient UnaryInvoker, req *PoolReb return err } - return errors.Wrapf(ur.getMSError(), "pool-rebuild %s failed", req.OpCode) + msg := fmt.Sprintf("pool-rebuild %s failed", req.OpCode) + msErr := ur.getMSError() + if msErr != nil { + return errors.Wrap(msErr, msg) + } + resp := new(mgmtpb.DaosResp) + if err := convertMSResponse(ur, resp); err != nil { + return errors.Wrap(err, msg) + } + + rpcClient.Debugf("resp: %+v", resp) + if s := daos.Status(resp.Status); s != daos.Success { + return s + } + + return nil } diff --git a/src/control/server/mgmt_system_test.go b/src/control/server/mgmt_system_test.go index d5c03c37dd7..9d17a4ef85f 100644 --- a/src/control/server/mgmt_system_test.go +++ b/src/control/server/mgmt_system_test.go @@ -2725,7 +2725,200 @@ func TestServer_MgmtSvc_SystemDrain(t *testing.T) { } } -// TODO: func TestServer_MgmtSvc_SystemRebuildManage(t *testing.T) { +func TestServer_MgmtSvc_SystemRebuildManage(t *testing.T) { + for name, tc := range map[string]struct { + req *mgmtpb.SystemRebuildManageReq + useLabels bool + pools []string + mic *control.MockInvokerConfig // For control-API PoolRebuildStart/Stop + expCtlApiCount int + expErr error + expResp *mgmtpb.SystemRebuildManageResp + }{ + "nil req": { + req: (*mgmtpb.SystemRebuildManageReq)(nil), + expErr: errors.New("nil *mgmt.SystemRebuildManageReq"), + }, + "not system leader": { + req: &mgmtpb.SystemRebuildManageReq{Sys: "quack"}, + expErr: FaultWrongSystem("quack", build.DefaultSystemName), + }, + "local failure on pool rebuild start": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + pools: []string{test.MockUUID(1)}, + mic: &control.MockInvokerConfig{ + UnaryError: errors.New("local failed"), + }, + expResp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(control.PoolRebuildOpCodeStart), + Errored: true, + Msg: "local failed", + }, + }, + }, + }, + "remote failure on pool rebuild stop": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + pools: []string{test.MockUUID(1)}, + mic: &control.MockInvokerConfig{ + UnaryResponseSet: []*control.UnaryResponse{ + control.MockMSResponse("host1", errors.New("remote failed"), + nil), + }, + }, + expResp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(control.PoolRebuildOpCodeStop), + Errored: true, + Msg: "pool-rebuild stop failed: remote failed", + }, + }, + }, + expCtlApiCount: 1, + }, + "start pool rebuild on one pool": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + pools: []string{test.MockUUID(1)}, + mic: &control.MockInvokerConfig{ + UnaryResponseSet: []*control.UnaryResponse{ + control.MockMSResponse("host1", nil, &mgmtpb.DaosResp{}), + }, + }, + expResp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + }, + }, + expCtlApiCount: 1, + }, + "stop pool rebuild fails on one pool": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + pools: []string{test.MockUUID(1)}, + mic: &control.MockInvokerConfig{ + UnaryResponseSet: []*control.UnaryResponse{ + control.MockMSResponse("host1", nil, &mgmtpb.DaosResp{ + Status: -1, + }), + }, + }, + expResp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: test.MockUUID(1), + OpCode: uint32(control.PoolRebuildOpCodeStop), + Errored: true, + Msg: "DER_UNKNOWN(-1): Unknown error code -1", + }, + }, + }, + expCtlApiCount: 1, + }, + "start pool rebuild results on multiple pools; use label identifiers": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + useLabels: true, + pools: []string{test.MockUUID(3), test.MockUUID(2), test.MockUUID(1)}, + mic: &control.MockInvokerConfig{ + UnaryResponseSet: []*control.UnaryResponse{ + control.MockMSResponse("host1", nil, &mgmtpb.DaosResp{}), + control.MockMSResponse("host1", nil, &mgmtpb.DaosResp{ + Status: -1, + }), + control.MockMSResponse("host1", nil, &mgmtpb.DaosResp{}), + }, + }, + expResp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + // Verify label used instead of UUID. + Id: strings.Split(test.MockUUID(1), "-")[0], + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + { + Id: strings.Split(test.MockUUID(2), "-")[0], + OpCode: uint32(control.PoolRebuildOpCodeStart), + Errored: true, + Msg: "DER_UNKNOWN(-1): Unknown error code -1", + }, + { + Id: strings.Split(test.MockUUID(3), "-")[0], + OpCode: uint32(control.PoolRebuildOpCodeStart), + }, + }, + }, + expCtlApiCount: 3, + }, + } { + t.Run(name, func(t *testing.T) { + log, buf := logging.NewTestLogger(t.Name()) + defer test.ShowBufferOnFailure(t, buf) + + ctx := test.MustLogContext(t) + svc := newTestMgmtSvc(t, log) + + cfg := new(mockDrpcClientConfig) + mdc := newMockDrpcClient(cfg) + setupSvcDrpcClient(svc, 0, mdc) + + mic := tc.mic + if mic == nil { + mic = control.DefaultMockInvokerConfig() + } + mi := control.NewMockInvoker(log, mic) + svc.rpcClient = mi + + for _, uuidStr := range tc.pools { + var label string + if tc.useLabels { + label = uuidStr[:8] + } + addTestPoolService(t, svc.sysdb, &system.PoolService{ + PoolUUID: uuid.MustParse(uuidStr), + PoolLabel: label, + State: system.PoolServiceStateReady, + Replicas: []ranklist.Rank{0}, + }) + } + + if tc.req != nil && tc.req.Sys == "" { + tc.req.Sys = build.DefaultSystemName + } + + gotResp, gotErr := svc.SystemRebuildManage(ctx, tc.req) + test.CmpErr(t, tc.expErr, gotErr) + + if tc.expErr == nil { + cmpOpts := []cmp.Option{ + cmpopts.IgnoreUnexported(mgmtpb.SystemRebuildManageResp{}, + mgmtpb.PoolRebuildManageResult{}), + } + if diff := cmp.Diff(tc.expResp, gotResp, cmpOpts...); diff != "" { + t.Fatalf("unexpected response (-want, +got):\n%s\n", diff) + } + } + + test.AssertEqual(t, tc.expCtlApiCount, mi.GetInvokeCount(), + "rpc client invoke count") + }) + } +} func TestServer_MgmtSvc_SystemErase(t *testing.T) { hr := func(a int32, rrs ...*sharedpb.RankResult) *control.HostResponse { From 15899775f57966b84d21c908068417890b164e1f Mon Sep 17 00:00:00 2001 From: Tom Nabarro Date: Wed, 17 Sep 2025 18:37:53 +0100 Subject: [PATCH 3/3] update ui output Features: control Signed-off-by: Tom Nabarro --- src/control/cmd/dmg/system.go | 26 ++++-- src/control/cmd/dmg/system_test.go | 113 +++++++++++++++++++++++++ src/control/lib/control/system.go | 3 +- src/control/lib/control/system_test.go | 5 ++ src/control/server/mgmt_system.go | 2 +- src/control/server/mgmt_system_test.go | 13 +++ 6 files changed, 154 insertions(+), 8 deletions(-) diff --git a/src/control/cmd/dmg/system.go b/src/control/cmd/dmg/system.go index 70ae0f81344..2daa81b69ea 100644 --- a/src/control/cmd/dmg/system.go +++ b/src/control/cmd/dmg/system.go @@ -16,6 +16,7 @@ import ( "github.com/pkg/errors" "github.com/daos-stack/daos/src/control/cmd/dmg/pretty" + "github.com/daos-stack/daos/src/control/common" "github.com/daos-stack/daos/src/control/common/cmdutil" "github.com/daos-stack/daos/src/control/lib/control" "github.com/daos-stack/daos/src/control/lib/daos" @@ -495,7 +496,7 @@ func (cmd *systemGetAttrCmd) Execute(_ []string) error { var bld strings.Builder prettyPrintAttrs(&bld, resp.Attributes) - cmd.Infof("%s", bld.String()) + cmd.Infof("%s", bld) return nil } @@ -689,7 +690,7 @@ func (cmd *systemGetPropCmd) Execute(_ []string) error { var bld strings.Builder prettyPrintSysProps(&bld, resp.Properties) - cmd.Infof("%s", bld.String()) + cmd.Infof("%s", bld) return nil } @@ -702,11 +703,12 @@ type systemRebuildCmd struct { type systemRebuildOpCmd struct { baseCtlCmd + Verbose bool `short:"v" long:"verbose" description:"Print pool identifiers"` } func (cmd *systemRebuildOpCmd) execute(opCode control.PoolRebuildOpCode, force bool) (errOut error) { defer func() { - errOut = errors.Wrapf(errOut, "system rebuild %s failed", opCode.String()) + errOut = errors.Wrapf(errOut, "system rebuild %s failed", opCode) }() if cmd.config == nil { @@ -727,12 +729,26 @@ func (cmd *systemRebuildOpCmd) execute(opCode control.PoolRebuildOpCode, force b return cmd.OutputJSON(resp, resp.Errors()) } + // Print successful results before returning any error. + respPoolsSuccess := []string{} + for _, res := range resp.Results { + if !res.Errored { + respPoolsSuccess = append(respPoolsSuccess, res.ID) + } + } + msg := fmt.Sprintf("System-rebuild %s request succeeded", opCode) + pStr := common.Pluralise("pool", len(respPoolsSuccess)) + if cmd.Verbose { + cmd.Infof("%s on %s %v", msg, pStr, respPoolsSuccess) + } else { + cmd.Infof("%s on %d %s", msg, len(respPoolsSuccess), pStr) + } + if resp.Errors() != nil { return errors.Wrapf(resp.Errors(), "System-rebuild %s request failed", - opCode.String()) + opCode) } - cmd.Infof("System-rebuild %s request succeeded", opCode.String()) return nil } diff --git a/src/control/cmd/dmg/system_test.go b/src/control/cmd/dmg/system_test.go index 2f1c1838060..aa312570126 100644 --- a/src/control/cmd/dmg/system_test.go +++ b/src/control/cmd/dmg/system_test.go @@ -592,3 +592,116 @@ func TestDmg_systemStartCmd(t *testing.T) { }) } } + +func TestDmg_systemRebuildOpCmd_execute(t *testing.T) { + for name, tc := range map[string]struct { + ctlCfg *control.Config + opCode control.PoolRebuildOpCode + force bool + verbose bool + resp *mgmtpb.SystemRebuildManageResp + msErr error + expErr error + expInfo string + }{ + "no config": { + opCode: control.PoolRebuildOpCodeStop, + expErr: errors.New("system rebuild stop failed: no configuration loaded"), + }, + "ms failures": { + ctlCfg: &control.Config{}, + resp: &mgmtpb.SystemRebuildManageResp{}, + msErr: errors.New("failed"), + expErr: errors.New("failed"), + }, + "no pools": { + ctlCfg: &control.Config{}, + opCode: control.PoolRebuildOpCodeStop, + resp: &mgmtpb.SystemRebuildManageResp{}, + expInfo: "System-rebuild stop request succeeded on 0 pools", + }, + "no pools; verbose": { + ctlCfg: &control.Config{}, + opCode: control.PoolRebuildOpCodeStart, + verbose: true, + resp: &mgmtpb.SystemRebuildManageResp{}, + expInfo: "System-rebuild start request succeeded on pools []", + }, + "pool stop failed": { + ctlCfg: &control.Config{}, + opCode: control.PoolRebuildOpCodeStop, + resp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Errored: true, + Msg: "failed", + Id: "foo", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + { + Errored: true, + Msg: "failed", + Id: "bar", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + { + Id: "baz", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + }, + }, + expErr: errors.New("failed on pool foo: failed, pool-rebuild stop failed on pool bar"), + expInfo: "System-rebuild stop request succeeded on 1 pool", + }, + "pool start succeeded; verbose": { + ctlCfg: &control.Config{}, + opCode: control.PoolRebuildOpCodeStart, + verbose: true, + resp: &mgmtpb.SystemRebuildManageResp{ + Results: []*mgmtpb.PoolRebuildManageResult{ + { + Id: "foo", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + { + Id: "bar", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + { + Id: "baz", + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + }, + }, + expInfo: "System-rebuild start request succeeded on pools [foo bar baz]", + }, + } { + t.Run(name, func(t *testing.T) { + log, buf := logging.NewTestLogger(t.Name()) + defer test.ShowBufferOnFailure(t, buf) + + mi := control.NewMockInvoker(log, &control.MockInvokerConfig{ + UnaryResponse: control.MockMSResponse("10.0.0.1:10001", + tc.msErr, tc.resp), + }) + + rbldCmd := new(systemRebuildOpCmd) + rbldCmd.setInvoker(mi) + rbldCmd.SetLog(log) + rbldCmd.setConfig(tc.ctlCfg) + rbldCmd.Verbose = tc.verbose + + gotErr := rbldCmd.execute(tc.opCode, tc.force) + test.CmpErr(t, tc.expErr, gotErr) + + if !strings.Contains(buf.String(), tc.expInfo) { + t.Fatalf("expected info log output to contain %s, got %s\n", + tc.expInfo, buf.String()) + } + if tc.expInfo == "" && strings.Contains(buf.String(), "INFO") { + t.Fatalf("unexpected info log output printed, got %s\n", + buf.String()) + } + }) + } +} diff --git a/src/control/lib/control/system.go b/src/control/lib/control/system.go index 0671065aa66..18573d65734 100644 --- a/src/control/lib/control/system.go +++ b/src/control/lib/control/system.go @@ -1295,8 +1295,7 @@ func SystemRebuildManage(ctx context.Context, rpcClient UnaryInvoker, req *Syste } pbReq := &mgmtpb.SystemRebuildManageReq{ - Sys: req.getSystem(rpcClient), - //Sys: req.Sys, // getSystem() used in control API rebuild later in call-stack. + Sys: req.getSystem(rpcClient), OpCode: uint32(req.OpCode), Force: req.Force, } diff --git a/src/control/lib/control/system_test.go b/src/control/lib/control/system_test.go index fb2ecc87677..027f42ca3f0 100644 --- a/src/control/lib/control/system_test.go +++ b/src/control/lib/control/system_test.go @@ -1915,6 +1915,11 @@ func TestControl_SystemRebuildManage(t *testing.T) { uResp: MockMSResponse("host1", errors.New("remote failed"), nil), expErr: errors.New("remote failed"), }, + "no pools; rebuild-stop no-op": { + req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStop}, + uResp: MockMSResponse("10.0.0.1:10001", nil, &mgmtpb.SystemRebuildManageResp{}), + expResp: &SystemRebuildManageResp{}, + }, "dual pools; rebuild-start": { req: &SystemRebuildManageReq{OpCode: PoolRebuildOpCodeStart}, uResp: MockMSResponse("10.0.0.1:10001", nil, &mgmtpb.SystemRebuildManageResp{ diff --git a/src/control/server/mgmt_system.go b/src/control/server/mgmt_system.go index 0ef7609b699..9fa520f1d9f 100644 --- a/src/control/server/mgmt_system.go +++ b/src/control/server/mgmt_system.go @@ -1406,7 +1406,7 @@ func (svc *mgmtSvc) SystemRebuildManage(ctx context.Context, pbReq *mgmtpb.Syste return nil, err } if len(poolIDs) == 0 { - return nil, errors.New("no pools found to operate on") + return &mgmtpb.SystemRebuildManageResp{}, nil // Successful no-op. } var results []*control.PoolRebuildManageResult diff --git a/src/control/server/mgmt_system_test.go b/src/control/server/mgmt_system_test.go index 9d17a4ef85f..046788f4ccc 100644 --- a/src/control/server/mgmt_system_test.go +++ b/src/control/server/mgmt_system_test.go @@ -2785,6 +2785,19 @@ func TestServer_MgmtSvc_SystemRebuildManage(t *testing.T) { }, expCtlApiCount: 1, }, + "stop pool rebuild on no pools": { + req: &mgmtpb.SystemRebuildManageReq{ + OpCode: uint32(control.PoolRebuildOpCodeStop), + }, + // Verify this doesn't get called by returning error. + mic: &control.MockInvokerConfig{ + UnaryResponseSet: []*control.UnaryResponse{ + control.MockMSResponse("host1", errors.New("remote failed"), + nil), + }, + }, + expResp: &mgmtpb.SystemRebuildManageResp{}, + }, "start pool rebuild on one pool": { req: &mgmtpb.SystemRebuildManageReq{ OpCode: uint32(control.PoolRebuildOpCodeStart),