Greetings,
I'm setting up a fresh cluster of two machines on AWS to serve as a ELK log
server stack. I've imported 4 months worth of log data to play with on
the new cluster.
I'm trying to reproduce the behaviors explained in the "Retiring Data"
document on the ES website:
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/retiring-data.html
Specifically, I'm trying to cause indexes to move from the primary machine
to the secondary machine. I've set the node.box_type setting via the
elasticsearch.yml file to "recent" on the primary machine and "older" on
the secondary machine.
To migrate an index from the primary machine ("recent") in the cluster to
the secondary machine ("older"), I'm executing the following set of API
calls:
curl -XPOST http://es1.vpc3.ftaws.net:9200/logstash-2014.08.02/_close
curl -XPUT http://es1.vpc3.ftaws.net:9200/logstash-2014.08.02/_settings -d
'{
"index" : {"index.routing.allocation.include.box_type" : "older"}}'
curl -XPOST http://es1.vpc3.ftaws.net:9200/logstash-2014.08.02/_open
When I do this, only 1 of the 5 shards swaps the positions of the live and
backup copies such that the live copy is then on the secondary machine. So
I get 4 shards live on "recent" and one live on "older". What's more, if I
bring up just the secondary machine initially and let the indexes rebuild
so that all 5 live shards of each index are on the secondary machine, then
bring up the primary machine, and then execute the above calls, 4 of the 5
shards swap so that as with the first case, only one of the shards ends up
with its live copy on the secondary machine.
Here's a picture of what's going on from the elasticsearch-head console app:
I ran the above calls on each of the first two displayed indexes. Note
that the one shard that moves is different in the two cases. The third
displayed index is the "before" state, an index that I have not yet tried
to migrate. I've confirmed the state of each shard using the API just to
be sure that isn't just the console app that's screwing up.
Here are the important bits of the settings of the two machines
primary:
{
"name": "es1-vpc3",
...
"attributes": {
"box_type": "recent"
},
...
"cluster": {
"name": "es-vpc3"
},
"node": {
"name": "es1-vpc3",
"box_type": "recent"
},
....
}
secondary:
{
"name": "es2-vpc3",
...
"attributes": {
"box_type": "older"
},
...
"cluster": {
"name": "es-vpc3"
},
"node": {
"name": "es2-vpc3",
"box_type": "older"
},
....
}
What am I missing? Is this a bug?
TIA for any help you can provide.
Steve
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ccbf327b-5651-4750-af22-4bc4612940d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.