Skip to content

Commit

Permalink
0003367: Remote node replacing Master Node User
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellpettit committed Jan 23, 2018
1 parent 6671b0d commit 9f7bcb0
Showing 1 changed file with 4 additions and 7 deletions.
Expand Up @@ -124,7 +124,7 @@ public Node registerPullOnlyNode(String externalId, String nodeGroupId,
node.setDatabaseType(databaseType);
node.setDatabaseVersion(databaseVersion);

node = processRegistration(node, null, null, true, Constants.DEPLOYMENT_TYPE_REST);
node = processRegistration(node, null, null, true);

if (node.isSyncEnabled()) {
//set the node as registered as we have no
Expand All @@ -144,7 +144,7 @@ protected void extractConfiguration(OutputStream out, Node registeredNode) {
}

protected Node processRegistration(Node nodePriorToRegistration, String remoteHost,
String remoteAddress, boolean isRequestedRegistration, String deploymentType)
String remoteAddress, boolean isRequestedRegistration)
throws IOException {

Node processedNode = new Node();
Expand Down Expand Up @@ -227,14 +227,11 @@ protected Node processRegistration(Node nodePriorToRegistration, String remoteHo
}

foundNode.setSyncEnabled(true);
if (Constants.DEPLOYMENT_TYPE_REST.equalsIgnoreCase(deploymentType)) {
foundNode.setSymmetricVersion(null);
foundNode.setDeploymentType(deploymentType);
}
foundNode.setSyncUrl(nodePriorToRegistration.getSyncUrl());
foundNode.setDatabaseType(nodePriorToRegistration.getDatabaseType());
foundNode.setDatabaseVersion(nodePriorToRegistration.getDatabaseVersion());
foundNode.setSymmetricVersion(nodePriorToRegistration.getSymmetricVersion());
foundNode.setDeploymentType(nodePriorToRegistration.getDeploymentType());
nodeService.save(foundNode);

/**
Expand Down Expand Up @@ -277,7 +274,7 @@ public boolean registerNode(Node nodePriorToRegistration, String remoteHost,
throws IOException {

Node processedNode = processRegistration(nodePriorToRegistration, remoteHost,
remoteAddress, isRequestedRegistration, null);
remoteAddress, isRequestedRegistration);

if (processedNode.isSyncEnabled()) {
/*
Expand Down

0 comments on commit 9f7bcb0

Please sign in to comment.