client: stats need latest allocdir (#14204)
In #14139 this code was changed to use the original copy of the config, but Config.AllocDir is updated in the `Client.init()` method for dev agents. This uses the latest version of the alloc dir (which cannot change further at runtime without a client restart which would reinitialize the stats collector as well).
This commit is contained in:
parent
fcf2c40c60
commit
d36e0c02c9
|
@ -514,7 +514,7 @@ func NewClient(cfg *config.Config, consulCatalog consul.CatalogAPI, consulProxie
|
|||
go c.heartbeatStop.watch()
|
||||
|
||||
// Add the stats collector
|
||||
statsCollector := stats.NewHostStatsCollector(c.logger, cfg.AllocDir, c.devicemanager.AllStats)
|
||||
statsCollector := stats.NewHostStatsCollector(c.logger, c.GetConfig().AllocDir, c.devicemanager.AllStats)
|
||||
c.hostStatsCollector = statsCollector
|
||||
|
||||
// Add the garbage collector
|
||||
|
|
Loading…
Reference in New Issue