Elasticsearch version (bin/elasticsearch --version): 7.12.1
Description of the problem including expected versus actual behavior:
There could as well be 2 unrelated problems:
-
When cloning an index, number_of_replicas of the target index is not kept the same as the source index.
-
If there is an index template that sets the number_of_replicas to 0, this is being ignored as well, although the target index name matches the template pattern
Steps to reproduce:
PUT _index_template/template_1
{
"index_patterns": ["mytest*"],
"template": {
"settings": {
"number_of_replicas" : 0
}
}
}
PUT mytest1
GET mytest1
Observe that number_of_replicas = 0, as expected.
PUT /mytest1/_settings
{
"settings": {
"index.blocks.write": true
}
}
POST /mytest1/_clone/mytest2
GET mytest2
Observe that number_of_replicas = 1, so the value was neither copied over from the source index, nor the index template was respected.
Elasticsearch version (
bin/elasticsearch --version): 7.12.1Description of the problem including expected versus actual behavior:
There could as well be 2 unrelated problems:
When cloning an index,
number_of_replicasof the target index is not kept the same as the source index.If there is an index template that sets the
number_of_replicasto 0, this is being ignored as well, although the target index name matches the template patternSteps to reproduce:
Observe that number_of_replicas = 0, as expected.
Observe that number_of_replicas = 1, so the value was neither copied over from the source index, nor the index template was respected.