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:
Danielle Tomlinson 2018-12-17 10:49:46 +01:00 committed by GitHub
commit d9174d8dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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,