From 22b7b688a3d20a27ed34ca3d2ea36e3cc874d6ec Mon Sep 17 00:00:00 2001 From: Matt Keeler Date: Fri, 29 Jun 2018 17:38:29 -0400 Subject: [PATCH] Move starting enterprise functionality --- agent/consul/server.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agent/consul/server.go b/agent/consul/server.go index 9758a42bc2..ca363e7a1b 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -358,12 +358,6 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (* return nil, fmt.Errorf("Failed to start Raft: %v", err) } - // Start enterprise specific functionality - if err := s.startEnterprise(); err != nil { - s.Shutdown() - return nil, err - } - // Serf and dynamic bind ports // // The LAN serf cluster announces the port of the WAN serf cluster @@ -427,6 +421,12 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (* } go s.Flood(nil, portFn, s.serfWAN) } + + // Start enterprise specific functionality + if err := s.startEnterprise(); err != nil { + s.Shutdown() + return nil, err + } // Start monitoring leadership. This must happen after Serf is set up // since it can fire events when leadership is obtained.