Open barryhatfield opened 2 years ago
Same here with version 2.3.0. Using "awareness.attributes": "rack_id"
I solved this issue for index .opendistro_security
with:
securityadmin.sh -cd ../../../config/opensearch-security/ -dra -icl -nhnv -cacert ...
and
sh securityadmin.sh -cd ../../../config/opensearch-security/ -us 9 -icl -nhnv -cacert ...
But this doesn't work with index .opendistro-anomaly-detector-jobs
.
On every node restart, I must to do this workaround:
PUT _cluster/settings
{
"persistent" : {
"cluster.routing.allocation.awareness.attributes": null
}
}
And after cluster is green:
PUT _cluster/settings
{
"persistent" : {
"cluster.routing.allocation.awareness.attributes": "rack_id"
}
}
Describe the bug We are using our K8s node names as an attribute on our OpenSearch processes/pods to prevent both index primaries and replicas from being assigned to the same K8s node. The "auto_expand_replicas" setting creates the number of replicas equal to the total OpenSearch data processes/pods (in the case of 0-all) which is far greater than the number of K8s nodes the OpenSearch pods are on. The result is a permanent yellow cluster with unassigned shards.
Additionally, I cannot manually change the "auto_expand_replicas" setting on the system indices. I get a 403 error with a non-existent permission missing.
To Reproduce Steps to reproduce the behavior:
Attempt to change the auto_expand_replicas setting:
returns
Expected behavior The "auto_expand_replicas" setting should only expand the replica count to the number of unique values configured in shard allocation awareness.
Additionally, I should be able to update the auto_expand_replicas setting for all indices as the admin user.
Plugins opensearch-alerting
opensearch-cross-cluster-replication
opensearch-knn
opensearch-performance-analyzer opensearch-sql opensearch-anomaly-detection
opensearch-index-management
opensearch-ml
opensearch-reports-scheduler
prometheus-exporter opensearch-asynchronous-search
opensearch-job-scheduler
opensearch-observability
opensearch-security
Screenshots n/a
Host/Environment (please complete the following information):
Additional context The forced yellow status is causing problems with our readiness checks and cluster state alerting.