From 17a011b9bd14b95ce071c68b502d8f57c855c663 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Tue, 27 Mar 2018 14:28:05 -0500 Subject: [PATCH] fix typo and remove comment --- agent/agent.go | 8 ++++---- agent/consul/server.go | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) 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)