diff --git a/client/client.go b/client/client.go index 8c4908795..f4a3810ac 100644 --- a/client/client.go +++ b/client/client.go @@ -760,6 +760,11 @@ func (c *Client) restoreState() error { var mErr multierror.Error for _, alloc := range allocs { + //XXX On Restore we give up on watching previous allocs because + // we need the local AllocRunners initialized first. We could + // add a second loop to initialize just the alloc watcher. + prevAllocWatcher := allocwatcher.NoopPrevAlloc{} + c.configLock.RLock() arConf := &allocrunner.Config{ Alloc: alloc, @@ -769,6 +774,7 @@ func (c *Client) restoreState() error { StateUpdater: c, Consul: c.consulService, Vault: c.vaultClient, + PrevAllocWatcher: prevAllocWatcher, PluginLoader: c.config.PluginLoader, PluginSingletonLoader: c.config.PluginSingletonLoader, }