Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A node with roles [ml, remote_cluster_client] is still dedicated ML #66533

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static MachineNodeRole parse(InputStream config) {
return MachineNodeRole.DATA;
} else if (containsOnly(roles, "master")) {
return MachineNodeRole.MASTER_ONLY;
} else if (containsOnly(roles, "ml")) {
} else if (roles.contains("ml") && containsOnly(roles, "ml", "remote_cluster_client")) {
return MachineNodeRole.ML_ONLY;
} else {
return MachineNodeRole.DATA;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ public void testMlOnlyNode() throws IOException {
MachineDependentHeap.MachineNodeRole nodeRole = parseConfig(sb -> sb.append("node.roles: [ml]"));
assertThat(nodeRole, equalTo(ML_ONLY));

nodeRole = parseConfig(sb -> sb.append("node.roles: [ml, remote_cluster_client]"));
assertThat(nodeRole, equalTo(ML_ONLY));

nodeRole = parseConfig(sb -> sb.append("node.roles: [remote_cluster_client, ml]"));
assertThat(nodeRole, equalTo(ML_ONLY));

nodeRole = parseConfig(sb -> sb.append("node.roles: [remote_cluster_client]"));
assertThat(nodeRole, not(equalTo(ML_ONLY)));

nodeRole = parseConfig(sb -> sb.append("node.roles: [ml, some_other_role]"));
assertThat(nodeRole, not(equalTo(ML_ONLY)));
}
Expand Down