Description of problem:
Currently the REPLICA_SHARDS=1 by default. The replicas shard can be allocated when there are only 1 Elasticsearch data node.
It is better to default REPLICA_SHARDS=0, and the operator adjust value when es-node-data are more than 1.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Deploy logging using operator
2. Check the pod status
oc get pods --selector component=elasticsearch
NAME READY STATUS RESTARTS AGE
elasticsearch-clientdatamaster-0-1-d4ddc458f-6vg95 1/1 Running 0 1h
3. Check the Elasticsearh shards
.operations.2019.01.13 0 p STARTED 659798 586.7mb 10.131.0.13 elasticsearch-clientdatamaster-0-1
.operations.2019.01.13 0 r UNASSIGNED
.searchguard 0 p STARTED 5 32.8kb 10.131.0.13 elasticsearch-clientdatamaster-0-1
.searchguard 0 r UNASSIGNED
.kibana 0 p STARTED 5 56.8kb 10.131.0.13 elasticsearch-clientdatamaster-0-1
.kibana 0 r UNASSIGNED
project.logtest1.9e42894c-16f1-11e9-a208-02e3476c20e4.2019.01.13 0 p STARTED 3085 2mb 10.131.0.13 elasticsearch-clientdatamaster-0-1
project.logtest1.9e42894c-16f1-11e9-a208-02e3476c20e4.2019.01.13 0 r UNASSIGNED
4. Check the REPLICA_SHARDS in configmap
$ oc get configmap elasticsearch -o yaml|grep REPLICA
The replicas shards can't be allocated for only one Elasticsearch data node.
The REPLICA_SHARDS=0 by default.
Moving this to low since the expectation is generally you will deploy a 3+ node cluster. We will resolve by:
* Logging a warning message in the operator that there are not enough nodes to support the replication policy(advise to add more ES nodes?)
* Add status message with similar information as the warning message
* Take no additional action to modify the replication settings
When invalid combination of RedundancyPolicy and Topology is configured, the operator will not attempt to create Elasticsearch cluster.
Instead it will print out an error message, warning the user that such request is invalid.
If the RedundancyPolicy set correctly, the REPLICA_SHARDS are created as expected. So move to verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.