mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
agent: display node id on start up for servers (#17084)
Signed-off-by: Bram Vogelaar <bram@attachmentgenie.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user