diff --git a/src/control/SConscript b/src/control/SConscript index 54ce6dd8b9dd..bc182be6b957 100644 --- a/src/control/SConscript +++ b/src/control/SConscript @@ -2,6 +2,7 @@ # pylint: disable=too-many-locals import os import socket +import subprocess from binascii import b2a_hex from datetime import datetime, timezone from os import urandom @@ -46,6 +47,16 @@ def gen_build_id(): return '0x' + buildid.decode() +def get_build_info(): + """Attempt to retrieve RCS details from the build environment.""" + try: + cmd = subprocess.run(['git', 'describe', '--tags', '--dirty', '--always'], + stdout=subprocess.PIPE, check=True) + except (subprocess.CalledProcessError, FileNotFoundError): + return '' + return cmd.stdout.decode().strip() + + def go_ldflags(benv): "Create the ldflags option for the Go build." @@ -53,6 +64,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}', @@ -60,6 +72,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 b4b372312a85..4aaf4a8072ec 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 1a140d3b4875..7be2e8b3ecfe 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 e15dec0254e0..4cf634be6a22 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"` faultsCmdRoot } @@ -55,6 +56,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 e9334c0f1104..ab25045c0aaf 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 af0edd4afbfd..decd9469df41 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"` ProviderIdx *uint // TODO SRS-31: Enable with multiprovider functionality: `short:"n" long:"provider_idx" description:"Index of provider to fetch (if multiple)"` } @@ -38,13 +52,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 1d87c434d58c..a28aa9fac94a 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 5e5bb3abd19b..80c021eb3322 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" @@ -227,11 +226,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 b587a6bab055..5121ba4dcae8 100644 --- a/src/control/cmd/dmg/command_test.go +++ b/src/control/cmd/dmg/command_test.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2019-2023 Intel Corporation. +// (C) Copyright 2019-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -189,6 +189,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 ed7362eda2b0..fc6355e76f8e 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,28 +109,29 @@ 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"` - Check checkCmdRoot `command:"check" description:"Check system health"` - ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` - faultsCmdRoot // compiled out for release builds - firmwareOption // build with tag "firmware" to enable + 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"` + Check checkCmdRoot `command:"check" description:"Check system health"` + ManPage cmdutil.ManCmd `command:"manpage" hidden:"true"` + faultsCmdRoot // compiled out for release builds + firmwareOption // build with tag "firmware" to enable } type versionCmd struct { @@ -151,6 +152,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/common/proto/logging.go b/src/control/common/proto/logging.go index 9144c0b84a35..8e23cae1839a 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 Replica Set:%s Down Replicas:%s", m, m.CurrentLeader, strings.Join(m.Replicas, ","), strings.Join(m.DownReplicas, ",")) case *sharedpb.ClusterEventReq: diff --git a/src/control/common/proto/mgmt/addons.go b/src/control/common/proto/mgmt/addons.go index e7d5af6fb3f5..34299c3096c4 100644 --- a/src/control/common/proto/mgmt/addons.go +++ b/src/control/common/proto/mgmt/addons.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2019-2022 Intel Corporation. +// (C) Copyright 2019-2024 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -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 59f66c18efe8..d0a0039f2822 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 @@ -740,6 +740,77 @@ func (x *ClientNetHint) GetProviderIdx() uint32 { return 0 } +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 @@ -755,12 +826,13 @@ type GetAttachInfoResp struct { Sys string `protobuf:"bytes,6,opt,name=sys,proto3" json:"sys,omitempty"` // Name of the DAOS system SecondaryRankUris []*GetAttachInfoResp_RankUri `protobuf:"bytes,7,rep,name=secondary_rank_uris,json=secondaryRankUris,proto3" json:"secondary_rank_uris,omitempty"` // Rank URIs for additional providers SecondaryClientNetHints []*ClientNetHint `protobuf:"bytes,8,rep,name=secondary_client_net_hints,json=secondaryClientNetHints,proto3" json:"secondary_client_net_hints,omitempty"` // Hints for additional providers + 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) } @@ -773,7 +845,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 { @@ -786,7 +858,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 { @@ -845,6 +917,13 @@ func (x *GetAttachInfoResp) GetSecondaryClientNetHints() []*ClientNetHint { return nil } +func (x *GetAttachInfoResp) GetBuildInfo() *BuildInfo { + if x != nil { + return x.BuildInfo + } + return nil +} + type PrepShutdownReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -856,7 +935,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) } @@ -869,7 +948,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 { @@ -882,7 +961,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 { @@ -903,7 +982,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) } @@ -916,7 +995,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 { @@ -929,7 +1008,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 { @@ -951,7 +1030,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) } @@ -964,7 +1043,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 { @@ -977,7 +1056,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 { @@ -1008,7 +1087,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) } @@ -1021,7 +1100,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 { @@ -1034,7 +1113,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 { @@ -1078,7 +1157,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) } @@ -1091,7 +1170,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 { @@ -1104,7 +1183,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 { @@ -1140,7 +1219,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) } @@ -1153,7 +1232,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 { @@ -1166,7 +1245,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 { @@ -1196,7 +1275,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) } @@ -1209,7 +1288,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 { @@ -1260,7 +1339,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) } @@ -1273,7 +1352,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 { @@ -1286,7 +1365,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 { @@ -1409,71 +1488,80 @@ var file_mgmt_svc_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x78, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x22, 0x88, 0x04, 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, 0x4f, 0x0a, - 0x13, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x5f, - 0x75, 0x72, 0x69, 0x73, 0x18, 0x07, 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, 0x11, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, 0x73, 0x12, 0x50, - 0x0a, 0x1a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4e, 0x65, 0x74, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, - 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, 0x6e, 0x74, 0x73, - 0x1a, 0x6d, 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, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x49, 0x64, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x74, 0x78, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x43, 0x74, 0x78, 0x73, 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, + 0x08, 0x04, 0x10, 0x05, 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, 0xb8, 0x04, 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, 0x4f, + 0x0a, 0x13, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x6b, + 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x07, 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, 0x11, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x55, 0x72, 0x69, 0x73, 0x12, + 0x50, 0x0a, 0x1a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x17, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x61, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x65, 0x74, 0x48, 0x69, 0x6e, 0x74, + 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, 0x6d, 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, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x49, 0x64, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x74, 0x78, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x43, 0x74, 0x78, 0x73, + 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 ( @@ -1489,7 +1577,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 @@ -1501,28 +1589,30 @@ 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 - 18, // 4: mgmt.GetAttachInfoResp.secondary_rank_uris:type_name -> mgmt.GetAttachInfoResp.RankUri + 19, // 4: mgmt.GetAttachInfoResp.secondary_rank_uris:type_name -> mgmt.GetAttachInfoResp.RankUri 9, // 5: mgmt.GetAttachInfoResp.secondary_client_net_hints:type_name -> mgmt.ClientNetHint - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 10, // 6: mgmt.GetAttachInfoResp.build_info:type_name -> mgmt.BuildInfo + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_mgmt_svc_proto_init() } @@ -1640,7 +1730,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: @@ -1652,7 +1742,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: @@ -1664,7 +1754,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: @@ -1676,7 +1766,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: @@ -1688,7 +1778,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: @@ -1700,7 +1790,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: @@ -1712,7 +1802,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: @@ -1724,7 +1814,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: @@ -1736,6 +1826,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 @@ -1754,7 +1856,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 dae4f05b7991..c72d90caaf9d 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 // @@ -226,6 +226,13 @@ type ( ProviderIdx uint32 `json:"provider_idx"` } + 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"` @@ -233,9 +240,34 @@ type ( MSRanks []uint32 `json:"ms_ranks"` ClientNetHint ClientNetworkHint `json:"client_net_hint"` AlternateClientNetHints []ClientNetworkHint `json:"secondary_client_net_hints"` + 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 64dda030023c..5dcea6991a0f 100644 --- a/src/control/server/mgmt_system.go +++ b/src/control/server/mgmt_system.go @@ -115,6 +115,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 3f18a1caddc7..738f8c1cbb87 100644 --- a/src/include/daos_mgmt.h +++ b/src/include/daos_mgmt.h @@ -132,6 +132,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 9ad9d760b6da..214ef04a3215 100644 --- a/src/mgmt/cli_mgmt.c +++ b/src/mgmt/cli_mgmt.c @@ -52,6 +52,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 57ad95d3eed7..94bb6cf59649 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) { @@ -1566,6 +1604,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[4] = { { @@ -1643,134 +1727,91 @@ 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[8] = -{ - { - "status", +static const ProtobufCFieldDescriptor mgmt__get_attach_info_resp__field_descriptors[9] = { + { + "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 */ + }, + { + "secondary_rank_uris", 7, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(Mgmt__GetAttachInfoResp, n_secondary_rank_uris), + offsetof(Mgmt__GetAttachInfoResp, secondary_rank_uris), + &mgmt__get_attach_info_resp__rank_uri__descriptor, NULL, 0, /* flags */ + 0, NULL, NULL /* reserved1,reserved2, etc */ + }, + { + "secondary_client_net_hints", 8, PROTOBUF_C_LABEL_REPEATED, PROTOBUF_C_TYPE_MESSAGE, + offsetof(Mgmt__GetAttachInfoResp, n_secondary_client_net_hints), + offsetof(Mgmt__GetAttachInfoResp, secondary_client_net_hints), + &mgmt__client_net_hint__descriptor, NULL, 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[] = { + 8, /* field[8] = build_info */ + 3, /* field[3] = client_net_hint */ + 4, /* field[4] = data_version */ + 2, /* field[2] = ms_ranks */ + 1, /* field[1] = rank_uris */ + 7, /* field[7] = secondary_client_net_hints */ + 6, /* field[6] = secondary_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, 9}}; +const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__descriptor = { + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "mgmt.GetAttachInfoResp", + "GetAttachInfoResp", + "Mgmt__GetAttachInfoResp", + "mgmt", + sizeof(Mgmt__GetAttachInfoResp), + 9, + mgmt__get_attach_info_resp__field_descriptors, + mgmt__get_attach_info_resp__field_indices_by_name, 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), + mgmt__get_attach_info_resp__number_ranges, + (ProtobufCMessageInit)mgmt__get_attach_info_resp__init, 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 */ - }, - { - "secondary_rank_uris", - 7, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(Mgmt__GetAttachInfoResp, n_secondary_rank_uris), - offsetof(Mgmt__GetAttachInfoResp, secondary_rank_uris), - &mgmt__get_attach_info_resp__rank_uri__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "secondary_client_net_hints", - 8, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(Mgmt__GetAttachInfoResp, n_secondary_client_net_hints), - offsetof(Mgmt__GetAttachInfoResp, secondary_client_net_hints), - &mgmt__client_net_hint__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 */ - 7, /* field[7] = secondary_client_net_hints */ - 6, /* field[6] = secondary_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, 8 } -}; -const ProtobufCMessageDescriptor mgmt__get_attach_info_resp__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "mgmt.GetAttachInfoResp", - "GetAttachInfoResp", - "Mgmt__GetAttachInfoResp", - "mgmt", - sizeof(Mgmt__GetAttachInfoResp), - 8, - 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] */ + 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 03e9d09d37f2..3405ed7c9556 100644 --- a/src/mgmt/svc.pb-c.h +++ b/src/mgmt/svc.pb-c.h @@ -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; @@ -300,6 +301,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,NULL, 0 } +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 { @@ -357,11 +370,16 @@ struct _Mgmt__GetAttachInfoResp */ size_t n_secondary_client_net_hints; Mgmt__ClientNetHint **secondary_client_net_hints; + /* + * 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, 0,NULL, 0,NULL } - +#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, 0, NULL, 0, NULL, NULL \ + } struct _Mgmt__PrepShutdownReq { @@ -643,6 +661,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); @@ -811,6 +842,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); @@ -852,6 +884,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 fd22ce7346c5..82304f5be882 100644 --- a/src/proto/mgmt/svc.proto +++ b/src/proto/mgmt/svc.proto @@ -91,6 +91,14 @@ message ClientNetHint { uint32 provider_idx = 9; // Provider index - anything > 0 is a secondary provider } +message BuildInfo +{ + uint32 major = 1; + uint32 minor = 2; + uint32 patch = 3; + string tag = 4; +} + message GetAttachInfoResp { int32 status = 1; // DAOS error code message RankUri { @@ -108,6 +116,7 @@ message GetAttachInfoResp { string sys = 6; // Name of the DAOS system repeated RankUri secondary_rank_uris = 7; // Rank URIs for additional providers repeated ClientNetHint secondary_client_net_hints = 8; // Hints for additional providers + BuildInfo build_info = 9; // Structured server build information } message PrepShutdownReq {