diff --git a/web/orchestrator/public/css/orchestrator.css b/web/orchestrator/public/css/orchestrator.css index 616fcb6d0af..0feb835110e 100644 --- a/web/orchestrator/public/css/orchestrator.css +++ b/web/orchestrator/public/css/orchestrator.css @@ -787,7 +787,7 @@ body { margin-bottom: 8px; } -.instance .instance-master-section { +.instance .instance-primary-section { position: absolute; bottom: 0px; left: 0px; @@ -796,7 +796,7 @@ body { width: 48%; } -.instance.accept_drop_check .instance-master-section { +.instance.accept_drop_check .instance-primary-section { height: 100%; } diff --git a/web/orchestrator/public/js/cluster-analysis-shared.js b/web/orchestrator/public/js/cluster-analysis-shared.js index 42857127817..9b6a5dd27ad 100644 --- a/web/orchestrator/public/js/cluster-analysis-shared.js +++ b/web/orchestrator/public/js/cluster-analysis-shared.js @@ -1,25 +1,25 @@ var interestingAnalysis = { - "DeadMaster" : true, - "DeadMasterAndReplicas" : true, - "DeadMasterAndSomeReplicas" : true, - "DeadMasterWithoutReplicas" : true, - "UnreachableMasterWithLaggingReplicas": true, - "UnreachableMaster" : true, - "LockedSemiSyncMaster" : true, - "AllMasterReplicasNotReplicating" : true, - "AllMasterReplicasNotReplicatingOrDead" : true, - "DeadCoMaster" : true, - "DeadCoMasterAndSomeReplicas" : true, - "DeadIntermediateMaster" : true, - "DeadIntermediateMasterWithSingleReplicaFailingToConnect" : true, - "DeadIntermediateMasterWithSingleReplica" : true, - "DeadIntermediateMasterAndSomeReplicas" : true, - "DeadIntermediateMasterAndReplicas" : true, - "AllIntermediateMasterReplicasFailingToConnectOrDead" : true, - "AllIntermediateMasterReplicasNotReplicating" : true, - "UnreachableIntermediateMasterWithLaggingReplicas": true, - "UnreachableIntermediateMaster" : true, - "BinlogServerFailingToConnectToMaster" : true, + "DeadPrimary" : true, + "DeadPrimaryAndReplicas" : true, + "DeadPrimaryAndSomeReplicas" : true, + "DeadPrimaryWithoutReplicas" : true, + "UnreachablePrimaryWithLaggingReplicas": true, + "UnreachablePrimary" : true, + "LockedSemiSyncPrimary" : true, + "AllPrimaryReplicasNotReplicating" : true, + "AllPrimaryReplicasNotReplicatingOrDead" : true, + "DeadCoPrimary" : true, + "DeadCoPrimaryAndSomeReplicas" : true, + "DeadIntermediatePrimary" : true, + "DeadIntermediatePrimaryWithSingleReplicaFailingToConnect" : true, + "DeadIntermediatePrimaryWithSingleReplica" : true, + "DeadIntermediatePrimaryAndSomeReplicas" : true, + "DeadIntermediatePrimaryAndReplicas" : true, + "AllIntermediatePrimaryReplicasFailingToConnectOrDead" : true, + "AllIntermediatePrimaryReplicasNotReplicating" : true, + "UnreachableIntermediatePrimaryWithLaggingReplicas": true, + "UnreachableIntermediatePrimary" : true, + "BinlogServerFailingToConnectToPrimary" : true, }; var errorMapping = { diff --git a/web/orchestrator/public/js/cluster-tree.js b/web/orchestrator/public/js/cluster-tree.js index 7ca61c45aec..99c58a2b8de 100644 --- a/web/orchestrator/public/js/cluster-tree.js +++ b/web/orchestrator/public/js/cluster-tree.js @@ -15,7 +15,7 @@ function visualizeInstances(nodesMap, onSvgInstanceWrapper, clusterControl) { pseudoChild.children.forEach(function(child) { child.parent = pseudoChild; }); - pseudoChild.hasMaster = true; + pseudoChild.hasPrimary = true; pseudoChild.parent = node; pseudoChild.isAnchor = true; pseudoChild.id += "__virtualnode"; @@ -28,9 +28,9 @@ function visualizeInstances(nodesMap, onSvgInstanceWrapper, clusterControl) { // Calculate tree dimensions var maxNodeDepth = 20; // virtualDepth is the depth in tree excluding virtual nodes. - // Virtual nodes are introduced as a means to present co-masters on same depth while retaining tree structure. This is - // merely for visualization purposes. In such case, a virtual node is introduced which is the parent (though not master) of - // said co-masters. But the virtual node is not displayed, and does not affect the visualized depth positioning of the nodes + // Virtual nodes are introduced as a means to present co-primaries on same depth while retaining tree structure. This is + // merely for visualization purposes. In such case, a virtual node is introduced which is the parent (though not primary) of + // said co-primaries. But the virtual node is not displayed, and does not affect the visualized depth positioning of the nodes // underneath it. function getNodeDepth(node, recursiveLevel) { if (recursiveLevel > maxNodeDepth) @@ -94,13 +94,13 @@ function visualizeInstances(nodesMap, onSvgInstanceWrapper, clusterControl) { var root = null; nodesList.forEach(function(node) { - if (!node.hasMaster) { + if (!node.hasPrimary) { root = node; } }); if (root == null) { nodesList.forEach(function(node) { - if (node.isCoMaster) { + if (node.isCoPrimary) { root = node; } }); diff --git a/web/orchestrator/public/js/cluster.js b/web/orchestrator/public/js/cluster.js index 38646e34a67..105ee2b67b9 100644 --- a/web/orchestrator/public/js/cluster.js +++ b/web/orchestrator/public/js/cluster.js @@ -23,8 +23,8 @@ function Cluster() { apiCommand("/api/recover-lite/" + _instancesMap[e.draggedNodeId].Key.Hostname + "/" + _instancesMap[e.draggedNodeId].Key.Port); return true; }, - "force-master-failover": function(e) { - apiCommand("/api/force-master-failover/" + _instancesMap[e.draggedNodeId].Key.Hostname + "/" + _instancesMap[e.draggedNodeId].Key.Port); + "force-primary-failover": function(e) { + apiCommand("/api/force-primary-failover/" + _instancesMap[e.draggedNodeId].Key.Hostname + "/" + _instancesMap[e.draggedNodeId].Key.Port); return true; }, "recover-suggested-successor": function(e) { @@ -222,7 +222,7 @@ function Cluster() { renderInstanceElement(instanceEl, node, "cluster"); - var masterSectionEl = $('
').appendTo(instanceEl); + var primarySectionEl = $('').appendTo(instanceEl); var normalSectionEl = $('').appendTo(instanceEl); if (node.children) { var trailerEl = $('" +
node.Key.Hostname + ":" + node.Key.Port +
"
below " +
- masterNode.Key.Hostname + ":" + masterNode.Key.Port +
+ primaryNode.Key.Hostname + ":" + primaryNode.Key.Port +
"
?";
var apiUrl = "/api/move-up-replicas/" + node.Key.Hostname + "/" + node.Key.Port;
return executeMoveOperation(message, apiUrl);
@@ -1002,13 +1002,13 @@ function Cluster() {
return executeMoveOperation(message, apiUrl);
}
- function takeMaster(node, masterNode) {
- var message = "" +
+ function takePrimary(node, primaryNode) {
+ var message = "take-primary
Are you sure you wish to make " +
node.Key.Hostname + ":" + node.Key.Port +
- "
master of " +
- masterNode.Key.Hostname + ":" + masterNode.Key.Port +
+ "
primary of " +
+ primaryNode.Key.Hostname + ":" + primaryNode.Key.Port +
"
?";
- var apiUrl = "/api/take-master/" + node.Key.Hostname + "/" + node.Key.Port;
+ var apiUrl = "/api/take-primary/" + node.Key.Hostname + "/" + node.Key.Port;
return executeMoveOperation(message, apiUrl);
}
@@ -1032,15 +1032,15 @@ function Cluster() {
return executeMoveOperation(message, apiUrl);
}
- function makeCoMaster(node, childNode) {
- var message = "make-co-master
Are you sure you wish to make " +
+ function makeCoPrimary(node, childNode) {
+ var message = "make-co-primary
Are you sure you wish to make " +
node.Key.Hostname + ":" + node.Key.Port +
"
and " +
childNode.Key.Hostname + ":" + childNode.Key.Port +
- "
co-masters?";
+ "
co-primaries?";
bootbox.confirm(anonymizeIfNeedBe(message), function(confirm) {
if (confirm) {
- apiCommand("/api/make-co-master/" + childNode.Key.Hostname + "/" + childNode.Key.Port);
+ apiCommand("/api/make-co-primary/" + childNode.Key.Hostname + "/" + childNode.Key.Port);
return true;
}
});
@@ -1048,13 +1048,13 @@ function Cluster() {
}
- function gracefulMasterTakeover(newMasterNode, existingMasterNode) {
- var message = ' DANGER ZONE
Graceful-master-takeover
Are you sure you wish to promote ' +
- newMasterNode.Key.Hostname + ':' + newMasterNode.Key.Port +
- '
as master?';
+ function gracefulPrimaryTakeover(newPrimaryNode, existingPrimaryNode) {
+ var message = ' DANGER ZONE
Graceful-primary-takeover
Are you sure you wish to promote ' +
+ newPrimaryNode.Key.Hostname + ':' + newPrimaryNode.Key.Port +
+ '
as primary?';
bootbox.confirm(anonymizeIfNeedBe(message), function(confirm) {
if (confirm) {
- apiCommand("/api/graceful-master-takeover/" + existingMasterNode.Key.Hostname + "/" + existingMasterNode.Key.Port + "/" + newMasterNode.Key.Hostname + "/" + newMasterNode.Key.Port);
+ apiCommand("/api/graceful-primary-takeover/" + existingPrimaryNode.Key.Hostname + "/" + existingPrimaryNode.Key.Port + "/" + newPrimaryNode.Key.Hostname + "/" + newPrimaryNode.Key.Port);
return true;
}
});
@@ -1063,18 +1063,18 @@ function Cluster() {
function instancesAreSiblings(node1, node2) {
if (node1.id == node2.id) return false;
- if (node1.masterNode == null) return false;
- if (node2.masterNode == null) return false;
- if (node1.masterNode.id != node2.masterNode.id) return false;
+ if (node1.primaryNode == null) return false;
+ if (node2.primaryNode == null) return false;
+ if (node1.primaryNode.id != node2.primaryNode.id) return false;
return true;
}
function instanceIsChild(node, parentNode) {
- if (!node.hasMaster) {
+ if (!node.hasPrimary) {
return false;
}
- if (node.masterNode.id != parentNode.id) {
+ if (node.primaryNode.id != parentNode.id) {
return false;
}
if (node.id == parentNode.id) {
@@ -1085,14 +1085,14 @@ function Cluster() {
function instanceIsGrandchild(node, grandparentNode) {
- if (!node.hasMaster) {
+ if (!node.hasPrimary) {
return false;
}
- var masterNode = node.masterNode;
- if (!masterNode.hasMaster) {
+ var primaryNode = node.primaryNode;
+ if (!primaryNode.hasPrimary) {
return false;
}
- if (masterNode.masterNode.id != grandparentNode.id) {
+ if (primaryNode.primaryNode.id != grandparentNode.id) {
return false;
}
if (node.id == grandparentNode.id) {
@@ -1104,7 +1104,7 @@ function Cluster() {
function instanceIsDescendant(node, nodeAtQuestion, depth) {
depth = depth || 0;
if (depth > node.ReplicationDepth + 1) {
- // Safety check for master-master topologies: avoid infinite loop
+ // Safety check for primary-primary topologies: avoid infinite loop
return false;
}
if (nodeAtQuestion == null) {
@@ -1113,18 +1113,18 @@ function Cluster() {
if (node.id == nodeAtQuestion.id) {
return false;
}
- if (!node.hasMaster) {
+ if (!node.hasPrimary) {
return false;
}
- if (node.masterNode.id == nodeAtQuestion.id) {
+ if (node.primaryNode.id == nodeAtQuestion.id) {
return true;
}
- return instanceIsDescendant(node.masterNode, nodeAtQuestion, depth + 1)
+ return instanceIsDescendant(node.primaryNode, nodeAtQuestion, depth + 1)
}
// Returns true when the two instances are siblings, and 'node' is behind or at same position
- // (in reltation to shared master) as its 'sibling'.
- // i.e. 'sibling' is same as, or more up to date by master than 'node'.
+ // (in reltation to shared primary) as its 'sibling'.
+ // i.e. 'sibling' is same as, or more up to date by primary than 'node'.
function isReplicationBehindSibling(node, sibling) {
if (!instancesAreSiblings(node, sibling)) {
return false;
@@ -1141,7 +1141,7 @@ function Cluster() {
function compareInstancesExecBinlogCoordinates(i0, i1) {
if (i0.ExecBinlogCoordinates.LogFile == i1.ExecBinlogCoordinates.LogFile) {
- // executing from same master log file
+ // executing from same primary log file
return i0.ExecBinlogCoordinates.LogPos - i1.ExecBinlogCoordinates.LogPos;
}
return (getLogFileNumber(i0.ExecBinlogCoordinates.LogFile) - getLogFileNumber(i1.ExecBinlogCoordinates.LogFile));
@@ -1242,7 +1242,7 @@ function Cluster() {
if (!instance.hasConnectivityProblem)
return;
// The instance has a connectivity problem! Do a client-side recommendation of most advanced replica:
- // a direct child of the master, with largest exec binlog coordinates.
+ // a direct child of the primary, with largest exec binlog coordinates.
var sortedChildren = instance.children.slice();
sortedChildren.sort(compareInstancesExecBinlogCoordinates)
@@ -1250,10 +1250,10 @@ function Cluster() {
if (!child.hasConnectivityProblem) {
if (compareInstancesExecBinlogCoordinates(child, sortedChildren[sortedChildren.length - 1]) == 0) {
child.isMostAdvancedOfSiblings = true;
- if (instance.isMaster && !instance.isCoMaster) {
- // Moreover, the instance is the (only) master!
- // Therefore its most advanced replicas are candidate masters
- child.isCandidateMaster = true;
+ if (instance.isPrimary && !instance.isCoPrimary) {
+ // Moreover, the instance is the (only) primary!
+ // Therefore its most advanced replicas are candidate primaries
+ child.isCandidatePrimary = true;
}
}
}
@@ -1497,8 +1497,8 @@ function Cluster() {
popoverElement.find(".popover-footer .dropdown").append(' ');
var recoveryListing = popoverElement.find(".dropdown ul");
- if (instance.isMaster) {
- recoveryListing.append(' Force fail over now (even if normal handling would not fail over) ');
+ if (instance.isPrimary) {
+ recoveryListing.append(' Force fail over now (even if normal handling would not fail over) ');
recoveryListing.append('');
// Suggest successor
@@ -1522,14 +1522,14 @@ function Cluster() {
'Recover, try to promote ' + replica.title + '
');
});
}
- if (!instance.isMaster) {
+ if (!instance.isPrimary) {
recoveryListing.append('Auto (implies running external hooks/processes) ');
recoveryListing.append('');
- recoveryListing.append('Relocate replicas to ' + instance.masterTitle + '
');
+ recoveryListing.append('Relocate replicas to ' + instance.primaryTitle + '
');
}
- if (instance.masterNode) {
- // Intermediate master; suggest successor
- instance.masterNode.children.forEach(function(sibling) {
+ if (instance.primaryNode) {
+ // Intermediate primary; suggest successor
+ instance.primaryNode.children.forEach(function(sibling) {
if (sibling.id == instance.id) {
return
}
@@ -1630,7 +1630,7 @@ function Cluster() {
reviewReplicationAnalysis(replicationAnalysis);
instances.forEach(function(instance) {
- if (instance.isMaster) {
+ if (instance.isPrimary) {
getData("/api/recently-active-instance-recovery/" + instance.Key.Hostname + "/" + instance.Key.Port, function(recoveries) {
if (!recoveries) {
return
@@ -1676,15 +1676,15 @@ function Cluster() {
if (!isAnonymized()) {
$("#cluster_name").text(visualAlias);
var clusterSubtitle = '';
- if (clusterInfo.HasAutomatedMasterRecovery === true) {
- clusterSubtitle += '';
+ if (clusterInfo.HasAutomatedPrimaryRecovery === true) {
+ clusterSubtitle += '';
} else {
- clusterSubtitle += '';
+ clusterSubtitle += '';
}
- if (clusterInfo.HasAutomatedIntermediateMasterRecovery === true) {
- clusterSubtitle += '';
+ if (clusterInfo.HasAutomatedIntermediatePrimaryRecovery === true) {
+ clusterSubtitle += '';
} else {
- clusterSubtitle += '';
+ clusterSubtitle += '';
}
$("#cluster_subtitle").append(clusterSubtitle)
diff --git a/web/orchestrator/public/js/clusters.js b/web/orchestrator/public/js/clusters.js
index d32fa03f1f6..7ba07e044d0 100644
--- a/web/orchestrator/public/js/clusters.js
+++ b/web/orchestrator/public/js/clusters.js
@@ -126,11 +126,11 @@ $(document).ready(function() {
}
popoverElement.find("h3 .pull-right").append('');
- if (cluster.HasAutomatedIntermediateMasterRecovery === true) {
- popoverElement.find("h3 .pull-right").prepend('');
+ if (cluster.HasAutomatedIntermediatePrimaryRecovery === true) {
+ popoverElement.find("h3 .pull-right").prepend('');
}
- if (cluster.HasAutomatedMasterRecovery === true) {
- popoverElement.find("h3 .pull-right").prepend('');
+ if (cluster.HasAutomatedPrimaryRecovery === true) {
+ popoverElement.find("h3 .pull-right").prepend('');
}
var contentHtml = '' + 'Instances: ';
diff --git a/web/orchestrator/public/js/orchestrator.js b/web/orchestrator/public/js/orchestrator.js
index af157a0df6b..9cf398d97e4 100644
--- a/web/orchestrator/public/js/orchestrator.js
+++ b/web/orchestrator/public/js/orchestrator.js
@@ -264,12 +264,12 @@ function openNodeModal(node) {
if (node.UnresolvedHostname) {
addNodeModalDataAttribute("Unresolved hostname", node.UnresolvedHostname);
}
- if (node.MasterKey.Hostname) {
- var td = addNodeModalDataAttribute("Master", node.masterTitle);
- if (node.IsDetachedMaster) {
- $('#node_modal button[data-btn=reattach-replica-master-host]').appendTo(td.find("div"));
+ if (node.SourceKey.Hostname) {
+ var td = addNodeModalDataAttribute("Primary", node.primaryTitle);
+ if (node.IsDetachedPrimary) {
+ $('#node_modal button[data-btn=reattach-replica-primary-host]').appendTo(td.find("div"));
} else {
- $('#node_modal button[data-btn=reattach-replica-master-host]').appendTo(hiddenZone);
+ $('#node_modal button[data-btn=reattach-replica-primary-host]').appendTo(hiddenZone);
}
$('#node_modal button[data-btn=reset-replica]').appendTo(td.find("div"))
@@ -287,21 +287,21 @@ function openNodeModal(node) {
addNodeModalDataAttribute("Last IO error", node.LastIOError);
}
}
- addNodeModalDataAttribute("Seconds behind master", node.SecondsBehindMaster.Valid ? node.SecondsBehindMaster.Int64 : "null");
+ addNodeModalDataAttribute("Seconds behind primary", node.SecondsBehindPrimary.Valid ? node.SecondsBehindPrimary.Int64 : "null");
addNodeModalDataAttribute("Replication lag", node.ReplicationLagSeconds.Valid ? node.ReplicationLagSeconds.Int64 : "null");
addNodeModalDataAttribute("SQL delay", node.SQLDelay);
- var masterCoordinatesEl = addNodeModalDataAttribute("Master coordinates", node.ExecBinlogCoordinates.LogFile + ":" + node.ExecBinlogCoordinates.LogPos);
+ var primaryCoordinatesEl = addNodeModalDataAttribute("Primary coordinates", node.ExecBinlogCoordinates.LogFile + ":" + node.ExecBinlogCoordinates.LogPos);
if (node.IsDetached) {
$('#node_modal button[data-btn=detach-replica]').appendTo(hiddenZone)
- $('#node_modal button[data-btn=reattach-replica]').appendTo(masterCoordinatesEl.find("div"))
+ $('#node_modal button[data-btn=reattach-replica]').appendTo(primaryCoordinatesEl.find("div"))
} else {
- $('#node_modal button[data-btn=detach-replica]').appendTo(masterCoordinatesEl.find("div"))
+ $('#node_modal button[data-btn=detach-replica]').appendTo(primaryCoordinatesEl.find("div"))
$('#node_modal button[data-btn=reattach-replica]').appendTo(hiddenZone)
}
} else {
$('#node_modal button[data-btn=reset-replica]').appendTo(hiddenZone);
- $('#node_modal button[data-btn=reattach-replica-master-host]').appendTo(hiddenZone);
+ $('#node_modal button[data-btn=reattach-replica-primary-host]').appendTo(hiddenZone);
$('#node_modal button[data-btn=skip-query]').appendTo(hiddenZone);
$('#node_modal button[data-btn=detach-replica]').appendTo(hiddenZone)
$('#node_modal button[data-btn=reattach-replica]').appendTo(hiddenZone)
@@ -400,8 +400,8 @@ function openNodeModal(node) {
$('#node_modal button[data-btn=reattach-replica]').click(function() {
apiCommand("/api/reattach-replica/" + node.Key.Hostname + "/" + node.Key.Port);
});
- $('#node_modal button[data-btn=reattach-replica-master-host]').click(function() {
- apiCommand("/api/reattach-replica-master-host/" + node.Key.Hostname + "/" + node.Key.Port);
+ $('#node_modal button[data-btn=reattach-replica-primary-host]').click(function() {
+ apiCommand("/api/reattach-replica-primary-host/" + node.Key.Hostname + "/" + node.Key.Port);
});
$('#node_modal button[data-btn=reset-replica]').click(function() {
var message = "Are you sure you wish to reset " + node.Key.Hostname + ":" + node.Key.Port +
@@ -415,19 +415,19 @@ function openNodeModal(node) {
});
return false;
});
- $('#node_modal [data-btn=gtid-errant-reset-master]').click(function() {
- var message = "Are you sure you wish to reset master on " + node.Key.Hostname + ":" + node.Key.Port +
+ $('#node_modal [data-btn=gtid-errant-reset-primary]').click(function() {
+ var message = "Are you sure you wish to reset primary on " + node.Key.Hostname + ":" + node.Key.Port +
"
?" +
"
This will purge binary logs on server.";
bootbox.confirm(message, function(confirm) {
if (confirm) {
- apiCommand("/api/gtid-errant-reset-master/" + node.Key.Hostname + "/" + node.Key.Port);
+ apiCommand("/api/gtid-errant-reset-primary/" + node.Key.Hostname + "/" + node.Key.Port);
}
});
return false;
});
$('#node_modal [data-btn=gtid-errant-inject-empty]').click(function() {
- var message = "
Are you sure you wish to inject empty transactions on the master of this cluster?";
+ var message = "
Are you sure you wish to inject empty transactions on the primary of this cluster?";
bootbox.confirm(message, function(confirm) {
if (confirm) {
apiCommand("/api/gtid-errant-inject-empty/" + node.Key.Hostname + "/" + node.Key.Port);
@@ -495,7 +495,7 @@ function openNodeModal(node) {
$('#node_modal button[data-btn=restart-replica]').hide();
$('#node_modal button[data-btn=stop-replica]').hide();
- if (node.MasterKey.Hostname) {
+ if (node.SourceKey.Hostname) {
if (node.replicationRunning || node.replicationAttemptingToRun) {
$('#node_modal button[data-btn=stop-replica]').show();
$('#node_modal button[data-btn=restart-replica]').show();
@@ -587,17 +587,17 @@ function normalizeInstance(instance) {
instance.id = getInstanceId(instance.Key.Hostname, instance.Key.Port);
instance.title = instance.Key.Hostname + ':' + instance.Key.Port;
instance.canonicalTitle = instance.title;
- instance.masterTitle = instance.MasterKey.Hostname + ":" + instance.MasterKey.Port;
- // If this host is a replication group member, we set its masterId to the group primary, unless the instance is itself
- // the primary. In that case, we set it to its async/semi-sync master (if configured). Notice that for group members
- // whose role is not defined (e.g. because they are in ERROR state) we still set their master ID to the group primary.
- // Setting the masterId to the group primary is what allows us to visualize group secondary members as replicating
+ instance.primaryTitle = instance.SourceKey.Hostname + ":" + instance.SourceKey.Port;
+ // If this host is a replication group member, we set its primaryId to the group primary, unless the instance is itself
+ // the primary. In that case, we set it to its async/semi-sync primary (if configured). Notice that for group members
+ // whose role is not defined (e.g. because they are in ERROR state) we still set their primary ID to the group primary.
+ // Setting the primaryId to the group primary is what allows us to visualize group secondary members as replicating
// from the group primary.
if (instance.ReplicationGroupName != "" && (instance.ReplicationGroupMemberRole == "SECONDARY" || instance.ReplicationGroupMemberRole == ""))
- masterKey = instance.ReplicationGroupPrimaryInstanceKey;
+ sourceKey = instance.ReplicationGroupPrimaryInstanceKey;
else
- masterKey = instance.MasterKey;
- instance.masterId = getInstanceId(masterKey.Hostname, masterKey.Port);
+ sourceKey = instance.SourceKey;
+ instance.primaryId = getInstanceId(sourceKey.Hostname, sourceKey.Port);
instance.replicationRunning = instance.ReplicationSQLThreadRuning && instance.ReplicationIOThreadRuning;
instance.replicationAttemptingToRun = instance.ReplicationSQLThreadRuning || instance.ReplicationIOThreadRuning;
@@ -610,16 +610,16 @@ function normalizeInstance(instance) {
// used by cluster-tree
instance.children = [];
instance.parent = null;
- instance.hasMaster = true;
- instance.masterNode = null;
+ instance.hasPrimary = true;
+ instance.primaryNode = null;
instance.inMaintenance = false;
instance.maintenanceReason = "";
instance.maintenanceEntry = null;
instance.isFirstChildInDisplay = false
- instance.isMaster = (instance.title == instance.ClusterName);
- instance.isCoMaster = false;
- instance.isCandidateMaster = false;
+ instance.isPrimary = (instance.title == instance.ClusterName);
+ instance.isCoPrimary = false;
+ instance.isCandidatePrimary = false;
instance.isMostAdvancedOfSiblings = false;
instance.isVirtual = false;
instance.isAnchor = false;
@@ -685,10 +685,10 @@ function normalizeInstanceProblem(instance) {
instance.problemDescription = "Replication is not running.\nEither stopped manually or is failing on I/O or SQL error.";
instance.problemOrder = 4;
} else if (instance.replicationLagProblem()) {
- instance.problemDescription = "Replica is lagging.\nThis diagnostic is based on either Seconds_behind_master or configured ReplicationLagQuery";
+ instance.problemDescription = "Replica is lagging.\nThis diagnostic is based on either Seconds_behind_primary or configured ReplicationLagQuery";
instance.problemOrder = 5;
} else if (instance.errantGTIDProblem()) {
- instance.problemDescription = "Replica has GTID entries not found on its master";
+ instance.problemDescription = "Replica has GTID entries not found on its primary";
instance.problemOrder = 6;
} else if (instance.replicationGroupMemberStateProblem()) {
instance.problemDescription = "Replication group member in state " + instance.ReplicationGroupMemberState;
@@ -705,11 +705,11 @@ function createVirtualInstance() {
id: "orchestrator-virtual-instance-" + (virtualInstanceCounter++),
children: [],
parent: null,
- hasMaster: false,
+ hasPrimary: false,
inMaintenance: false,
maintenanceEntry: null,
- isMaster: false,
- isCoMaster: false,
+ isPrimary: false,
+ isCoPrimary: false,
isVirtual: true,
ReplicationLagSeconds: 0,
SecondsSinceLastSeen: 0
@@ -753,23 +753,23 @@ function normalizeInstances(instances, maintenanceList) {
// create the tree array
instances.forEach(function(instance) {
// add to parent
- var parent = instancesMap[instance.masterId];
+ var parent = instancesMap[instance.primaryId];
if (parent) {
instance.parent = parent;
- instance.masterNode = parent;
+ instance.primaryNode = parent;
// create child array if it doesn't exist
parent.children.push(instance);
// (parent.contents || (parent.contents = [])).push(instance);
} else {
// parent is null or missing
- instance.hasMaster = false;
+ instance.hasPrimary = false;
instance.parent = null;
- instance.masterNode = null;
+ instance.primaryNode = null;
}
});
instances.forEach(function(instance) {
- if (instance.masterNode != null) {
+ if (instance.primaryNode != null) {
instance.isSQLThreadCaughtUpWithIOThread = (instance.ExecBinlogCoordinates.LogFile == instance.ReadBinlogCoordinates.LogFile &&
instance.ExecBinlogCoordinates.LogPos == instance.ReadBinlogCoordinates.LogPos);
} else {
@@ -778,30 +778,30 @@ function normalizeInstances(instances, maintenanceList) {
});
instances.forEach(function(instance) {
- if (instance.isMaster && instance.parent != null && instance.parent.parent != null && instance.parent.parent.id == instance.id) {
- // In case there's a master-master setup, introduce a virtual node
+ if (instance.isPrimary && instance.parent != null && instance.parent.parent != null && instance.parent.parent.id == instance.id) {
+ // In case there's a primary-primary setup, introduce a virtual node
// that is parent of both.
// This is for visualization purposes...
- var virtualCoMastersRoot = createVirtualInstance();
- coMaster = instance.parent;
+ var virtualCoPrimariesRoot = createVirtualInstance();
+ coPrimary = instance.parent;
- function setAsCoMaster(instance, coMaster) {
- instance.isCoMaster = true;
- instance.hasMaster = true;
- instance.masterId = coMaster.id;
- instance.masterNode = coMaster;
+ function setAsCoPrimary(instance, coPrimary) {
+ instance.isCoPrimary = true;
+ instance.hasPrimary = true;
+ instance.primaryId = coPrimary.id;
+ instance.primaryNode = coPrimary;
- var index = coMaster.children.indexOf(instance);
+ var index = coPrimary.children.indexOf(instance);
if (index >= 0)
- coMaster.children.splice(index, 1);
+ coPrimary.children.splice(index, 1);
- instance.parent = virtualCoMastersRoot;
- virtualCoMastersRoot.children.push(instance);
+ instance.parent = virtualCoPrimariesRoot;
+ virtualCoPrimariesRoot.children.push(instance);
}
- setAsCoMaster(instance, coMaster);
- setAsCoMaster(coMaster, instance);
+ setAsCoPrimary(instance, coPrimary);
+ setAsCoPrimary(coPrimary, instance);
- instancesMap[virtualCoMastersRoot.id] = virtualCoMastersRoot;
+ instancesMap[virtualCoPrimariesRoot.id] = virtualCoPrimariesRoot;
}
});
return instancesMap;
@@ -878,7 +878,7 @@ function renderInstanceElement(popoverElement, instance, renderType) {
popoverElement.attr("data-first-child-in-display", "true");
}
if (instance.supportsGTID) {
- if (instance.hasMaster && !instance.usingGTID) {
+ if (instance.hasPrimary && !instance.usingGTID) {
popoverElement.find("h3 div.pull-right").prepend(' ');
} else if (instance.GtidErrant) {
popoverElement.find("h3 div.pull-right").prepend(' ');
@@ -898,8 +898,8 @@ function renderInstanceElement(popoverElement, instance, renderType) {
if (instance.HasReplicationFilters) {
popoverElement.find("h3 div.pull-right").prepend(' ');
}
- if (instance.SemiSyncMasterStatus) {
- popoverElement.find("h3 div.pull-right").prepend(' ');
+ if (instance.SemiSyncPrimaryStatus) {
+ popoverElement.find("h3 div.pull-right").prepend(' ');
}
if (instance.SemiSyncReplicaStatus) {
popoverElement.find("h3 div.pull-right").prepend(' ');
@@ -944,7 +944,7 @@ function renderInstanceElement(popoverElement, instance, renderType) {
instance.renderHint = "stale";
indicateLastSeenInStatus = true;
} else if (instance.notReplicatingProblem()) {
- // check replicas only; check master only if it's co-master where not
+ // check replicas only; check primary only if it's co-primary where not
// replicating
instance.renderHint = "danger";
} else if (instance.replicationLagProblem()) {
@@ -984,10 +984,10 @@ function renderInstanceElement(popoverElement, instance, renderType) {
}
var contentHtml = '' + '
' + statusMessage + ' ' + '' + identityHtml + '
';
- if (instance.isCoMaster) {
- contentHtml += 'Co master
';
- } else if (instance.isMaster) {
- contentHtml += 'Master
';
+ if (instance.isCoPrimary) {
+ contentHtml += 'Co primary
';
+ } else if (instance.isPrimary) {
+ contentHtml += 'Primary
';
}
if (renderType == "search") {
if (instance.SuggestedClusterAlias) {
diff --git a/web/orchestrator/templates/faq.tmpl b/web/orchestrator/templates/faq.tmpl
index ce03e238598..8661594c2a8 100644
--- a/web/orchestrator/templates/faq.tmpl
+++ b/web/orchestrator/templates/faq.tmpl
@@ -8,7 +8,7 @@
Who should use orchestrator?
- DBAs and ops who have more than a mere master-replica replication topology.
+ DBAs and ops who have more than a mere primary-replica replication topology.
Is this yet another monitoring tool?
@@ -30,19 +30,19 @@
Yes. Statement Based Replication and Row Based Replication are both supported (and are in fact irrelevant)
- Does orchestrator support Master-Master (ring) Replication?
+ Does orchestrator support Primary-Primary (ring) Replication?
- Yes, for a ring of two masters (active-active, active-passive). Do note that the tree visualization cannot present the circular replication, and will pick an arbitrary master as the root of the tree.
+ Yes, for a ring of two primaries (active-active, active-passive). Do note that the tree visualization cannot present the circular replication, and will pick an arbitrary primary as the root of the tree.
- Master-Master-Master[-Master...] topologies, where the ring is composed of 3 or more masters are not supported and not tested. And are discouraged. And are an abomination.
+ Primary-Primary-Primary[-Primary...] topologies, where the ring is composed of 3 or more primaries are not supported and not tested. And are discouraged. And are an abomination.
Does orchestrator support Galera Replication?
- Yes and no. Orchestrator is unaware of Galera replication. If you have three Galera masters and different replica topologies under each master, then orchestrator sees these as three different topologies.
+ Yes and no. Orchestrator is unaware of Galera replication. If you have three Galera primaries and different replica topologies under each primary, then orchestrator sees these as three different topologies.
Does orchestrator support GTID Replication?
@@ -58,10 +58,10 @@
SHOW SLAVE STATUS
is incomplete. There is no expected work on this.
- Does orchestrator support Multi-Master Replication?
+ Does orchestrator support Multi-Primary Replication?
- No. Multi Master Replication (e.g. as in MariaDB 10.0) is not supported.
+ No. Multi Primary Replication (e.g. as in MariaDB 10.0) is not supported.
Does orchestrator support Tungsten Replication?
diff --git a/web/orchestrator/templates/home.tmpl b/web/orchestrator/templates/home.tmpl
index acbef7d342f..3053f1987d0 100644
--- a/web/orchestrator/templates/home.tmpl
+++ b/web/orchestrator/templates/home.tmpl
@@ -17,15 +17,15 @@
It seems like this is your initial installation of orchestrator: there are no known clusters at this stage.
- Your next task is to let orchestrator know about your replication topologies. Pick one server from each topology (this could be either master or replica). Orchestrator will attempt to connect to such a server, and auto-discover the entire
- replication tree by recursively crawling the server's master and replicas.
+ Your next task is to let orchestrator know about your replication topologies. Pick one server from each topology (this could be either primary or replica). Orchestrator will attempt to connect to such a server, and auto-discover the entire
+ replication tree by recursively crawling the server's primary and replicas.
Once discovered (and allow for a few minutes for complete replication graph detection), you will be able to easily change your topology via drag & drop, start & stop your replicas, start/end maintenance modes and get quick insight into replication problems.
Make sure your configuration file has the proper credentials for accessing all those remote MySQL servers. You will need the SUPER
and PROCESS
privileges on any node you wish to be able to discover. Make sure to run the
- following on masters of your topologies; fill in your own host name (limit '%'
to a specific host), user and password:
+ following on primaries of your topologies; fill in your own host name (limit '%'
to a specific host), user and password:
GRANT SUPER, PROCESS ON *.* TO 'orchestrator'@'%' IDENTIFIED BY 'secret';
diff --git a/web/orchestrator/templates/layout.tmpl b/web/orchestrator/templates/layout.tmpl
index b19549507be..c193ab0fc5b 100644
--- a/web/orchestrator/templates/layout.tmpl
+++ b/web/orchestrator/templates/layout.tmpl
@@ -200,9 +200,9 @@
-