Hi All,
Elasticsearch Version - 5.4.3
I have a cluster of only one node. I have created an index by using the following command:
curl -X PUT "node1:9200/index10" -H 'Content-Type: application/json' -d'
{
"settings" : {
"index" : {
"number_of_shards" : 5,
"number_of_replicas" : 1
}
}
}'
When I use the cat shards API command following is the output:
[root@node1 ~]# curl -X GET "node1:9200/_cat/shards"?v
index shard prirep state docs store ip node
index10 2 p STARTED 0 130b 10.0.4.67 node1
index10 2 r UNASSIGNED
index10 1 p STARTED 0 130b 10.0.4.67 node1
index10 1 r UNASSIGNED
index10 4 p STARTED 0 130b 10.0.4.67 node1
index10 4 r UNASSIGNED
index10 3 p STARTED 0 130b 10.0.4.67 node1
index10 3 r UNASSIGNED
index10 0 p STARTED 0 130b 10.0.4.67 node1
index10 0 r UNASSIGNED
It has "5" replicas shards in the "UNASSIGNED" state in the cluster. When cluster allocation explain API command is used following is the output:
[root@node1 ~]# curl -X GET "node1:9200/_cluster/allocation/explain"
{"index":"index10","shard":2,"primary":false,"current_state":"unassigned","unassigned_info":{"reason":"INDEX_CREATED","at":"2018-12-27T05:24:01.835Z","last_allocation_status":"no_attempt"},"can_allocate":"no","allocate_explanation":"cannot allocate because allocation is not permitted to any of the nodes","node_allocation_decisions":[{"node_id":"TRq-P0CKS5K0oZWFLIaBIA","node_name":"node1","transport_address":"10.0.4.67:9300","node_decision":"no","weight_ranking":1,"deciders":[{"decider":"same_shard","decision":"NO","explanation":"the shard cannot be allocated to the same node on which a copy of the shard already exists [[index10][2], node[TRq-P0CKS5K0oZWFLIaBIA], [P], s[STARTED], a[id=Hoist8tzT-W9y4VF0VOyHw]]"}]}]}[root@node1 ~]#
Explanation for only "UNASSIGNED" shard "2" is returned.
Instead, the explanation for every "UNASSIGNED" shard should have been returned here. What do you all think about it??
Regards
Nikhil Kapoor