diff --git a/agent/agent.go b/agent/agent.go index e5d5ab980..6d8346f3a 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1024,7 +1024,7 @@ func (a *Agent) setupNodeID(config *config.RuntimeConfig) error { func (a *Agent) setupBaseKeyrings(config *consul.Config) error { // If the keyring file is disabled then just poke the provided key // into the in-memory keyring. - fedarationEnabled := config.SerfWANConfig != nil + federationEnabled := config.SerfWANConfig != nil if a.config.DisableKeyringFile { if a.config.EncryptKey == "" { return nil @@ -1034,7 +1034,7 @@ func (a *Agent) setupBaseKeyrings(config *consul.Config) error { if err := loadKeyring(config.SerfLANConfig, keys); err != nil { return err } - if a.config.ServerMode && fedarationEnabled { + if a.config.ServerMode && federationEnabled { if err := loadKeyring(config.SerfWANConfig, keys); err != nil { return err } @@ -1054,7 +1054,7 @@ func (a *Agent) setupBaseKeyrings(config *consul.Config) error { return err } } - if a.config.ServerMode && fedarationEnabled { + if a.config.ServerMode && federationEnabled { if _, err := os.Stat(fileWAN); err != nil { if err := initKeyring(fileWAN, a.config.EncryptKey); err != nil { return err @@ -1069,7 +1069,7 @@ LOAD: if err := loadKeyringFile(config.SerfLANConfig); err != nil { return err } - if a.config.ServerMode && fedarationEnabled { + if a.config.ServerMode && federationEnabled { if _, err := os.Stat(fileWAN); err == nil { config.SerfWANConfig.KeyringFile = fileWAN } diff --git a/agent/consul/server.go b/agent/consul/server.go index 764563d2f..128f67081 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -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 // 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 { s.Shutdown() return nil, fmt.Errorf("Failed to setup network segments: %v", err)