Skip to content

[BUG] _cluster/stats API returning incorrect cluster_manager count #6103

@sandeshkr419

Description

@sandeshkr419

Describe the bug
_cluster/stats API returns wrong count of nodes with cluster_manager role.

To Reproduce
Steps to reproduce the behavior:

  1. Create a multi-node cluster on OS 2.3 (I tried it on 2.3), lets say with 3 nodes with cluster_manager role.
  2. Check response of _cat/nodes - which should show correct roles of each nodes.
ip         heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles                                   cluster_manager name
10.0.3.37            40          77   0    0.00    0.00     0.00 dir       data,ingest,remote_cluster_client            -               data-node
10.0.5.179           45          77   0    0.00    0.00     0.00 dir       data,ingest,remote_cluster_client            -               data-node
10.0.4.180           12          76   0    0.00    0.02     0.01 -         ml                                           -               ml-node
10.0.4.224           41          76   0    0.00    0.00     0.00 mmr       cluster_manager,master,remote_cluster_client -               manager-node
10.0.4.16            37          78   0    0.00    0.00     0.00 dir       data,ingest,remote_cluster_client            -               data-node
10.0.3.181           13          76   0    0.00    0.00     0.00 mmr       cluster_manager,master,remote_cluster_client -               manager-node
10.0.5.122           17          76   0    0.01    0.01     0.00 mmr       cluster_manager,master,remote_cluster_client *               seed
  1. Check response of _cluster/stats
.
.
.
"nodes" : {
    "count" : {
      "total" : 7,
      "cluster_manager" : 6,
      "coordinating_only" : 0,
      "data" : 3,
      "ingest" : 3,
      "master" : 6,
      "ml" : 1,
      "remote_cluster_client" : 6
    },
    "versions" : [
      "2.3.0"
    ],
.
.
.

Expected behavior
Count of cluster_manager and master should be 3 in above case.

Plugins
None

Screenshots
None

Host/Environment (please complete the following information):

  • Version: 2.3

Additional context
The above response was correct till OS 1.3.x

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions