Commit aa2c1abe authored by Corey Hulen's avatar Corey Hulen Committed by GitHub

PLT-6080 moving clustering to memberlist (#6499)

* PLT-6080 adding cluster discovery service

* Adding memberlist lib

* Adding memberlist lib

* WIP

* WIP

* WIP

* WIP

* Rolling back config changes

* Fixing make file

* Fixing config for cluster

* WIP

* Fixing system console for clustering

* Fixing default config

* Fixing config

* Fixing system console for clustering

* Tweaking hub setting

* Bumping up time

* merging vendor dir

* Updating vendor dir

* Fixing unit test

* Fixing bad merge

* Remove some testing code

* Moving comment

* PLT-6868 adding db ping retry

* Removing unused loc strings

* Adding defer to cancel
parent 01570997
......@@ -9,7 +9,7 @@ import {FormattedMessage} from 'react-intl';
import * as Utils from 'utils/utils.jsx';
import statusGreen from 'images/status_green.png';
import statusRed from 'images/status_red.png';
import statusYellow from 'images/status_yellow.png';
export default class ClusterTable extends React.Component {
static propTypes = {
......@@ -34,10 +34,12 @@ export default class ClusterTable extends React.Component {
var version = '';
var configHash = '';
var singleItem = false;
if (this.props.clusterInfos.length) {
version = this.props.clusterInfos[0].version;
configHash = this.props.clusterInfos[0].config_hash;
singleItem = this.props.clusterInfos.length === 1;
}
this.props.clusterInfos.map((clusterInfo) => {
......@@ -45,7 +47,7 @@ export default class ClusterTable extends React.Component {
versionMismatch = (
<img
className='cluster-status'
src={statusRed}
src={statusYellow}
/>
);
}
......@@ -54,7 +56,7 @@ export default class ClusterTable extends React.Component {
configMismatch = (
<img
className='cluster-status'
src={statusRed}
src={statusYellow}
/>
);
}
......@@ -77,34 +79,29 @@ export default class ClusterTable extends React.Component {
clusterInfo.config_hash = Utils.localizeMessage('admin.cluster.unknown', 'unknown');
}
if (clusterInfo.id === '') {
clusterInfo.id = Utils.localizeMessage('admin.cluster.unknown', 'unknown');
}
if (clusterInfo.is_alive > 0) {
if (singleItem) {
status = (
<img
className='cluster-status'
src={statusGreen}
src={statusYellow}
/>
);
} else {
status = (
<img
className='cluster-status'
src={statusRed}
src={statusGreen}
/>
);
}
return (
<tr key={clusterInfo.id}>
<tr key={clusterInfo.ipaddress}>
<td style={{whiteSpace: 'nowrap'}}>{status}</td>
<td style={{whiteSpace: 'nowrap'}}>{clusterInfo.hostname}</td>
<td style={{whiteSpace: 'nowrap'}}>{versionMismatch} {clusterInfo.version}</td>
<td style={{whiteSpace: 'nowrap'}}><div className='config-hash'>{configMismatch} {clusterInfo.config_hash}</div></td>
<td style={{whiteSpace: 'nowrap'}}>{clusterInfo.internode_url}</td>
<td style={{whiteSpace: 'nowrap'}}><div className='config-hash'>{clusterInfo.id}</div></td>
<td style={{whiteSpace: 'nowrap'}}>{clusterInfo.ipaddress}</td>
</tr>
);
});
......@@ -160,13 +157,7 @@ export default class ClusterTable extends React.Component {
<th>
<FormattedMessage
id='admin.cluster.status_table.url'
defaultMessage='Inter-Node URL'
/>
</th>
<th>
<FormattedMessage
id='admin.cluster.status_table.id'
defaultMessage='Node ID'
defaultMessage='Gossip Address'
/>
</th>
</tr>
......
......@@ -157,14 +157,14 @@
"admin.cluster.interNodeUrlsEx": "E.g.: \"http://10.10.10.30, http://10.10.10.31\"",
"admin.cluster.interNodeUrlsTitle": "Inter-Node URLs:",
"admin.cluster.loadedFrom": "This configuration file was loaded from Node ID {clusterId}. Please see the Troubleshooting Guide in our <a href=\"http://docs.mattermost.com/deployment/cluster.html\" target='_blank'>documentation</a> if you are accessing the System Console through a load balancer and experiencing issues.",
"admin.cluster.noteDescription": "Changing properties in this section will require a server restart before taking effect. When High Availability mode is enabled, the System Console is set to read-only and can only be changed from the configuration file.",
"admin.cluster.noteDescription": "Changing properties in this section will require a server restart before taking effect. When High Availability mode is enabled, the System Console is set to read-only and can only be changed from the configuration file unless ReadOnlyConfig is disabled in the configuration file.",
"admin.cluster.should_not_change": "WARNING: These settings may not sync with the other servers in the cluster. High Availability inter-node communication will not start until you modify the config.json to be identical on all servers and restart Mattermost. Please see the <a href=\"http://docs.mattermost.com/deployment/cluster.html\" target='_blank'>documentation</a> on how to add or remove a server from the cluster. If you are accessing the System Console through a load balancer and experiencing issues, please see the Troubleshooting Guide in our <a href=\"http://docs.mattermost.com/deployment/cluster.html\" target='_blank'>documentation</a>.",
"admin.cluster.status_table.config_hash": "Config File MD5",
"admin.cluster.status_table.hostname": "Hostname",
"admin.cluster.status_table.id": "Node ID",
"admin.cluster.status_table.reload": " Reload Cluster Status",
"admin.cluster.status_table.status": "Status",
"admin.cluster.status_table.url": "Inter-Node URL",
"admin.cluster.status_table.url": "Gossip Address",
"admin.cluster.status_table.version": "Version",
"admin.cluster.unknown": "unknown",
"admin.compliance.directoryDescription": "Directory to which compliance reports are written. If blank, will be set to ./data/.",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment