fix typo and remove comment
This commit is contained in:
parent
6d16afc65c
commit
17a011b9bd
|
@ -1024,7 +1024,7 @@ func (a *Agent) setupNodeID(config *config.RuntimeConfig) error {
|
||||||
func (a *Agent) setupBaseKeyrings(config *consul.Config) error {
|
func (a *Agent) setupBaseKeyrings(config *consul.Config) error {
|
||||||
// If the keyring file is disabled then just poke the provided key
|
// If the keyring file is disabled then just poke the provided key
|
||||||
// into the in-memory keyring.
|
// into the in-memory keyring.
|
||||||
fedarationEnabled := config.SerfWANConfig != nil
|
federationEnabled := config.SerfWANConfig != nil
|
||||||
if a.config.DisableKeyringFile {
|
if a.config.DisableKeyringFile {
|
||||||
if a.config.EncryptKey == "" {
|
if a.config.EncryptKey == "" {
|
||||||
return nil
|
return nil
|
||||||
|
@ -1034,7 +1034,7 @@ func (a *Agent) setupBaseKeyrings(config *consul.Config) error {
|
||||||
if err := loadKeyring(config.SerfLANConfig, keys); err != nil {
|
if err := loadKeyring(config.SerfLANConfig, keys); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if a.config.ServerMode && fedarationEnabled {
|
if a.config.ServerMode && federationEnabled {
|
||||||
if err := loadKeyring(config.SerfWANConfig, keys); err != nil {
|
if err := loadKeyring(config.SerfWANConfig, keys); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1054,7 +1054,7 @@ func (a *Agent) setupBaseKeyrings(config *consul.Config) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if a.config.ServerMode && fedarationEnabled {
|
if a.config.ServerMode && federationEnabled {
|
||||||
if _, err := os.Stat(fileWAN); err != nil {
|
if _, err := os.Stat(fileWAN); err != nil {
|
||||||
if err := initKeyring(fileWAN, a.config.EncryptKey); err != nil {
|
if err := initKeyring(fileWAN, a.config.EncryptKey); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1069,7 +1069,7 @@ LOAD:
|
||||||
if err := loadKeyringFile(config.SerfLANConfig); err != nil {
|
if err := loadKeyringFile(config.SerfLANConfig); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if a.config.ServerMode && fedarationEnabled {
|
if a.config.ServerMode && federationEnabled {
|
||||||
if _, err := os.Stat(fileWAN); err == nil {
|
if _, err := os.Stat(fileWAN); err == nil {
|
||||||
config.SerfWANConfig.KeyringFile = fileWAN
|
config.SerfWANConfig.KeyringFile = fileWAN
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,7 +368,6 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (*
|
||||||
|
|
||||||
// Initialize the LAN segments before the default LAN Serf so we have
|
// Initialize the LAN segments before the default LAN Serf so we have
|
||||||
// updated port information to publish there.
|
// updated port information to publish there.
|
||||||
// TODO preetha: why is this passing WAN port to create segments?
|
|
||||||
if err := s.setupSegments(config, serfBindPortWAN, segmentListeners); err != nil {
|
if err := s.setupSegments(config, serfBindPortWAN, segmentListeners); err != nil {
|
||||||
s.Shutdown()
|
s.Shutdown()
|
||||||
return nil, fmt.Errorf("Failed to setup network segments: %v", err)
|
return nil, fmt.Errorf("Failed to setup network segments: %v", err)
|
||||||
|
|
Loading…
Reference in New Issue