I'm restoring my data from S3 to a different cluster and some of my indexes are stuck in the UNASSIGNED state with an allocation_status of deciders_no.
1. Verify Snapshot
It appears to be valid and some of the indexes do restore correctly.
GET /_snapshot/s3_repository/for_production_4-21e/
{
"snapshots": [
{
"snapshot": "4-21e",
"uuid": "4s2-PIUaRHKtFUeOKvrZhw",
"version_id": 5020299,
"version": "5.2.2",
"indices": [
"sightings-2016-02-01",
"places"
],
"state": "SUCCESS",
"start_time": "2017-04-21T15:57:54.189Z",
"start_time_in_millis": 1492790274189,
"end_time": "2017-04-21T16:01:17.127Z",
"end_time_in_millis": 1492790477127,
"duration_in_millis": 202938,
"failures": [],
"shards": {
"total": 395,
"failed": 0,
"successful": 395
}
}
]
}
2. Restoring from S3 to a different cluster
POST /_snapshot/s3_repository/for_production_4-21e/_restore?wait_for_completion=false
{
"indices": "sightings-2016-02-01,places",
"ignore_unavailable": true,
"include_global_state": true,
"index_settings": {
"number_of_replicas": 0
}
}
But the master shard for this index is stuck in the unassigned state. The
{
"state": "UNASSIGNED",
"primary": true,
"node": null,
"relocating_node": null,
"shard": 0,
"index": "sightings-2016-02-01",
"recovery_source": {
"type": "SNAPSHOT",
"repository": "s3_repository",
"snapshot": "for_production_4-21e",
"version": "5.2.2",
"index": "sightings-2016-02-01"
},
"unassigned_info": {
"reason": "NEW_INDEX_RESTORED",
"at": "2017-04-21T16:51:26.260Z",
"delayed": false,
"details": "restore_source[s3_repository/for_production_4-21e]",
"allocation_status": "deciders_no"
}
}
GET /_cluster/allocation/explain
Looking at this route shows the index is looking for a node with the _id of nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg. But how do we fix this?
"allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
"node_allocation_decisions": [
{
"node_id": "voWCoe9BQuiYxNu-jt1c2A",
"node_name": "voWCoe9",
"transport_address": "10.1.189.13:9300",
"node_decision": "no",
"weight_ranking": 1,
"deciders": [
{
"decider": "filter",
"decision": "NO",
"explanation": """initial allocation of the index is only allowed on nodes [_id:"nSGRGqb-RUmgQkW-jbZ7QA OR 82GQkoQ5Q5yftFg_g4Qpvg"]"""