Closed
Description
Elasticsearch version: 5.2.0
Description of the problem including expected versus actual behavior:
Setting auto_expand_replicas works as expected when you add a node, however if you have a closed index with the setting ES will not update the number_of_replicas on any index when stopping a node.
I guess this is connected to the error you get when trying to set number_of_replicas on a closed index:
Can't update [index.number_of_replicas] on closed indices [[index/lHETwEIvTy23Zm2kaAhJ0g]] - can leave index in an unopenable state
Steps to reproduce:
- Make 2 indices with "auto_expand_replicas": "0-all"
- Close one of the indices
- Add a node to expand the replicas to nodes-1 (as expected)
- Stop one node - cluster goes to yellow state