OK this is dumb. Explain allocation api explains different when I send shard name or not.
Explain allocation without shard name
{
"index" : "newdatab_80",
"shard" : 0,
"primary" : false,
"current_state" : "unassigned",
"unassigned_info" : {
"reason" : "NODE_LEFT",
"at" : "2025-06-02T15:39:21.158Z",
"details" : "node_left [*****]",
"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" : "*****",
"node_name" : "n4",
"transport_address" : "192.168.0.4:9300",
"node_attributes" : {
"rack" : "A",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "data_tier",
"decision" : "NO",
"explanation" : "index has a preference for tiers [data_hot] and node does not meet the required [data_hot] tier"
}
]
},
{
"node_id" : "*****",
"node_name" : "n3",
"transport_address" : "192.168.0.3:9300",
"node_attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "awareness",
"decision" : "NO",
"explanation" : "there are [2] copies of this shard and [2] values for attribute [rack] ([A, B] from nodes in the cluster and no forced awareness) so there may be at most [1] copies of this shard allocated to nodes with each value, but (including this copy) there would be [2] copies allocated to nodes with [node.attr.rack: B]"
}
]
},
{
"node_id" : "*****",
"node_name" : "n2",
"transport_address" : "192.168.0.2:9300",
"node_attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "same_shard",
"decision" : "NO",
"explanation" : "a copy of this shard is already allocated to this node [[newdatab_80][0], node[*****], [P], s[STARTED], a[id=yHKkZBPcm7zHY5HZdnBCTh]]"
},
{
"decider" : "awareness",
"decision" : "NO",
"explanation" : "there are [2] copies of this shard and [2] values for attribute [rack] ([A, B] from nodes in the cluster and no forced awareness) so there may be at most [1] copies of this shard allocated to nodes with each value, but (including this copy) there would be [2] copies allocated to nodes with [node.attr.rack: B]"
}
]
},
{
"node_id" : "*****",
"node_name" : "n5",
"transport_address" : "192.168.0.5:9300",
"node_attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"deciders" : [
{
"decider" : "data_tier",
"decision" : "NO",
"explanation" : "index has a preference for tiers [data_hot] and node does not meet the required [data_hot] tier"
}
]
}
]
}
Explain allocation with shard name
{
"index" : "newdatab_80",
"shard" : 0,
"primary" : true,
"current_state" : "started",
"current_node" : {
"id" : "*****",
"name" : "n2",
"transport_address" : "192.168.0.2:9300",
"attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"weight_ranking" : 4
},
"can_remain_on_current_node" : "yes",
"can_rebalance_cluster" : "no",
"can_rebalance_cluster_decisions" : [
{
"decider" : "rebalance_only_when_active",
"decision" : "NO",
"explanation" : "rebalancing is not allowed until all replicas in the cluster are active"
},
{
"decider" : "cluster_rebalance",
"decision" : "NO",
"explanation" : "the cluster has unassigned shards and cluster setting [cluster.routing.allocation.allow_rebalance] is set to [indices_all_active]"
}
],
"can_rebalance_to_other_node" : "no",
"rebalance_explanation" : "rebalancing is not allowed, even though there is at least one node on which the shard can be allocated",
"node_allocation_decisions" : [
{
"node_id" : "*****",
"node_name" : "n3",
"transport_address" : "192.168.0.3:9300",
"node_attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "yes",
"weight_ranking" : 3
},
{
"node_id" : "*****",
"node_name" : "n4",
"transport_address" : "192.168.0.4:9300",
"node_attributes" : {
"rack" : "A",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"weight_ranking" : 1,
"deciders" : [
{
"decider" : "data_tier",
"decision" : "NO",
"explanation" : "index has a preference for tiers [data_hot] and node does not meet the required [data_hot] tier"
}
]
},
{
"node_id" : "*****",
"node_name" : "n5",
"transport_address" : "192.168.0.5:9300",
"node_attributes" : {
"rack" : "B",
"xpack.installed" : "true",
"transform.node" : "false"
},
"node_decision" : "no",
"weight_ranking" : 2,
"deciders" : [
{
"decider" : "data_tier",
"decision" : "NO",
"explanation" : "index has a preference for tiers [data_hot] and node does not meet the required [data_hot] tier"
}
]
}
]
}
Explain shards
index shard prirep state docs store ip node
newdatab_80 0 p STARTED 1283 139.1kb 192.168.0.2 n2
newdatab_80 0 r UNASSIGNED
Version 7.17.28. because one of my apps still refuses ES8 