agent: display node id on start up for servers (#17084)
Signed-off-by: Bram Vogelaar <bram@attachmentgenie.com>
This commit is contained in:
parent
fe29cf8b7b
commit
3b40f778e5
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
agent: Display server node ID in agent configuration at startup
|
||||
```
|
|
@ -781,6 +781,12 @@ func (c *Command) Run(args []string) int {
|
|||
info["region"] = fmt.Sprintf("%s (DC: %s)", config.Region, config.Datacenter)
|
||||
info["bind addrs"] = c.getBindAddrSynopsis()
|
||||
info["advertise addrs"] = c.getAdvertiseAddrSynopsis()
|
||||
if config.Server.Enabled {
|
||||
serverConfig, err := c.agent.serverConfig()
|
||||
if err == nil {
|
||||
info["node id"] = serverConfig.NodeID
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the keys for output
|
||||
infoKeys := make([]string, 0, len(info))
|
||||
|
|
Loading…
Reference in New Issue