How to make a “Voting-only" server?

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

Detected OpenSearch Version: x-content-2.11.0

Describe the issue:

The cluster_manager-eligible role does not work as expected. It is assumed that when adding this role to the node, this server will have the right to choose a master, but it will not become a master itself. At the same time, this server becomes only “Coordinating” and does not participate in voting. The same thing is observed if you register in the config:

  • node.master=false
  • node.data=false
  • node.ingest=false
    At the same time , if you register cluster_manager or:
  • node.master=true
  • node.data=false
  • node.ingest=false
    Then the server becomes a regular master.

How to make a “Voting-only" server?

Configuration:
Docker-compose.yml:

version: ‘3’
services:
opensearch-node3:
image: opensearchproject/opensearch:latest
container_name: opensearch-node3
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node3-${NODE3}
# - node.roles=cluster_manager-eligible
- node.master=true
- node.data=false
- node.ingest=false
- discovery.seed_hosts=${NODE1},${NODE2},${NODE3}
- cluster.initial_cluster_manager_nodes=${NODE1},${NODE2},${NODE3}
- bootstrap.memory_lock=true
- “OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m”
- “DISABLE_SECURITY_PLUGIN=true”
- cluster.initial_master_nodes=${NODE1},${NODE2},${NODE3}
- transport.host=${NODE3}
- http.publish_host=${NODE3}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data3:/usr/share/opensearch/data
network_mode: “host”

Instead of using node.master, you can use node.roles: [ master, voting_only ] to configure a voting-only master node.

here he does not want to vote. Although if you make him a full-fledged master, he votes without problems, chooses a new leader or becomes one himself. The rest of the configuration does not change in any way. Each launch of the settings goes to an empty volume (there can be no remnants of the old settings there).
I get these logs when one server with data is disconnected:
on the second server with data:
[2023-10-23T12:11:43,138][WARN ][o.o.c.c.ClusterFormationFailureHelper] [opensearch-node1-192.168.79.40] cluster-manager not discovered or elected yet, an election requires 2 nodes with ids [ygBDM-CKTcqDHCEr1i0yaw, H8SCb7kZQZWLI0Lt2eZE7A], have discovered [{opensearch-node1-192.168.79.40}{H8SCb7kZQZWLI0Lt2eZE7A}{2DenPGlCQB-SqP8BHNLtwA}{192.168.79.40}{192.168.79.40:9300}{dimr}{shard_indexing_pressure_enabled=true}] which is not a quorum; discovery will continue using [192.168.79.41:9300, 192.168.69.219:9300] from hosts providers and [{opensearch-node2-192.168.79.41}{ygBDM-CKTcqDHCEr1i0yaw}{umhUGe1TT3GRiYV5n5ElXw}{192.168.79.41}{192.168.79.41:9300}{dimr}{shard_indexing_pressure_enabled=true}, {opensearch-node1-192.168.79.40}{H8SCb7kZQZWLI0Lt2eZE7A}{2DenPGlCQB-SqP8BHNLtwA}{192.168.79.40}{192.168.79.40:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 1, last-accepted version 24 in term 1

on “Voting-only" server:
[2023-10-23T12:19:13,259][WARN ][o.o.c.c.ClusterFormationFailureHelper] [opensearch-node3-192.168.69.219] cluster-manager not discovered yet: have discovered [{opensearch-node3-192.168.69.219}{y_vhvN6RS9SnLD4cSvGrDw}{8OUFuBEgSsKj_MMXuYhBdw}{192.168.69.219}{192.168.69.219:9300}{[ mastervoting_only ]}{shard_indexing_pressure_enabled=true}, {opensearch-node1-192.168.79.40}{H8SCb7kZQZWLI0Lt2eZE7A}{2DenPGlCQB-SqP8BHNLtwA}{192.168.79.40}{192.168.79.40:9300}{dimr}{shard_indexing_pressure_enabled=true}]; discovery will continue using [192.168.79.40:9300, 192.168.79.41:9300] from hosts providers and [{opensearch-node2-192.168.79.41}{ygBDM-CKTcqDHCEr1i0yaw}{umhUGe1TT3GRiYV5n5ElXw}{192.168.79.41}{192.168.79.41:9300}{dimr}{shard_indexing_pressure_enabled=true}, {opensearch-node1-192.168.79.40}{H8SCb7kZQZWLI0Lt2eZE7A}{2DenPGlCQB-SqP8BHNLtwA}{192.168.79.40}{192.168.79.40:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 1, last-accepted version 24 in term 1

opensearch-node1-192.168.79.40 - master/data node
opensearch-node2-192.168.79.41 - master/data node - test off
opensearch-node3-192.168.69.219 - “Voting-only" node

That is, if you make a regular master, then the voting of any two nodes is normal. It turns out that this setting does not work.