Can't get it to work. I created a brand new 2h/2w cluster.
# Creating the index
PUT test1
{
"settings": {
"index.routing.allocation.include._tier_preference": null,
"number_of_replicas": 2
}
}
# GET _cat/shards/test1?v 200 OK
index shard prirep state docs store ip node
test1 0 p STARTED 0 225b 10.47.192.173 instance-0000000000
test1 0 r STARTED 0 225b 10.47.192.99 instance-0000000001
test1 0 r UNASSIGNED
# GET _cluster/allocation/explain 200 OK
{
"index": "test1",
"shard": 0,
"primary": false,
"current_state": "unassigned",
"unassigned_info": {
"reason": "INDEX_CREATED",
"at": "2023-03-07T22:56:28.660Z",
"last_allocation_status": "no_attempt"
},
"can_allocate": "no",
"allocate_explanation": "Elasticsearch isn't allowed to allocate this shard to any of the nodes in the cluster. Choose a node to which you expect this shard to be allocated, find this node in the node-by-node explanation, and address the reasons which prevent Elasticsearch from allocating this shard there.",
"node_allocation_decisions": [
{
"node_id": "79fDvTXCTr24DjmsUMsYOA",
"node_name": "instance-0000000003",
"transport_address": "10.47.192.117:19037",
"node_attributes": {
"region": "unknown-region",
"instance_configuration": "gcp.data.highstorage.1",
"server_name": "instance-0000000003.4f379901a9b14417a3e141d745799f8f",
"data": "warm",
"xpack.installed": "true",
"logical_availability_zone": "zone-1",
"availability_zone": "us-west2-b"
},
"node_decision": "no",
"weight_ranking": 1,
"deciders": [
{
"decider": "data_tier",
"decision": "NO",
"explanation": "index has a preference for tiers [data_content] and node does not meet the required [data_content] tier"
}
]
},
{
"node_id": "NZ2kKMF3R-WkhNF56SCJgA",
"node_name": "instance-0000000002",
"transport_address": "10.47.192.127:19677",
"node_attributes": {
"region": "unknown-region",
"instance_configuration": "gcp.data.highstorage.1",
"server_name": "instance-0000000002.4f379901a9b14417a3e141d745799f8f",
"data": "warm",
"xpack.installed": "true",
"logical_availability_zone": "zone-0",
"availability_zone": "us-west2-c"
},
"node_decision": "no",
"weight_ranking": 2,
"deciders": [
{
"decider": "data_tier",
"decision": "NO",
"explanation": "index has a preference for tiers [data_content] and node does not meet the required [data_content] tier"
}
]
},
{
"node_id": "ZktlgqMhQF6opcfiq9mP6g",
"node_name": "instance-0000000001",
"transport_address": "10.47.192.99:19787",
"node_attributes": {
"region": "unknown-region",
"instance_configuration": "gcp.data.highio.1",
"server_name": "instance-0000000001.4f379901a9b14417a3e141d745799f8f",
"data": "hot",
"xpack.installed": "true",
"logical_availability_zone": "zone-1",
"availability_zone": "us-west2-b"
},
"node_decision": "no",
"weight_ranking": 3,
"deciders": [
{
"decider": "same_shard",
"decision": "NO",
"explanation": "a copy of this shard is already allocated to this node [[test1][0], node[ZktlgqMhQF6opcfiq9mP6g], [R], s[STARTED], a[id=neRr7bqfTRqodGpKFEjcGw], failed_attempts[0]]"
}
]
},
{
"node_id": "q_tYt6RFSHO5efwV-IAjsQ",
"node_name": "instance-0000000000",
"transport_address": "10.47.192.173:19307",
"node_attributes": {
"region": "unknown-region",
"instance_configuration": "gcp.data.highio.1",
"server_name": "instance-0000000000.4f379901a9b14417a3e141d745799f8f",
"data": "hot",
"xpack.installed": "true",
"logical_availability_zone": "zone-0",
"availability_zone": "us-west2-c"
},
"node_decision": "no",
"weight_ranking": 4,
"deciders": [
{
"decider": "same_shard",
"decision": "NO",
"explanation": "a copy of this shard is already allocated to this node [[test1][0], node[q_tYt6RFSHO5efwV-IAjsQ], [P], s[STARTED], a[id=HQbhwF4zTyalKa3rCQW9cA], failed_attempts[0]]"
}
]
}
]
}
# GET _cluster/allocation/explain 200 OK
{
"index": "test1",
"shard": 0,
"primary": true,
"current_state": "started",
"current_node": {
"id": "q_tYt6RFSHO5efwV-IAjsQ",
"name": "instance-0000000000",
"transport_address": "10.47.192.173:19307",
"attributes": {
"server_name": "instance-0000000000.4f379901a9b14417a3e141d745799f8f",
"instance_configuration": "gcp.data.highio.1",
"region": "unknown-region",
"availability_zone": "us-west2-c",
"logical_availability_zone": "zone-0",
"xpack.installed": "true",
"data": "hot"
},
"weight_ranking": 3
},
"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": "Elasticsearch is not allowed to allocate or rebalance this shard to another node. If you expect this shard to be rebalanced to another node, find this node in the node-by-node explanation and address the reasons which prevent Elasticsearch from rebalancing this shard there.",
"node_allocation_decisions": [
{
"node_id": "79fDvTXCTr24DjmsUMsYOA",
"node_name": "instance-0000000003",
"transport_address": "10.47.192.117:19037",
"node_attributes": {
"server_name": "instance-0000000003.4f379901a9b14417a3e141d745799f8f",
"instance_configuration": "gcp.data.highstorage.1",
"region": "unknown-region",
"availability_zone": "us-west2-b",
"logical_availability_zone": "zone-1",
"xpack.installed": "true",
"data": "warm"
},
"node_decision": "no",
"weight_ranking": 1,
"deciders": [
{
"decider": "data_tier",
"decision": "NO",
"explanation": "index has a preference for tiers [data_content] and node does not meet the required [data_content] tier"
}
]
},
{
"node_id": "NZ2kKMF3R-WkhNF56SCJgA",
"node_name": "instance-0000000002",
"transport_address": "10.47.192.127:19677",
"node_attributes": {
"server_name": "instance-0000000002.4f379901a9b14417a3e141d745799f8f",
"instance_configuration": "gcp.data.highstorage.1",
"region": "unknown-region",
"availability_zone": "us-west2-c",
"logical_availability_zone": "zone-0",
"xpack.installed": "true",
"data": "warm"
},
"node_decision": "no",
"weight_ranking": 2,
"deciders": [
{
"decider": "data_tier",
"decision": "NO",
"explanation": "index has a preference for tiers [data_content] and node does not meet the required [data_content] tier"
}
]
},
{
"node_id": "ZktlgqMhQF6opcfiq9mP6g",
"node_name": "instance-0000000001",
"transport_address": "10.47.192.99:19787",
"node_attributes": {
"server_name": "instance-0000000001.4f379901a9b14417a3e141d745799f8f",
"instance_configuration": "gcp.data.highio.1",
"region": "unknown-region",
"availability_zone": "us-west2-b",
"logical_availability_zone": "zone-1",
"xpack.installed": "true",
"data": "hot"
},
"node_decision": "no",
"weight_ranking": 3,
"deciders": [
{
"decider": "same_shard",
"decision": "NO",
"explanation": "a copy of this shard is already allocated to this node [[test1][0], node[ZktlgqMhQF6opcfiq9mP6g], [R], s[STARTED], a[id=neRr7bqfTRqodGpKFEjcGw], failed_attempts[0]]"
}
]
}
]
}