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.

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.

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

also node.roles=

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.