Move starting enterprise functionality
This commit is contained in:
parent
b65a5047cc
commit
02719c52ff
|
@ -358,12 +358,6 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (*
|
||||||
return nil, fmt.Errorf("Failed to start Raft: %v", err)
|
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
|
// Serf and dynamic bind ports
|
||||||
//
|
//
|
||||||
// The LAN serf cluster announces the port of the WAN serf cluster
|
// The LAN serf cluster announces the port of the WAN serf cluster
|
||||||
|
@ -428,6 +422,12 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (*
|
||||||
go s.Flood(nil, portFn, s.serfWAN)
|
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
|
// Start monitoring leadership. This must happen after Serf is set up
|
||||||
// since it can fire events when leadership is obtained.
|
// since it can fire events when leadership is obtained.
|
||||||
go s.monitorLeadership()
|
go s.monitorLeadership()
|
||||||
|
|
Loading…
Reference in New Issue