mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
client: fix race accessing Node.status
* Call Node.Canonicalize once when Node is created. * Lock when accessing fields mutated by node update goroutine
This commit is contained in:
@@ -521,6 +521,9 @@ func convertClientConfig(agentConfig *Config) (*clientconfig.Config, error) {
|
||||
// Set up the HTTP advertise address
|
||||
conf.Node.HTTPAddr = agentConfig.AdvertiseAddrs.HTTP
|
||||
|
||||
// Canonicalize Node struct
|
||||
conf.Node.Canonicalize()
|
||||
|
||||
// Reserve resources on the node.
|
||||
// COMPAT(0.10): Remove in 0.10
|
||||
r := conf.Node.Reserved
|
||||
|
||||
Reference in New Issue
Block a user