From 39889014d30fc101eff7fa3ce7a10598e2c64932 Mon Sep 17 00:00:00 2001 From: Michael MacDonald Date: Tue, 18 Jun 2024 17:59:45 +0000 Subject: [PATCH] DAOS-16070 tools: Include BuildInfo field in version output When available, include more detailed build information in the version output (most recent tag, etc). Adds build details to the GetAttachInfo response message in order to provide server build info to the dmg, daos_agent, and daos tools (accessible via server-version subcommand). Features: control Required-githooks: true Change-Id: Ia22a6f8007ece7fbf7f801cb9d48826aeae87485 Signed-off-by: Michael MacDonald --- src/control/SConscript | 13 + src/control/build/string.go | 34 +- src/control/build/variables.go | 4 +- src/control/cmd/daos/main.go | 46 ++- src/control/cmd/daos/util.go | 22 +- src/control/cmd/daos_agent/attachinfo.go | 24 +- src/control/cmd/daos_agent/main.go | 57 +++- src/control/cmd/daos_agent/mgmt_rpc_test.go | 10 +- src/control/cmd/dmg/command_test.go | 4 +- src/control/cmd/dmg/main.go | 76 +++-- .../cmd/drpc_test/hello/drpc_test.pb.go | 306 +++++++++++++++++ src/control/common/proto/logging.go | 4 +- src/control/common/proto/mgmt/addons.go | 21 ++ src/control/common/proto/mgmt/svc.pb.go | 311 ++++++++++++------ src/control/lib/control/network.go | 34 +- src/control/server/mgmt_system.go | 9 + src/include/daos_mgmt.h | 14 + src/mgmt/cli_mgmt.c | 21 ++ src/mgmt/svc.pb-c.c | 250 ++++++++------ src/mgmt/svc.pb-c.h | 45 ++- src/proto/mgmt/svc.proto | 10 + 21 files changed, 1028 insertions(+), 287 deletions(-) create mode 100644 src/control/cmd/drpc_test/hello/drpc_test.pb.go diff --git a/src/control/SConscript b/src/control/SConscript index c4864d9ff9f..dc435dc1303 100644 --- a/src/control/SConscript +++ b/src/control/SConscript @@ -2,6 +2,7 @@ # pylint: disable=too-many-locals import os import socket +import subprocess # nosec from binascii import b2a_hex from datetime import datetime, timezone from os import urandom @@ -45,6 +46,16 @@ def gen_build_id(): return '0x' + buildid.decode() +def get_build_info(): + """Attempt to retrieve commit/tag details from the build environment.""" + try: + cmd = subprocess.run(['git', 'describe', '--tags', '--dirty', '--always'], + stdout=subprocess.PIPE, check=True) # nosec + except (subprocess.CalledProcessError, FileNotFoundError): + return '' + return cmd.stdout.decode().strip() + + def go_ldflags(benv): "Create the ldflags option for the Go build." @@ -52,6 +63,7 @@ def go_ldflags(benv): if not is_release_build(benv): build_host = socket.getfqdn() build_time = datetime.now(timezone.utc).astimezone().isoformat() + build_info = get_build_info() Import('daos_version', 'conf_dir') path = 'github.com/daos-stack/daos/src/control/build' return ' '.join([f'-X {path}.DaosVersion={daos_version}', @@ -59,6 +71,7 @@ def go_ldflags(benv): f'-X {path}.BuildHost={build_host}', # NB: dynamic values should be enclosed in $(...$) # to avoid unnecessary rebuilds + f'-X $({path}.BuildInfo={build_info}$)', f'-X $({path}.BuildTime={build_time}$)', f'-B $({gen_build_id()}$)']) diff --git a/src/control/build/string.go b/src/control/build/string.go index b4b372312a8..4aaf4a8072e 100644 --- a/src/control/build/string.go +++ b/src/control/build/string.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2023 Intel Corporation. +// (C) Copyright 2023-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -36,7 +36,24 @@ func revString(version string) string { // String returns a string containing the name, version, and for non-release builds, // the revision of the binary. func String(name string) string { - return fmt.Sprintf("%s version %s", name, revString(DaosVersion)) + return VersionString(name, revString(DaosVersion)) +} + +// VersionString returns a string concatenation of the supplied name and version. +func VersionString(name, version string) string { + return fmt.Sprintf("%s version %s", name, version) +} + +// Info contains a structured representation of the binary build info. +type Info struct { + Name string `json:"name"` + Version string `json:"version"` + Revision string `json:"revision,omitempty"` + Dirty bool `json:"dirty,omitempty"` + Release bool `json:"release,omitempty"` + BuildHost string `json:"build_host,omitempty"` + BuildTime *time.Time `json:"build_time,omitempty"` + BuildInfo string `json:"build_info,omitempty"` } // MarshalJSON returns a JSON string containing a structured representation of @@ -45,21 +62,14 @@ func MarshalJSON(name string) ([]byte, error) { // Not a fatal error if the build time can't be parsed. buildTime, _ := time.Parse(time.RFC3339, BuildTime) - return json.Marshal(&struct { - Name string `json:"name"` - Version string `json:"version"` - Revision string `json:"revision,omitempty"` - Dirty bool `json:"dirty,omitempty"` - Release bool `json:"release,omitempty"` - BuildHost string `json:"build_host,omitempty"` - BuildTime time.Time `json:"build_time,omitempty"` - }{ + return json.Marshal(&Info{ Name: name, Version: DaosVersion, Revision: Revision, Dirty: DirtyBuild, Release: ReleaseBuild, BuildHost: BuildHost, - BuildTime: buildTime, + BuildTime: &buildTime, + BuildInfo: BuildInfo, }) } diff --git a/src/control/build/variables.go b/src/control/build/variables.go index 1a140d3b487..7be2e8b3ecf 100644 --- a/src/control/build/variables.go +++ b/src/control/build/variables.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2020-2023 Intel Corporation. +// (C) Copyright 2020-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -18,6 +18,8 @@ var ( BuildTime = "" // BuildHost should be set via linker flag using the value of BUILD_HOST. BuildHost = "" + // BuildInfo should be set via linker flag using the value of BUILD_INFO. + BuildInfo = "" // ControlPlaneName defines a consistent name for the control plane server. ControlPlaneName = "DAOS Control Server" // DataPlaneName defines a consistent name for the engine. diff --git a/src/control/cmd/daos/main.go b/src/control/cmd/daos/main.go index 377aa22ad1e..62de510eb4d 100644 --- a/src/control/cmd/daos/main.go +++ b/src/control/cmd/daos/main.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2021-2023 Intel Corporation. +// (C) Copyright 2021-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -24,16 +24,17 @@ import ( ) type cliOptions struct { - Debug bool `long:"debug" description:"enable debug output"` - Verbose bool `long:"verbose" description:"enable verbose output (when applicable)"` - JSON bool `long:"json" short:"j" description:"enable JSON output"` - Container containerCmd `command:"container" alias:"cont" description:"perform tasks related to DAOS containers"` - Pool poolCmd `command:"pool" description:"perform tasks related to DAOS pools"` - Filesystem fsCmd `command:"filesystem" alias:"fs" description:"POSIX filesystem operations"` - Object objectCmd `command:"object" alias:"obj" description:"DAOS object operations"` - System systemCmd `command:"system" alias:"sys" description:"DAOS system operations"` - Version versionCmd `command:"version" description:"print daos version"` - ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` + Debug bool `long:"debug" description:"enable debug output"` + Verbose bool `long:"verbose" description:"enable verbose output (when applicable)"` + JSON bool `long:"json" short:"j" description:"enable JSON output"` + Container containerCmd `command:"container" alias:"cont" description:"perform tasks related to DAOS containers"` + Pool poolCmd `command:"pool" description:"perform tasks related to DAOS pools"` + Filesystem fsCmd `command:"filesystem" alias:"fs" description:"POSIX filesystem operations"` + Object objectCmd `command:"object" alias:"obj" description:"DAOS object operations"` + System systemCmd `command:"system" alias:"sys" description:"DAOS system operations"` + Version versionCmd `command:"version" description:"print daos version"` + ServerVersion serverVersionCmd `command:"server-version" description:"Print server version"` + ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` } type versionCmd struct { @@ -54,6 +55,29 @@ func (cmd *versionCmd) Execute(_ []string) error { return nil } +type serverVersionCmd struct { + daosCmd + cmdutil.JSONOutputCmd +} + +func (cmd *serverVersionCmd) Execute(_ []string) error { + buildInfo, err := srvBuildInfo() + if err != nil { + return errors.Wrap(err, "failed to get server build info") + } + + if cmd.JSONOutputEnabled() { + buf, err := json.Marshal(buildInfo) + if err != nil { + return err + } + return cmd.OutputJSON(json.RawMessage(buf), nil) + } + + _, err = fmt.Println(build.VersionString(build.ControlPlaneName, buildInfo.Version)) + return err +} + func exitWithError(log logging.Logger, err error) { cmdName := path.Base(os.Args[0]) log.Errorf("%s: %v", cmdName, err) diff --git a/src/control/cmd/daos/util.go b/src/control/cmd/daos/util.go index e9334c0f110..ab25045c0aa 100644 --- a/src/control/cmd/daos/util.go +++ b/src/control/cmd/daos/util.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2021-2023 Intel Corporation. +// (C) Copyright 2021-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -17,6 +17,7 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" + "github.com/daos-stack/daos/src/control/build" "github.com/daos-stack/daos/src/control/common/cmdutil" "github.com/daos-stack/daos/src/control/lib/daos" "github.com/daos-stack/daos/src/control/logging" @@ -62,6 +63,25 @@ func apiVersion() string { ) } +func srvBuildInfo() (*build.Info, error) { + var major uint32 + var minor uint32 + var patch uint32 + var tagPtr *C.char + + rc := C.dc_mgmt_srv_version((*C.uint)(&major), (*C.uint)(&minor), (*C.uint)(&patch), &tagPtr) + if err := daosError(rc); err != nil { + return nil, err + } + tagStr := C.GoString(tagPtr) + + return &build.Info{ + Name: build.ControlPlaneName, + Version: (&build.Version{Major: int(major), Minor: int(minor), Patch: int(patch)}).String(), + BuildInfo: tagStr, + }, nil +} + func daosError(rc C.int) error { if rc == 0 { return nil diff --git a/src/control/cmd/daos_agent/attachinfo.go b/src/control/cmd/daos_agent/attachinfo.go index 4f65605656d..5499c4d1968 100644 --- a/src/control/cmd/daos_agent/attachinfo.go +++ b/src/control/cmd/daos_agent/attachinfo.go @@ -7,6 +7,7 @@ package main import ( + "context" "fmt" "os" @@ -17,11 +18,24 @@ import ( "github.com/daos-stack/daos/src/control/lib/txtfmt" ) -type dumpAttachInfoCmd struct { +type attachInfoCmd struct { configCmd ctlInvokerCmd cmdutil.LogCmd cmdutil.JSONOutputCmd +} + +func (cmd *attachInfoCmd) getAttachInfo(ctx context.Context) (*control.GetAttachInfoResp, error) { + req := &control.GetAttachInfoReq{ + AllRanks: true, + } + req.SetSystem(cmd.cfg.SystemName) + resp, err := control.GetAttachInfo(ctx, cmd.ctlInvoker, req) + return resp, errors.Wrap(err, "GetAttachInfo failed") +} + +type dumpAttachInfoCmd struct { + attachInfoCmd Output string `short:"o" long:"output" default:"stdout" description:"Dump output to this location"` } @@ -37,13 +51,9 @@ func (cmd *dumpAttachInfoCmd) Execute(_ []string) error { } ctx := cmd.MustLogCtx() - req := &control.GetAttachInfoReq{ - AllRanks: true, - } - req.SetSystem(cmd.cfg.SystemName) - resp, err := control.GetAttachInfo(ctx, cmd.ctlInvoker, req) + resp, err := cmd.getAttachInfo(ctx) if err != nil { - return errors.Wrap(err, "GetAttachInfo failed") + return err } if cmd.JSONOutputEnabled() { diff --git a/src/control/cmd/daos_agent/main.go b/src/control/cmd/daos_agent/main.go index fc961833f5f..8d38defdcc5 100644 --- a/src/control/cmd/daos_agent/main.go +++ b/src/control/cmd/daos_agent/main.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2018-2023 Intel Corporation. +// (C) Copyright 2018-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -26,20 +26,21 @@ import ( ) type cliOptions struct { - AllowProxy bool `long:"allow-proxy" description:"Allow proxy configuration via environment"` - Debug bool `short:"d" long:"debug" description:"Enable debug output"` - JSON bool `short:"j" long:"json" description:"Enable JSON output"` - JSONLogs bool `short:"J" long:"json-logging" description:"Enable JSON-formatted log output"` - ConfigPath string `short:"o" long:"config-path" description:"Path to agent configuration file"` - Insecure bool `short:"i" long:"insecure" description:"have agent attempt to connect without certificates"` - RuntimeDir string `short:"s" long:"runtime_dir" description:"Path to agent communications socket"` - LogFile string `short:"l" long:"logfile" description:"Full path and filename for daos agent log file"` - Start startCmd `command:"start" description:"Start daos_agent daemon (default behavior)"` - Version versionCmd `command:"version" description:"Print daos_agent version"` - DumpInfo dumpAttachInfoCmd `command:"dump-attachinfo" description:"Dump system attachinfo"` - DumpTopo hwprov.DumpTopologyCmd `command:"dump-topology" description:"Dump system topology"` - NetScan netScanCmd `command:"net-scan" description:"Perform local network fabric scan"` - Support supportCmd `command:"support" description:"Perform debug tasks to help support team"` + AllowProxy bool `long:"allow-proxy" description:"Allow proxy configuration via environment"` + Debug bool `short:"d" long:"debug" description:"Enable debug output"` + JSON bool `short:"j" long:"json" description:"Enable JSON output"` + JSONLogs bool `short:"J" long:"json-logging" description:"Enable JSON-formatted log output"` + ConfigPath string `short:"o" long:"config-path" description:"Path to agent configuration file"` + Insecure bool `short:"i" long:"insecure" description:"have agent attempt to connect without certificates"` + RuntimeDir string `short:"s" long:"runtime_dir" description:"Path to agent communications socket"` + LogFile string `short:"l" long:"logfile" description:"Full path and filename for daos agent log file"` + Start startCmd `command:"start" description:"Start daos_agent daemon (default behavior)"` + Version versionCmd `command:"version" description:"Print daos_agent version"` + ServerVersion serverVersionCmd `command:"server-version" description:"Print daos_server version"` + DumpInfo dumpAttachInfoCmd `command:"dump-attachinfo" description:"Dump system attachinfo"` + DumpTopo hwprov.DumpTopologyCmd `command:"dump-topology" description:"Dump system topology"` + NetScan netScanCmd `command:"net-scan" description:"Perform local network fabric scan"` + Support supportCmd `command:"support" description:"Perform debug tasks to help support team"` } type ( @@ -91,6 +92,32 @@ func (cmd *versionCmd) Execute(_ []string) error { return err } +type serverVersionCmd struct { + attachInfoCmd +} + +func (cmd *serverVersionCmd) Execute(_ []string) error { + resp, err := cmd.getAttachInfo(cmd.MustLogCtx()) + if err != nil { + return err + } + + if cmd.JSONOutputEnabled() { + buf, err := json.Marshal(&build.Info{ + Name: build.ControlPlaneName, + Version: resp.BuildInfo.VersionString(), + BuildInfo: resp.BuildInfo.Tag, + }) + if err != nil { + return err + } + return cmd.OutputJSON(json.RawMessage(buf), nil) + } + + _, err = fmt.Println(build.VersionString(build.ControlPlaneName, resp.BuildInfo.VersionString())) + return err +} + func exitWithError(log logging.Logger, err error) { log.Errorf("%s: %v", path.Base(os.Args[0]), err) os.Exit(1) diff --git a/src/control/cmd/daos_agent/mgmt_rpc_test.go b/src/control/cmd/daos_agent/mgmt_rpc_test.go index 965f3dc47c9..ec98ff29ed5 100644 --- a/src/control/cmd/daos_agent/mgmt_rpc_test.go +++ b/src/control/cmd/daos_agent/mgmt_rpc_test.go @@ -13,7 +13,6 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "github.com/pkg/errors" "golang.org/x/sys/unix" "google.golang.org/protobuf/proto" @@ -218,11 +217,10 @@ func TestAgent_mgmtModule_getAttachInfo(t *testing.T) { if err != nil { t.Fatal(err) } - if diff := cmp.Diff(tc.expResp, resp, cmpopts.IgnoreUnexported( - mgmtpb.GetAttachInfoResp{}, - mgmtpb.GetAttachInfoResp_RankUri{}, - mgmtpb.ClientNetHint{}, - )); diff != "" { + cmpOpts := cmp.Options{ + protocmp.Transform(), + } + if diff := cmp.Diff(tc.expResp, resp, cmpOpts...); diff != "" { t.Fatalf("want-, got+:\n%s", diff) } }) diff --git a/src/control/cmd/dmg/command_test.go b/src/control/cmd/dmg/command_test.go index a499553374e..b8158d7c151 100644 --- a/src/control/cmd/dmg/command_test.go +++ b/src/control/cmd/dmg/command_test.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2019-2022 Intel Corporation. +// (C) Copyright 2019-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -173,6 +173,8 @@ func (bci *bridgeConnInvoker) InvokeUnaryRPC(ctx context.Context, uReq control.U resp = control.MockMSResponse("", nil, &mgmtpb.DaosResp{}) case *control.SystemGetPropReq: resp = control.MockMSResponse("", nil, &mgmtpb.SystemGetPropResp{}) + case *control.GetAttachInfoReq: + resp = control.MockMSResponse("", nil, &mgmtpb.GetAttachInfoResp{}) case *control.NetworkScanReq: resp = &control.UnaryResponse{ Responses: []*control.HostResponse{ diff --git a/src/control/cmd/dmg/main.go b/src/control/cmd/dmg/main.go index a15c65867a4..be8c663c130 100644 --- a/src/control/cmd/dmg/main.go +++ b/src/control/cmd/dmg/main.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2018-2023 Intel Corporation. +// (C) Copyright 2018-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -109,26 +109,27 @@ func (c *cfgCmd) setConfig(cfg *control.Config) { } type cliOptions struct { - AllowProxy bool `long:"allow-proxy" description:"Allow proxy configuration via environment"` - HostList ui.HostSetFlag `short:"l" long:"host-list" hidden:"true" description:"DEPRECATED: A comma separated list of addresses to connect to"` - Insecure bool `short:"i" long:"insecure" description:"Have dmg attempt to connect without certificates"` - Debug bool `short:"d" long:"debug" description:"Enable debug output"` - LogFile string `long:"log-file" description:"Log command output to the specified file"` - JSON bool `short:"j" long:"json" description:"Enable JSON output"` - JSONLogs bool `short:"J" long:"json-logging" description:"Enable JSON-formatted log output"` - ConfigPath string `short:"o" long:"config-path" description:"Client config file path"` - Server serverCmd `command:"server" alias:"srv" description:"Perform tasks related to remote servers"` - Storage storageCmd `command:"storage" alias:"sto" description:"Perform tasks related to storage attached to remote servers"` - Config configCmd `command:"config" alias:"cfg" description:"Perform tasks related to configuration of hardware on remote servers"` - System SystemCmd `command:"system" alias:"sys" description:"Perform distributed tasks related to DAOS system"` - Network NetCmd `command:"network" alias:"net" description:"Perform tasks related to network devices attached to remote servers"` - Support supportCmd `command:"support" alias:"supp" description:"Perform debug tasks to help support team"` - Pool PoolCmd `command:"pool" description:"Perform tasks related to DAOS pools"` - Cont ContCmd `command:"container" alias:"cont" description:"Perform tasks related to DAOS containers"` - Version versionCmd `command:"version" description:"Print dmg version"` - Telemetry telemCmd `command:"telemetry" alias:"telem" description:"Perform telemetry operations"` - firmwareOption // build with tag "firmware" to enable - ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` + AllowProxy bool `long:"allow-proxy" description:"Allow proxy configuration via environment"` + HostList ui.HostSetFlag `short:"l" long:"host-list" hidden:"true" description:"DEPRECATED: A comma separated list of addresses to connect to"` + Insecure bool `short:"i" long:"insecure" description:"Have dmg attempt to connect without certificates"` + Debug bool `short:"d" long:"debug" description:"Enable debug output"` + LogFile string `long:"log-file" description:"Log command output to the specified file"` + JSON bool `short:"j" long:"json" description:"Enable JSON output"` + JSONLogs bool `short:"J" long:"json-logging" description:"Enable JSON-formatted log output"` + ConfigPath string `short:"o" long:"config-path" description:"Client config file path"` + Server serverCmd `command:"server" alias:"srv" description:"Perform tasks related to remote servers"` + Storage storageCmd `command:"storage" alias:"sto" description:"Perform tasks related to storage attached to remote servers"` + Config configCmd `command:"config" alias:"cfg" description:"Perform tasks related to configuration of hardware on remote servers"` + System SystemCmd `command:"system" alias:"sys" description:"Perform distributed tasks related to DAOS system"` + Network NetCmd `command:"network" alias:"net" description:"Perform tasks related to network devices attached to remote servers"` + Support supportCmd `command:"support" alias:"supp" description:"Perform debug tasks to help support team"` + Pool PoolCmd `command:"pool" description:"Perform tasks related to DAOS pools"` + Cont ContCmd `command:"container" alias:"cont" description:"Perform tasks related to DAOS containers"` + Version versionCmd `command:"version" description:"Print dmg version"` + ServerVersion serverVersionCmd `command:"server-version" description:"Print server version"` + Telemetry telemCmd `command:"telemetry" alias:"telem" description:"Perform telemetry operations"` + firmwareOption // build with tag "firmware" to enable + ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` } type versionCmd struct { @@ -149,6 +150,39 @@ func (cmd *versionCmd) Execute(_ []string) error { return nil } +type serverVersionCmd struct { + baseCmd + cfgCmd + ctlInvokerCmd + cmdutil.JSONOutputCmd +} + +func (cmd *serverVersionCmd) Execute(_ []string) error { + req := &control.GetAttachInfoReq{ + AllRanks: true, + } + req.SetSystem(cmd.config.SystemName) + resp, err := control.GetAttachInfo(cmd.MustLogCtx(), cmd.ctlInvoker, req) + if err != nil { + return errors.Wrap(err, "GetAttachInfo failed") + } + + if cmd.JSONOutputEnabled() { + buf, err := json.Marshal(&build.Info{ + Name: build.ControlPlaneName, + Version: resp.BuildInfo.VersionString(), + BuildInfo: resp.BuildInfo.Tag, + }) + if err != nil { + return err + } + return cmd.OutputJSON(json.RawMessage(buf), nil) + } + + _, err = fmt.Println(build.VersionString(build.ControlPlaneName, resp.BuildInfo.VersionString())) + return err +} + func exitWithError(log logging.Logger, err error) { cmdName := path.Base(os.Args[0]) log.Errorf("%s: %v", cmdName, err) diff --git a/src/control/cmd/drpc_test/hello/drpc_test.pb.go b/src/control/cmd/drpc_test/hello/drpc_test.pb.go new file mode 100644 index 00000000000..f0d12844971 --- /dev/null +++ b/src/control/cmd/drpc_test/hello/drpc_test.pb.go @@ -0,0 +1,306 @@ +// +// (C) Copyright 2018-2022 Intel Corporation. +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.5.0 +// source: drpc_test.proto + +package hello + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Module int32 + +const ( + Module_HELLO Module = 0 +) + +// Enum value maps for Module. +var ( + Module_name = map[int32]string{ + 0: "HELLO", + } + Module_value = map[string]int32{ + "HELLO": 0, + } +) + +func (x Module) Enum() *Module { + p := new(Module) + *p = x + return p +} + +func (x Module) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Module) Descriptor() protoreflect.EnumDescriptor { + return file_drpc_test_proto_enumTypes[0].Descriptor() +} + +func (Module) Type() protoreflect.EnumType { + return &file_drpc_test_proto_enumTypes[0] +} + +func (x Module) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Module.Descriptor instead. +func (Module) EnumDescriptor() ([]byte, []int) { + return file_drpc_test_proto_rawDescGZIP(), []int{0} +} + +type Function int32 + +const ( + Function_GREETING Function = 0 +) + +// Enum value maps for Function. +var ( + Function_name = map[int32]string{ + 0: "GREETING", + } + Function_value = map[string]int32{ + "GREETING": 0, + } +) + +func (x Function) Enum() *Function { + p := new(Function) + *p = x + return p +} + +func (x Function) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Function) Descriptor() protoreflect.EnumDescriptor { + return file_drpc_test_proto_enumTypes[1].Descriptor() +} + +func (Function) Type() protoreflect.EnumType { + return &file_drpc_test_proto_enumTypes[1] +} + +func (x Function) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Function.Descriptor instead. +func (Function) EnumDescriptor() ([]byte, []int) { + return file_drpc_test_proto_rawDescGZIP(), []int{1} +} + +type Hello struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Hello) Reset() { + *x = Hello{} + if protoimpl.UnsafeEnabled { + mi := &file_drpc_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hello) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hello) ProtoMessage() {} + +func (x *Hello) ProtoReflect() protoreflect.Message { + mi := &file_drpc_test_proto_msgTypes[0] + 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 Hello.ProtoReflect.Descriptor instead. +func (*Hello) Descriptor() ([]byte, []int) { + return file_drpc_test_proto_rawDescGZIP(), []int{0} +} + +func (x *Hello) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type HelloResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` +} + +func (x *HelloResponse) Reset() { + *x = HelloResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_drpc_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelloResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelloResponse) ProtoMessage() {} + +func (x *HelloResponse) ProtoReflect() protoreflect.Message { + mi := &file_drpc_test_proto_msgTypes[1] + 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 HelloResponse.ProtoReflect.Descriptor instead. +func (*HelloResponse) Descriptor() ([]byte, []int) { + return file_drpc_test_proto_rawDescGZIP(), []int{1} +} + +func (x *HelloResponse) GetGreeting() string { + if x != nil { + return x.Greeting + } + return "" +} + +var File_drpc_test_proto protoreflect.FileDescriptor + +var file_drpc_test_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x64, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x1b, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, + 0x6e, 0x67, 0x2a, 0x13, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x09, 0x0a, 0x05, + 0x48, 0x45, 0x4c, 0x4c, 0x4f, 0x10, 0x00, 0x2a, 0x18, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x52, 0x45, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x00, 0x42, 0x3c, 0x5a, 0x3a, 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, 0x6d, 0x64, 0x2f, + 0x64, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_drpc_test_proto_rawDescOnce sync.Once + file_drpc_test_proto_rawDescData = file_drpc_test_proto_rawDesc +) + +func file_drpc_test_proto_rawDescGZIP() []byte { + file_drpc_test_proto_rawDescOnce.Do(func() { + file_drpc_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_drpc_test_proto_rawDescData) + }) + return file_drpc_test_proto_rawDescData +} + +var file_drpc_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_drpc_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_drpc_test_proto_goTypes = []interface{}{ + (Module)(0), // 0: hello.Module + (Function)(0), // 1: hello.Function + (*Hello)(nil), // 2: hello.Hello + (*HelloResponse)(nil), // 3: hello.HelloResponse +} +var file_drpc_test_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] 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 +} + +func init() { file_drpc_test_proto_init() } +func file_drpc_test_proto_init() { + if File_drpc_test_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_drpc_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hello); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_drpc_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelloResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_drpc_test_proto_rawDesc, + NumEnums: 2, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_drpc_test_proto_goTypes, + DependencyIndexes: file_drpc_test_proto_depIdxs, + EnumInfos: file_drpc_test_proto_enumTypes, + MessageInfos: file_drpc_test_proto_msgTypes, + }.Build() + File_drpc_test_proto = out.File + file_drpc_test_proto_rawDesc = nil + file_drpc_test_proto_goTypes = nil + file_drpc_test_proto_depIdxs = nil +} diff --git a/src/control/common/proto/logging.go b/src/control/common/proto/logging.go index 4195151b246..16f4d41094a 100644 --- a/src/control/common/proto/logging.go +++ b/src/control/common/proto/logging.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2022-2023 Intel Corporation. +// (C) Copyright 2022-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -143,7 +143,7 @@ func Debug(msg proto.Message) string { for _, ru := range m.RankUris { uriRanks.Add(ranklist.Rank(ru.Rank)) } - fmt.Fprintf(&bld, "%T@%d ms:%s ranks:%s client:%+v", m, m.DataVersion, msRanks.String(), uriRanks.String(), m.ClientNetHint) + fmt.Fprintf(&bld, "%T@%d ms:%s ranks:%s client:%+v build:%s", m, m.DataVersion, msRanks.String(), uriRanks.String(), m.ClientNetHint, m.BuildInfo.BuildString()) case *mgmtpb.LeaderQueryResp: fmt.Fprintf(&bld, "%T leader:%s reps:%s", m, m.CurrentLeader, strings.Join(m.Replicas, ",")) case *sharedpb.ClusterEventReq: diff --git a/src/control/common/proto/mgmt/addons.go b/src/control/common/proto/mgmt/addons.go index e7d5af6fb3f..17655f3a238 100644 --- a/src/control/common/proto/mgmt/addons.go +++ b/src/control/common/proto/mgmt/addons.go @@ -8,6 +8,7 @@ package mgmt import ( "encoding/json" + "fmt" "github.com/google/uuid" ) @@ -213,3 +214,23 @@ func (r *ListContReq) SetSvcRanks(rl []uint32) { func (r *ListContReq) SetUUID(id uuid.UUID) { r.Id = id.String() } + +func (bi *BuildInfo) BuildString() string { + if bi == nil { + return "" + } + + baseString := bi.VersionString() + if bi.Tag != "" { + baseString += " (" + bi.Tag + ")" + } + return baseString +} + +func (bi *BuildInfo) VersionString() string { + if bi == nil { + return "" + } + + return fmt.Sprintf("%d.%d.%d", bi.Major, bi.Minor, bi.Patch) +} diff --git a/src/control/common/proto/mgmt/svc.pb.go b/src/control/common/proto/mgmt/svc.pb.go index 86c11e72f08..1c09e34db7e 100644 --- a/src/control/common/proto/mgmt/svc.pb.go +++ b/src/control/common/proto/mgmt/svc.pb.go @@ -7,7 +7,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v3.21.12 +// protoc v3.5.0 // source: mgmt/svc.proto package mgmt @@ -681,6 +681,77 @@ func (x *ClientNetHint) GetEnvVars() []string { return nil } +type BuildInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` + Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` + Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` + Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *BuildInfo) Reset() { + *x = BuildInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_svc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildInfo) ProtoMessage() {} + +func (x *BuildInfo) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_svc_proto_msgTypes[9] + 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 BuildInfo.ProtoReflect.Descriptor instead. +func (*BuildInfo) Descriptor() ([]byte, []int) { + return file_mgmt_svc_proto_rawDescGZIP(), []int{9} +} + +func (x *BuildInfo) GetMajor() uint32 { + if x != nil { + return x.Major + } + return 0 +} + +func (x *BuildInfo) GetMinor() uint32 { + if x != nil { + return x.Minor + } + return 0 +} + +func (x *BuildInfo) GetPatch() uint32 { + if x != nil { + return x.Patch + } + return 0 +} + +func (x *BuildInfo) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + type GetAttachInfoResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -694,12 +765,13 @@ type GetAttachInfoResp struct { ClientNetHint *ClientNetHint `protobuf:"bytes,4,opt,name=client_net_hint,json=clientNetHint,proto3" json:"client_net_hint,omitempty"` DataVersion uint64 `protobuf:"varint,5,opt,name=data_version,json=dataVersion,proto3" json:"data_version,omitempty"` // Version of the system database. Sys string `protobuf:"bytes,6,opt,name=sys,proto3" json:"sys,omitempty"` // Name of the DAOS system + BuildInfo *BuildInfo `protobuf:"bytes,9,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"` // Structured server build information } func (x *GetAttachInfoResp) Reset() { *x = GetAttachInfoResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[9] + mi := &file_mgmt_svc_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +784,7 @@ func (x *GetAttachInfoResp) String() string { func (*GetAttachInfoResp) ProtoMessage() {} func (x *GetAttachInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[9] + mi := &file_mgmt_svc_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +797,7 @@ func (x *GetAttachInfoResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAttachInfoResp.ProtoReflect.Descriptor instead. func (*GetAttachInfoResp) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{9} + return file_mgmt_svc_proto_rawDescGZIP(), []int{10} } func (x *GetAttachInfoResp) GetStatus() int32 { @@ -770,6 +842,13 @@ func (x *GetAttachInfoResp) GetSys() string { return "" } +func (x *GetAttachInfoResp) GetBuildInfo() *BuildInfo { + if x != nil { + return x.BuildInfo + } + return nil +} + type PrepShutdownReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -781,7 +860,7 @@ type PrepShutdownReq struct { func (x *PrepShutdownReq) Reset() { *x = PrepShutdownReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[10] + mi := &file_mgmt_svc_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -794,7 +873,7 @@ func (x *PrepShutdownReq) String() string { func (*PrepShutdownReq) ProtoMessage() {} func (x *PrepShutdownReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[10] + mi := &file_mgmt_svc_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -807,7 +886,7 @@ func (x *PrepShutdownReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PrepShutdownReq.ProtoReflect.Descriptor instead. func (*PrepShutdownReq) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{10} + return file_mgmt_svc_proto_rawDescGZIP(), []int{11} } func (x *PrepShutdownReq) GetRank() uint32 { @@ -828,7 +907,7 @@ type PingRankReq struct { func (x *PingRankReq) Reset() { *x = PingRankReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[11] + mi := &file_mgmt_svc_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -841,7 +920,7 @@ func (x *PingRankReq) String() string { func (*PingRankReq) ProtoMessage() {} func (x *PingRankReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[11] + mi := &file_mgmt_svc_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -854,7 +933,7 @@ func (x *PingRankReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRankReq.ProtoReflect.Descriptor instead. func (*PingRankReq) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{11} + return file_mgmt_svc_proto_rawDescGZIP(), []int{12} } func (x *PingRankReq) GetRank() uint32 { @@ -876,7 +955,7 @@ type SetRankReq struct { func (x *SetRankReq) Reset() { *x = SetRankReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[12] + mi := &file_mgmt_svc_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -889,7 +968,7 @@ func (x *SetRankReq) String() string { func (*SetRankReq) ProtoMessage() {} func (x *SetRankReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[12] + mi := &file_mgmt_svc_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,7 +981,7 @@ func (x *SetRankReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRankReq.ProtoReflect.Descriptor instead. func (*SetRankReq) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{12} + return file_mgmt_svc_proto_rawDescGZIP(), []int{13} } func (x *SetRankReq) GetRank() uint32 { @@ -933,7 +1012,7 @@ type PoolMonitorReq struct { func (x *PoolMonitorReq) Reset() { *x = PoolMonitorReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[13] + mi := &file_mgmt_svc_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -946,7 +1025,7 @@ func (x *PoolMonitorReq) String() string { func (*PoolMonitorReq) ProtoMessage() {} func (x *PoolMonitorReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[13] + mi := &file_mgmt_svc_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -959,7 +1038,7 @@ func (x *PoolMonitorReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PoolMonitorReq.ProtoReflect.Descriptor instead. func (*PoolMonitorReq) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{13} + return file_mgmt_svc_proto_rawDescGZIP(), []int{14} } func (x *PoolMonitorReq) GetSys() string { @@ -1003,7 +1082,7 @@ type ClientTelemetryReq struct { func (x *ClientTelemetryReq) Reset() { *x = ClientTelemetryReq{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[14] + mi := &file_mgmt_svc_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1016,7 +1095,7 @@ func (x *ClientTelemetryReq) String() string { func (*ClientTelemetryReq) ProtoMessage() {} func (x *ClientTelemetryReq) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[14] + mi := &file_mgmt_svc_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1029,7 +1108,7 @@ func (x *ClientTelemetryReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientTelemetryReq.ProtoReflect.Descriptor instead. func (*ClientTelemetryReq) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{14} + return file_mgmt_svc_proto_rawDescGZIP(), []int{15} } func (x *ClientTelemetryReq) GetSys() string { @@ -1065,7 +1144,7 @@ type ClientTelemetryResp struct { func (x *ClientTelemetryResp) Reset() { *x = ClientTelemetryResp{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[15] + mi := &file_mgmt_svc_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1078,7 +1157,7 @@ func (x *ClientTelemetryResp) String() string { func (*ClientTelemetryResp) ProtoMessage() {} func (x *ClientTelemetryResp) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[15] + mi := &file_mgmt_svc_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1091,7 +1170,7 @@ func (x *ClientTelemetryResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientTelemetryResp.ProtoReflect.Descriptor instead. func (*ClientTelemetryResp) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{15} + return file_mgmt_svc_proto_rawDescGZIP(), []int{16} } func (x *ClientTelemetryResp) GetStatus() int32 { @@ -1121,7 +1200,7 @@ type GroupUpdateReq_Engine struct { func (x *GroupUpdateReq_Engine) Reset() { *x = GroupUpdateReq_Engine{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[16] + mi := &file_mgmt_svc_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1134,7 +1213,7 @@ func (x *GroupUpdateReq_Engine) String() string { func (*GroupUpdateReq_Engine) ProtoMessage() {} func (x *GroupUpdateReq_Engine) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[16] + mi := &file_mgmt_svc_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1183,7 +1262,7 @@ type GetAttachInfoResp_RankUri struct { func (x *GetAttachInfoResp_RankUri) Reset() { *x = GetAttachInfoResp_RankUri{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_svc_proto_msgTypes[17] + mi := &file_mgmt_svc_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1196,7 +1275,7 @@ func (x *GetAttachInfoResp_RankUri) String() string { func (*GetAttachInfoResp_RankUri) ProtoMessage() {} func (x *GetAttachInfoResp_RankUri) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_svc_proto_msgTypes[17] + mi := &file_mgmt_svc_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1209,7 +1288,7 @@ func (x *GetAttachInfoResp_RankUri) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAttachInfoResp_RankUri.ProtoReflect.Descriptor instead. func (*GetAttachInfoResp_RankUri) Descriptor() ([]byte, []int) { - return file_mgmt_svc_proto_rawDescGZIP(), []int{9, 0} + return file_mgmt_svc_proto_rawDescGZIP(), []int{10, 0} } func (x *GetAttachInfoResp_RankUri) GetRank() uint32 { @@ -1303,57 +1382,67 @@ var file_mgmt_svc_proto_rawDesc = []byte{ 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x72, 0x76, 0x5f, 0x73, 0x72, 0x78, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x72, 0x76, 0x53, 0x72, 0x78, 0x53, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x22, 0xa7, 0x02, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, - 0x61, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, 0x52, - 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, 0x5f, - 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x73, 0x52, - 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, - 0x65, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, - 0x6e, 0x74, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, 0x6e, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x1a, 0x2f, 0x0a, 0x07, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x72, - 0x69, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x22, 0x25, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x53, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, - 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x21, - 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, - 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, - 0x6b, 0x22, 0x41, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, - 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, - 0x61, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x6f, 0x6e, 0x69, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6f, 0x6c, - 0x55, 0x55, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, - 0x55, 0x55, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x6f, 0x6c, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, - 0x6f, 0x6c, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, - 0x6a, 0x6f, 0x62, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, - 0x69, 0x64, 0x22, 0x55, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6c, 0x65, - 0x6d, 0x65, 0x74, 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, 0x6a, 0x6f, - 0x62, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x69, 0x64, - 0x12, 0x17, 0x0a, 0x07, 0x73, 0x68, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x73, 0x68, 0x6d, 0x4b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x13, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x55, 0x69, 0x64, 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, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x22, 0x5f, 0x0a, + 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, + 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0xe3, + 0x02, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, 0x09, + 0x72, 0x61, 0x6e, 0x6b, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, + 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x73, + 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x73, + 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, + 0x6e, 0x65, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, + 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x2e, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2f, 0x0a, 0x07, 0x52, 0x61, 0x6e, 0x6b, 0x55, + 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x22, 0x25, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x70, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x21, 0x0a, 0x0b, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, + 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x41, + 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, + 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, + 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x7c, 0x0a, 0x0e, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x79, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x55, 0x55, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x55, 0x55, 0x49, + 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x6f, 0x6c, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x55, + 0x55, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x6f, 0x6c, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6a, 0x6f, 0x62, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x69, 0x64, 0x22, + 0x55, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, + 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, 0x6a, 0x6f, 0x62, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x69, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x73, 0x68, 0x6d, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x68, 0x6d, 0x4b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x55, + 0x69, 0x64, 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 ( @@ -1369,7 +1458,7 @@ func file_mgmt_svc_proto_rawDescGZIP() []byte { } var file_mgmt_svc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_mgmt_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_mgmt_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_mgmt_svc_proto_goTypes = []interface{}{ (JoinResp_State)(0), // 0: mgmt.JoinResp.State (*DaosResp)(nil), // 1: mgmt.DaosResp @@ -1381,26 +1470,28 @@ var file_mgmt_svc_proto_goTypes = []interface{}{ (*LeaderQueryResp)(nil), // 7: mgmt.LeaderQueryResp (*GetAttachInfoReq)(nil), // 8: mgmt.GetAttachInfoReq (*ClientNetHint)(nil), // 9: mgmt.ClientNetHint - (*GetAttachInfoResp)(nil), // 10: mgmt.GetAttachInfoResp - (*PrepShutdownReq)(nil), // 11: mgmt.PrepShutdownReq - (*PingRankReq)(nil), // 12: mgmt.PingRankReq - (*SetRankReq)(nil), // 13: mgmt.SetRankReq - (*PoolMonitorReq)(nil), // 14: mgmt.PoolMonitorReq - (*ClientTelemetryReq)(nil), // 15: mgmt.ClientTelemetryReq - (*ClientTelemetryResp)(nil), // 16: mgmt.ClientTelemetryResp - (*GroupUpdateReq_Engine)(nil), // 17: mgmt.GroupUpdateReq.Engine - (*GetAttachInfoResp_RankUri)(nil), // 18: mgmt.GetAttachInfoResp.RankUri + (*BuildInfo)(nil), // 10: mgmt.BuildInfo + (*GetAttachInfoResp)(nil), // 11: mgmt.GetAttachInfoResp + (*PrepShutdownReq)(nil), // 12: mgmt.PrepShutdownReq + (*PingRankReq)(nil), // 13: mgmt.PingRankReq + (*SetRankReq)(nil), // 14: mgmt.SetRankReq + (*PoolMonitorReq)(nil), // 15: mgmt.PoolMonitorReq + (*ClientTelemetryReq)(nil), // 16: mgmt.ClientTelemetryReq + (*ClientTelemetryResp)(nil), // 17: mgmt.ClientTelemetryResp + (*GroupUpdateReq_Engine)(nil), // 18: mgmt.GroupUpdateReq.Engine + (*GetAttachInfoResp_RankUri)(nil), // 19: mgmt.GetAttachInfoResp.RankUri } var file_mgmt_svc_proto_depIdxs = []int32{ - 17, // 0: mgmt.GroupUpdateReq.engines:type_name -> mgmt.GroupUpdateReq.Engine + 18, // 0: mgmt.GroupUpdateReq.engines:type_name -> mgmt.GroupUpdateReq.Engine 0, // 1: mgmt.JoinResp.state:type_name -> mgmt.JoinResp.State - 18, // 2: mgmt.GetAttachInfoResp.rank_uris:type_name -> mgmt.GetAttachInfoResp.RankUri + 19, // 2: mgmt.GetAttachInfoResp.rank_uris:type_name -> mgmt.GetAttachInfoResp.RankUri 9, // 3: mgmt.GetAttachInfoResp.client_net_hint:type_name -> mgmt.ClientNetHint - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 10, // 4: mgmt.GetAttachInfoResp.build_info:type_name -> mgmt.BuildInfo + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_mgmt_svc_proto_init() } @@ -1518,7 +1609,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttachInfoResp); i { + switch v := v.(*BuildInfo); i { case 0: return &v.state case 1: @@ -1530,7 +1621,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrepShutdownReq); i { + switch v := v.(*GetAttachInfoResp); i { case 0: return &v.state case 1: @@ -1542,7 +1633,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRankReq); i { + switch v := v.(*PrepShutdownReq); i { case 0: return &v.state case 1: @@ -1554,7 +1645,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRankReq); i { + switch v := v.(*PingRankReq); i { case 0: return &v.state case 1: @@ -1566,7 +1657,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PoolMonitorReq); i { + switch v := v.(*SetRankReq); i { case 0: return &v.state case 1: @@ -1578,7 +1669,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientTelemetryReq); i { + switch v := v.(*PoolMonitorReq); i { case 0: return &v.state case 1: @@ -1590,7 +1681,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientTelemetryResp); i { + switch v := v.(*ClientTelemetryReq); i { case 0: return &v.state case 1: @@ -1602,7 +1693,7 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupUpdateReq_Engine); i { + switch v := v.(*ClientTelemetryResp); i { case 0: return &v.state case 1: @@ -1614,6 +1705,18 @@ func file_mgmt_svc_proto_init() { } } file_mgmt_svc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupUpdateReq_Engine); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_svc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAttachInfoResp_RankUri); i { case 0: return &v.state @@ -1632,7 +1735,7 @@ func file_mgmt_svc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_svc_proto_rawDesc, NumEnums: 1, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/src/control/lib/control/network.go b/src/control/lib/control/network.go index 30496860b98..1f090a8bf25 100644 --- a/src/control/lib/control/network.go +++ b/src/control/lib/control/network.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2018-2022 Intel Corporation. +// (C) Copyright 2018-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -224,14 +224,46 @@ type ( EnvVars []string `json:"env_vars"` } + BuildInfo struct { + Major uint32 `json:"major"` + Minor uint32 `json:"minor"` + Patch uint32 `json:"patch"` + Tag string `json:"tag,omitempty"` + } + GetAttachInfoResp struct { System string `json:"sys"` ServiceRanks []*PrimaryServiceRank `json:"rank_uris"` MSRanks []uint32 `json:"ms_ranks"` ClientNetHint ClientNetworkHint `json:"client_net_hint"` + BuildInfo BuildInfo `json:"build_info"` } ) +func (bi *BuildInfo) VersionString() string { + if bi == nil { + return "" + } + return (&mgmtpb.BuildInfo{ + Major: bi.Major, + Minor: bi.Minor, + Patch: bi.Patch, + Tag: bi.Tag, + }).VersionString() +} + +func (bi *BuildInfo) String() string { + if bi == nil { + return "" + } + return (&mgmtpb.BuildInfo{ + Major: bi.Major, + Minor: bi.Minor, + Patch: bi.Patch, + Tag: bi.Tag, + }).BuildString() +} + func (gair *GetAttachInfoResp) String() string { // gair.ServiceRanks may contain thousands of elements. Print a few // (just one!) at most to avoid flooding logs. diff --git a/src/control/server/mgmt_system.go b/src/control/server/mgmt_system.go index 2aa0f0cc058..128753495ea 100644 --- a/src/control/server/mgmt_system.go +++ b/src/control/server/mgmt_system.go @@ -87,6 +87,15 @@ func (svc *mgmtSvc) GetAttachInfo(ctx context.Context, req *mgmtpb.GetAttachInfo resp.Sys = svc.sysdb.SystemName() + if dv, err := build.NewVersion(build.DaosVersion); err == nil { + resp.BuildInfo = &mgmtpb.BuildInfo{ + Major: uint32(dv.Major), + Minor: uint32(dv.Minor), + Patch: uint32(dv.Patch), + Tag: build.BuildInfo, + } + } + return resp, nil } diff --git a/src/include/daos_mgmt.h b/src/include/daos_mgmt.h index 5a9e0e49274..f80b7b75fa1 100644 --- a/src/include/daos_mgmt.h +++ b/src/include/daos_mgmt.h @@ -134,6 +134,20 @@ int daos_mgmt_get_bs_state(const char *group, uuid_t blobstore_uuid, int *blobstore_state, daos_event_t *ev); +/** + * Query DAOS server version. + * + * \param[out] major Major version number. + * \param[out] minor Minor version number. + * \param[out] patch Patch version number. + * \param[out] tag Version tag. + * + * \return 0 Success + * + */ +int +dc_mgmt_srv_version(uint32_t *major, uint32_t *minor, uint32_t *patch, char **tag); + #if defined(__cplusplus) } #endif diff --git a/src/mgmt/cli_mgmt.c b/src/mgmt/cli_mgmt.c index bc5da348369..5ef585c2c4f 100644 --- a/src/mgmt/cli_mgmt.c +++ b/src/mgmt/cli_mgmt.c @@ -53,6 +53,27 @@ dc_deprecated(tse_task_t *task) return -DER_NOSYS; } +int +dc_mgmt_srv_version(uint32_t *major, uint32_t *minor, uint32_t *patch, char **tag) +{ + if (major == NULL || minor == NULL || patch == NULL || tag == NULL) { + D_ERROR("major, minor, patch, tag must be non-null\n"); + return -DER_INVAL; + } + + if (resp_g == NULL || resp_g->build_info == NULL) { + D_ERROR("server build info unavailable\n"); + return -DER_UNINIT; + } + + *major = resp_g->build_info->major; + *minor = resp_g->build_info->minor; + *patch = resp_g->build_info->patch; + *tag = resp_g->build_info->tag; + + return 0; +} + int dc_mgmt_profile(char *path, int avg, bool start) { diff --git a/src/mgmt/svc.pb-c.c b/src/mgmt/svc.pb-c.c index f8e4e7e5299..ea8b5b8a843 100644 --- a/src/mgmt/svc.pb-c.c +++ b/src/mgmt/svc.pb-c.c @@ -418,6 +418,44 @@ void mgmt__client_net_hint__free_unpacked assert(message->base.descriptor == &mgmt__client_net_hint__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } +void +mgmt__build_info__init(Mgmt__BuildInfo *message) +{ + static const Mgmt__BuildInfo init_value = MGMT__BUILD_INFO__INIT; + *message = init_value; +} +size_t +mgmt__build_info__get_packed_size(const Mgmt__BuildInfo *message) +{ + assert(message->base.descriptor == &mgmt__build_info__descriptor); + return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message)); +} +size_t +mgmt__build_info__pack(const Mgmt__BuildInfo *message, uint8_t *out) +{ + assert(message->base.descriptor == &mgmt__build_info__descriptor); + return protobuf_c_message_pack((const ProtobufCMessage *)message, out); +} +size_t +mgmt__build_info__pack_to_buffer(const Mgmt__BuildInfo *message, ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &mgmt__build_info__descriptor); + return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer); +} +Mgmt__BuildInfo * +mgmt__build_info__unpack(ProtobufCAllocator *allocator, size_t len, const uint8_t *data) +{ + return (Mgmt__BuildInfo *)protobuf_c_message_unpack(&mgmt__build_info__descriptor, allocator, len, + data); +} +void +mgmt__build_info__free_unpacked(Mgmt__BuildInfo *message, ProtobufCAllocator *allocator) +{ + if (!message) + return; + assert(message->base.descriptor == &mgmt__build_info__descriptor); + protobuf_c_message_free_unpacked((ProtobufCMessage *)message, allocator); +} void mgmt__get_attach_info_resp__rank_uri__init (Mgmt__GetAttachInfoResp__RankUri *message) { @@ -1462,6 +1500,52 @@ const ProtobufCMessageDescriptor mgmt__client_net_hint__descriptor = (ProtobufCMessageInit) mgmt__client_net_hint__init, NULL,NULL,NULL /* reserved[123] */ }; +static const ProtobufCFieldDescriptor mgmt__build_info__field_descriptors[4] = { + { + "major", 1, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT32, 0, /* quantifier_offset */ + offsetof(Mgmt__BuildInfo, major), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "minor", 2, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT32, 0, /* quantifier_offset */ + offsetof(Mgmt__BuildInfo, minor), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "patch", 3, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT32, 0, /* quantifier_offset */ + offsetof(Mgmt__BuildInfo, patch), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "tag", 4, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ + offsetof(Mgmt__BuildInfo, tag), NULL, &protobuf_c_empty_string, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned mgmt__build_info__field_indices_by_name[] = { + 0, /* field[0] = major */ + 1, /* field[1] = minor */ + 2, /* field[2] = patch */ + 3, /* field[3] = tag */ +}; +static const ProtobufCIntRange mgmt__build_info__number_ranges[1 + 1] = {{1, 0}, {0, 4}}; +const ProtobufCMessageDescriptor mgmt__build_info__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.BuildInfo", + "BuildInfo", + "Mgmt__BuildInfo", + "mgmt", + sizeof(Mgmt__BuildInfo), + 4, + mgmt__build_info__field_descriptors, + mgmt__build_info__field_indices_by_name, + 1, + mgmt__build_info__number_ranges, + (ProtobufCMessageInit)mgmt__build_info__init, + NULL, + NULL, + NULL /* reserved[123] */ +}; static const ProtobufCFieldDescriptor mgmt__get_attach_info_resp__rank_uri__field_descriptors[2] = { { @@ -1513,108 +1597,76 @@ const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__rank_uri__descripto (ProtobufCMessageInit) mgmt__get_attach_info_resp__rank_uri__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor mgmt__get_attach_info_resp__field_descriptors[6] = -{ - { - "status", - 1, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - offsetof(Mgmt__GetAttachInfoResp, status), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "rank_uris", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(Mgmt__GetAttachInfoResp, n_rank_uris), - offsetof(Mgmt__GetAttachInfoResp, rank_uris), - &mgmt__get_attach_info_resp__rank_uri__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ms_ranks", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - offsetof(Mgmt__GetAttachInfoResp, n_ms_ranks), - offsetof(Mgmt__GetAttachInfoResp, ms_ranks), - NULL, - NULL, - 0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "client_net_hint", - 4, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - offsetof(Mgmt__GetAttachInfoResp, client_net_hint), - &mgmt__client_net_hint__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "data_version", - 5, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_UINT64, - 0, /* quantifier_offset */ - offsetof(Mgmt__GetAttachInfoResp, data_version), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "sys", - 6, - PROTOBUF_C_LABEL_NONE, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(Mgmt__GetAttachInfoResp, sys), - NULL, - &protobuf_c_empty_string, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, +static const ProtobufCFieldDescriptor mgmt__get_attach_info_resp__field_descriptors[7] = { + { + "status", 1, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_INT32, 0, /* quantifier_offset */ + offsetof(Mgmt__GetAttachInfoResp, status), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "rank_uris", 2, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(Mgmt__GetAttachInfoResp, n_rank_uris), + offsetof(Mgmt__GetAttachInfoResp, rank_uris), + &mgmt__get_attach_info_resp__rank_uri__descriptor, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "ms_ranks", 3, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_UINT32, + offsetof(Mgmt__GetAttachInfoResp, n_ms_ranks), offsetof(Mgmt__GetAttachInfoResp, ms_ranks), + NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "client_net_hint", 4, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(Mgmt__GetAttachInfoResp, client_net_hint), &mgmt__client_net_hint__descriptor, + NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "data_version", 5, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_UINT64, 0, /* quantifier_offset */ + offsetof(Mgmt__GetAttachInfoResp, data_version), NULL, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "sys", 6, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ + offsetof(Mgmt__GetAttachInfoResp, sys), NULL, &protobuf_c_empty_string, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "build_info", 9, PROTOBUF_C_LABEL_NONE, PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ + offsetof(Mgmt__GetAttachInfoResp, build_info), &mgmt__build_info__descriptor, NULL, + 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned mgmt__get_attach_info_resp__field_indices_by_name[] = { - 3, /* field[3] = client_net_hint */ - 4, /* field[4] = data_version */ - 2, /* field[2] = ms_ranks */ - 1, /* field[1] = rank_uris */ - 0, /* field[0] = status */ - 5, /* field[5] = sys */ -}; -static const ProtobufCIntRange mgmt__get_attach_info_resp__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 6 } + 6, /* field[6] = build_info */ + 3, /* field[3] = client_net_hint */ + 4, /* field[4] = data_version */ + 2, /* field[2] = ms_ranks */ + 1, /* field[1] = rank_uris */ + 0, /* field[0] = status */ + 5, /* field[5] = sys */ }; -const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "mgmt.GetAttachInfoResp", - "GetAttachInfoResp", - "Mgmt__GetAttachInfoResp", - "mgmt", - sizeof(Mgmt__GetAttachInfoResp), - 6, - mgmt__get_attach_info_resp__field_descriptors, - mgmt__get_attach_info_resp__field_indices_by_name, - 1, mgmt__get_attach_info_resp__number_ranges, - (ProtobufCMessageInit) mgmt__get_attach_info_resp__init, - NULL,NULL,NULL /* reserved[123] */ +static const ProtobufCIntRange mgmt__get_attach_info_resp__number_ranges[2 + 1] = { + {1, 0}, {9, 6}, {0, 7}}; +const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.GetAttachInfoResp", + "GetAttachInfoResp", + "Mgmt__GetAttachInfoResp", + "mgmt", + sizeof(Mgmt__GetAttachInfoResp), + 7, + mgmt__get_attach_info_resp__field_descriptors, + mgmt__get_attach_info_resp__field_indices_by_name, + 2, + mgmt__get_attach_info_resp__number_ranges, + (ProtobufCMessageInit)mgmt__get_attach_info_resp__init, + NULL, + NULL, + NULL /* reserved[123] */ }; static const ProtobufCFieldDescriptor mgmt__prep_shutdown_req__field_descriptors[1] = { diff --git a/src/mgmt/svc.pb-c.h b/src/mgmt/svc.pb-c.h index 789a636509b..a48332e9ac6 100644 --- a/src/mgmt/svc.pb-c.h +++ b/src/mgmt/svc.pb-c.h @@ -10,7 +10,7 @@ PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. -#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. #endif @@ -25,6 +25,7 @@ typedef struct _Mgmt__LeaderQueryReq Mgmt__LeaderQueryReq; typedef struct _Mgmt__LeaderQueryResp Mgmt__LeaderQueryResp; typedef struct _Mgmt__GetAttachInfoReq Mgmt__GetAttachInfoReq; typedef struct _Mgmt__ClientNetHint Mgmt__ClientNetHint; +typedef struct _Mgmt__BuildInfo Mgmt__BuildInfo; typedef struct _Mgmt__GetAttachInfoResp Mgmt__GetAttachInfoResp; typedef struct _Mgmt__GetAttachInfoResp__RankUri Mgmt__GetAttachInfoResp__RankUri; typedef struct _Mgmt__PrepShutdownReq Mgmt__PrepShutdownReq; @@ -224,7 +225,7 @@ struct _Mgmt__ClientNetHint { ProtobufCMessage base; /* - * CaRT provider + * CaRT OFI provider */ char *provider; /* @@ -264,6 +265,18 @@ struct _Mgmt__ClientNetHint { PROTOBUF_C_MESSAGE_INIT (&mgmt__client_net_hint__descriptor) \ , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, 0, 0,NULL } +struct _Mgmt__BuildInfo { + ProtobufCMessage base; + uint32_t major; + uint32_t minor; + uint32_t patch; + char *tag; +}; +#define MGMT__BUILD_INFO__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT(&mgmt__build_info__descriptor) \ + , 0, 0, 0, (char *)protobuf_c_empty_string \ + } struct _Mgmt__GetAttachInfoResp__RankUri { @@ -306,11 +319,16 @@ struct _Mgmt__GetAttachInfoResp * Name of the DAOS system */ char *sys; + /* + * Structured server build information + */ + Mgmt__BuildInfo *build_info; }; -#define MGMT__GET_ATTACH_INFO_RESP__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&mgmt__get_attach_info_resp__descriptor) \ - , 0, 0,NULL, 0,NULL, NULL, 0, (char *)protobuf_c_empty_string } - +#define MGMT__GET_ATTACH_INFO_RESP__INIT \ + { \ + PROTOBUF_C_MESSAGE_INIT(&mgmt__get_attach_info_resp__descriptor) \ + , 0, 0, NULL, 0, NULL, NULL, 0, (char *)protobuf_c_empty_string, NULL \ + } struct _Mgmt__PrepShutdownReq { @@ -591,6 +609,19 @@ Mgmt__ClientNetHint * void mgmt__client_net_hint__free_unpacked (Mgmt__ClientNetHint *message, ProtobufCAllocator *allocator); +/* Mgmt__BuildInfo methods */ +void +mgmt__build_info__init(Mgmt__BuildInfo *message); +size_t +mgmt__build_info__get_packed_size(const Mgmt__BuildInfo *message); +size_t +mgmt__build_info__pack(const Mgmt__BuildInfo *message, uint8_t *out); +size_t +mgmt__build_info__pack_to_buffer(const Mgmt__BuildInfo *message, ProtobufCBuffer *buffer); +Mgmt__BuildInfo * +mgmt__build_info__unpack(ProtobufCAllocator *allocator, size_t len, const uint8_t *data); +void + mgmt__build_info__free_unpacked(Mgmt__BuildInfo *message, ProtobufCAllocator *allocator); /* Mgmt__GetAttachInfoResp__RankUri methods */ void mgmt__get_attach_info_resp__rank_uri__init (Mgmt__GetAttachInfoResp__RankUri *message); @@ -751,6 +782,7 @@ typedef void (*Mgmt__GetAttachInfoReq_Closure) typedef void (*Mgmt__ClientNetHint_Closure) (const Mgmt__ClientNetHint *message, void *closure_data); +typedef void (*Mgmt__BuildInfo_Closure)(const Mgmt__BuildInfo *message, void *closure_data); typedef void (*Mgmt__GetAttachInfoResp__RankUri_Closure) (const Mgmt__GetAttachInfoResp__RankUri *message, void *closure_data); @@ -790,6 +822,7 @@ extern const ProtobufCMessageDescriptor mgmt__leader_query_req__descriptor; extern const ProtobufCMessageDescriptor mgmt__leader_query_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__get_attach_info_req__descriptor; extern const ProtobufCMessageDescriptor mgmt__client_net_hint__descriptor; +extern const ProtobufCMessageDescriptor mgmt__build_info__descriptor; extern const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__descriptor; extern const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__rank_uri__descriptor; extern const ProtobufCMessageDescriptor mgmt__prep_shutdown_req__descriptor; diff --git a/src/proto/mgmt/svc.proto b/src/proto/mgmt/svc.proto index 129fecd5370..09aec256cc8 100644 --- a/src/proto/mgmt/svc.proto +++ b/src/proto/mgmt/svc.proto @@ -82,6 +82,14 @@ message ClientNetHint { repeated string env_vars = 8; // Client-side environment variables to set } +message BuildInfo +{ + uint32 major = 1; + uint32 minor = 2; + uint32 patch = 3; + string tag = 4; +} + message GetAttachInfoResp { int32 status = 1; // DAOS error code message RankUri { @@ -95,6 +103,8 @@ message GetAttachInfoResp { ClientNetHint client_net_hint = 4; uint64 data_version = 5; // Version of the system database. string sys = 6; // Name of the DAOS system + reserved 7, 8; // 2.6 servers use these for secondary attachinfo + BuildInfo build_info = 9; // Structured server build information } message PrepShutdownReq {