From 321645696d78683c5a1247cb095ffa61c4d12781 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 21 Apr 2021 10:33:31 +0530 Subject: [PATCH] MM-31717: Remove HTTP clustering (#17409) * MM-31717: Remove HTTP clustering https://mattermost.atlassian.net/browse/MM-31717 ```release-note Gossip clustering mode is now GA and is no longer available as a choice now. All cluster traffic will always use the gossip protocol. The config setting UseExperimentalGossip has no effect and has only been kept for compatibility purposes. The setting to use gossip has been removed from admin console. Upgrade note: If an existing system is not using gossip, then one cannot upgrade one node in a cluster and keep the other one to the older version, if an HA upgrade is intended. All nodes in the cluster must use a single protocol. Either the customer must use gossip if they want to do an HA upgrade. Or, shut down all nodes and bring up all of them after doing an upgrade. ``` * Trigger CI * update translations --- i18n/en.json | 4 ---- model/config.go | 36 ++++++++++++++++----------------- services/telemetry/telemetry.go | 1 - 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index 438e7fb63c..fb13cfd1be 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6830,10 +6830,6 @@ "id": "ent.cluster.json_encode.error", "translation": "Error occurred while marshalling JSON request" }, - { - "id": "ent.cluster.model.client.connecting.app_error", - "translation": "We encountered an error while connecting to the server." - }, { "id": "ent.cluster.save_config.error", "translation": "System Console is set to read-only when High Availability is enabled unless ReadOnlyConfig is disabled in the configuration file." diff --git a/model/config.go b/model/config.go index 35d70033a7..ebd0d99681 100644 --- a/model/config.go +++ b/model/config.go @@ -827,22 +827,22 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) { } type ClusterSettings struct { - Enable *bool `access:"environment_high_availability,write_restrictable"` - ClusterName *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - OverrideHostname *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - NetworkInterface *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - BindAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - AdvertiseAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - UseIpAddress *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - UseExperimentalGossip *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - EnableGossipCompression *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - EnableExperimentalGossipEncryption *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - ReadOnlyConfig *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` - GossipPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - StreamingPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - MaxIdleConns *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - MaxIdleConnsPerHost *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none - IdleConnTimeoutMilliseconds *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + Enable *bool `access:"environment_high_availability,write_restrictable"` + ClusterName *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + OverrideHostname *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + NetworkInterface *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + BindAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + AdvertiseAddress *string `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + UseIpAddress *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + DEPRECATED_DO_NOT_USE_UseExperimentalGossip *bool `json:"UseExperimentalGossip" access:"environment_high_availability,write_restrictable,cloud_restrictable"` // Deprecated: do not use + EnableGossipCompression *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + EnableExperimentalGossipEncryption *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + ReadOnlyConfig *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"` + GossipPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + StreamingPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + MaxIdleConns *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + MaxIdleConnsPerHost *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none + IdleConnTimeoutMilliseconds *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none } func (s *ClusterSettings) SetDefaults() { @@ -874,8 +874,8 @@ func (s *ClusterSettings) SetDefaults() { s.UseIpAddress = NewBool(true) } - if s.UseExperimentalGossip == nil { - s.UseExperimentalGossip = NewBool(true) + if s.DEPRECATED_DO_NOT_USE_UseExperimentalGossip == nil { + s.DEPRECATED_DO_NOT_USE_UseExperimentalGossip = NewBool(true) } if s.EnableExperimentalGossipEncryption == nil { diff --git a/services/telemetry/telemetry.go b/services/telemetry/telemetry.go index 6c03ba48b7..336d2e6b97 100644 --- a/services/telemetry/telemetry.go +++ b/services/telemetry/telemetry.go @@ -706,7 +706,6 @@ func (ts *TelemetryService) trackConfig() { "bind_address": isDefault(*cfg.ClusterSettings.BindAddress, ""), "advertise_address": isDefault(*cfg.ClusterSettings.AdvertiseAddress, ""), "use_ip_address": *cfg.ClusterSettings.UseIpAddress, - "use_experimental_gossip": *cfg.ClusterSettings.UseExperimentalGossip, "enable_experimental_gossip_encryption": *cfg.ClusterSettings.EnableExperimentalGossipEncryption, "enable_gossip_compression": *cfg.ClusterSettings.EnableGossipCompression, "read_only_config": *cfg.ClusterSettings.ReadOnlyConfig,