mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #1725 from aboch/ags
agentSetup to first check if clusterProvider is nil
This commit is contained in:
commit
cf355d1689
1 changed files with 7 additions and 0 deletions
|
@ -187,6 +187,13 @@ func (c *controller) agentSetup() error {
|
||||||
clusterProvider := c.cfg.Daemon.ClusterProvider
|
clusterProvider := c.cfg.Daemon.ClusterProvider
|
||||||
agent := c.agent
|
agent := c.agent
|
||||||
c.Unlock()
|
c.Unlock()
|
||||||
|
|
||||||
|
if clusterProvider == nil {
|
||||||
|
msg := "Aborting initialization of Libnetwork Agent because cluster provider is now unset"
|
||||||
|
logrus.Errorf(msg)
|
||||||
|
return fmt.Errorf(msg)
|
||||||
|
}
|
||||||
|
|
||||||
bindAddr := clusterProvider.GetLocalAddress()
|
bindAddr := clusterProvider.GetLocalAddress()
|
||||||
advAddr := clusterProvider.GetAdvertiseAddress()
|
advAddr := clusterProvider.GetAdvertiseAddress()
|
||||||
remote := clusterProvider.GetRemoteAddress()
|
remote := clusterProvider.GetRemoteAddress()
|
||||||
|
|
Loading…
Reference in a new issue