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

View file

@ -867,7 +867,7 @@ func (c *Client) restoreState() error {
arConf := &allocrunner.Config{
Alloc: alloc,
Logger: c.logger,
ClientConfig: c.config,
ClientConfig: c.configCopy,
StateDB: c.stateDB,
StateUpdater: c,
DeviceStatsReporter: c,
@ -2057,7 +2057,7 @@ func (c *Client) addAlloc(alloc *structs.Allocation, migrateToken string) error
arConf := &allocrunner.Config{
Alloc: alloc,
Logger: c.logger,
ClientConfig: c.config,
ClientConfig: c.configCopy,
StateDB: c.stateDB,
Consul: c.consulService,
Vault: c.vaultClient,