How to allocate "coordinating" node role?

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch 2.7.0

Describe the issue:
hi @pablo can I ask for you?

I seted up node’s role like this
I write explicitly node.roles=“coordinating” in opensearch.yml

Accoding to this document Creating a cluster - OpenSearch documentation
Every node is a coordinating node by default, so to make this node a dedicated coordinating node, set to an empty
but when I set up empty role, role is “cluser_manager, data, remote_cluster_client, ingest” like this

I wondering that 4 roles("cluser_manager, data, remote_cluster_client, ingest) is just coordinating roles? or look at the node.role and node.roles in the first screenshot, cluster_manager_name “os-coordinating-node” 's roles is correct for coordinating?

@cucukaka These roles don’t make this node coordinating one. The coordinating role is assigned to all nodes in the cluster.

Setting node.roles with empty list removes all other roles except the coordinating one and make the node a dedicated coordinating one.

As per documentation you should use the below in opensearch.yml to achieve that.

node.roles: [ ] 

You will get the below result.

Passing this setting as variable through docker compose sets []in node.roles section and no roles in node.role.

@pablo
Is opensearch-node2 cluster an coordinating node?

@cucukaka Yes it is, but it is not a dedicated coordinating node as it has ingest and remote_cluster_client roles.

@pablo
when I set like this “node.roles=”
I get this result

also node.roles=
result

just what I want is “only coordinating” node…

@cucukaka Just to be clear, every node in the cluster is a coordinating node. But you can remove all the roles from a single node and make it a dedicated coordinating node.

The second approach is correct. It will make os-coordinating-node a dedicated coordinating node.

i got same problem.i want to make a node for coordinating
im use opensearch operator and when i set role to : “”
i got this
dimr cluster_manager,data,ingest,remote_cluster_client - opensearch-dnp-coordinators-0
dimr cluster_manager,data,ingest,remote_cluster_client - opensearch-dnp-coordinators-1

image

@therus000 Try the below instead. There is a single space between double quotes.

roles:
  - " "

It will result with the following output in the cluster.

i tried and i got like this

i tired other method and i got this. is that mean that my node now will work as a coordinator?

  roles:
    - ""
  additionalConfig:
    node.master: "false"
    node.data: "false"
    node.ingest: "false"
    node.remote_cluster_client: "false"

@therus000 That is correct. The coordinator node is the node with no roles assigned.

1 Like