Merge pull request #5695 from hashicorp/f-squelch-logline

client: log when server list changes
This commit is contained in:
Michael Schurter 2019-05-14 08:38:05 -07:00 committed by GitHub
commit f072c7421c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,10 +208,11 @@ func (m *Manager) SetServers(servers Servers) bool {
// This prevents unnecessary shuffling of a failed server that was moved to the
// bottom of the list
if equal {
m.logger.Debug("Not replacing server list, current server list is identical to servers discovered in Consul")
return !equal
}
m.logger.Debug("new server list", "new_servers", servers, "old_servers", m.servers)
// Randomize the incoming servers
servers.shuffle()
m.servers = servers