Greetings, I have an 8 node cluster with 4 nodes each in different data
centers. Recently the cluster became partitioned (i.e. couldn't see each
other) due to firewalls.
I have removed the firewall issue and all nodes are once again showing to
be part of the cluster, but there are 8 indexes, which show pairs of
unassigned primary and replica shards (so shard 3 primary and replica of
the same index for example).
{
"cluster_name" : "xxxxxxxx",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 8,
"number_of_data_nodes" : 8,
"active_primary_shards" : 500,
"active_shards" : 1000,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 16
}
I've looked into the reroute APIhttp://www.elasticsearch.org/guide/reference/api/admin-cluster-reroute.html and
tried the following:
curl XPOST -s 'http://localhost:9200/_cluster/reroute?pretty=true' -d '{
"commands" : [ { "allocate" : {
"index" : "0db5bb70b5d19bfceb5cebd5878fbcb905787745", "shard"
: 3 , "node" : "_9FezNn4TgWjftFeKBAMJw", "allow_primary" : 1 }
}
]
}'
which seems to return, but fails to allocate the shard. If I leave the
"allow_primary" off I get an error as I would expect from reading the above
API notes.
The question is this:
How do I recover from this failure and assign the unassigned shards which
are in pairs of primary and replica?
Any help would be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.