Stricter parsing of remote node attribute
This commit enables stricter parsing of the remote node attribute, instead of leniently parsing values that are not "true" as false.
This commit is contained in:
parent
38b3fec885
commit
7082baaed9
|
@ -138,7 +138,7 @@ public final class RemoteClusterService extends AbstractComponent implements Clo
|
||||||
// nodes can be tagged with node.attr.remote_gateway: true to allow a node to be a gateway node for
|
// nodes can be tagged with node.attr.remote_gateway: true to allow a node to be a gateway node for
|
||||||
// cross cluster search
|
// cross cluster search
|
||||||
String attribute = REMOTE_NODE_ATTRIBUTE.get(settings);
|
String attribute = REMOTE_NODE_ATTRIBUTE.get(settings);
|
||||||
nodePredicate = nodePredicate.and((node) -> Booleans.isTrue(node.getAttributes().getOrDefault(attribute, "false")));
|
nodePredicate = nodePredicate.and((node) -> Booleans.parseBoolean(node.getAttributes().getOrDefault(attribute, "false")));
|
||||||
}
|
}
|
||||||
remoteClusters.putAll(this.remoteClusters);
|
remoteClusters.putAll(this.remoteClusters);
|
||||||
for (Map.Entry<String, List<DiscoveryNode>> entry : seeds.entrySet()) {
|
for (Map.Entry<String, List<DiscoveryNode>> entry : seeds.entrySet()) {
|
||||||
|
|
Loading…
Reference in New Issue