Merge pull request #4989 from hashicorp/dani/b-client-update-race-condition
client: Give a copy of clientconfig to allocrunner
This commit is contained in:
commit
d9174d8dcf
|
@ -867,7 +867,7 @@ func (c *Client) restoreState() error {
|
||||||
arConf := &allocrunner.Config{
|
arConf := &allocrunner.Config{
|
||||||
Alloc: alloc,
|
Alloc: alloc,
|
||||||
Logger: c.logger,
|
Logger: c.logger,
|
||||||
ClientConfig: c.config,
|
ClientConfig: c.configCopy,
|
||||||
StateDB: c.stateDB,
|
StateDB: c.stateDB,
|
||||||
StateUpdater: c,
|
StateUpdater: c,
|
||||||
DeviceStatsReporter: c,
|
DeviceStatsReporter: c,
|
||||||
|
@ -2057,7 +2057,7 @@ func (c *Client) addAlloc(alloc *structs.Allocation, migrateToken string) error
|
||||||
arConf := &allocrunner.Config{
|
arConf := &allocrunner.Config{
|
||||||
Alloc: alloc,
|
Alloc: alloc,
|
||||||
Logger: c.logger,
|
Logger: c.logger,
|
||||||
ClientConfig: c.config,
|
ClientConfig: c.configCopy,
|
||||||
StateDB: c.stateDB,
|
StateDB: c.stateDB,
|
||||||
Consul: c.consulService,
|
Consul: c.consulService,
|
||||||
Vault: c.vaultClient,
|
Vault: c.vaultClient,
|
||||||
|
|
Loading…
Reference in New Issue