Skip to content

[v3.*] set default replicas for system indexes #148

@sbruzzese902

Description

@sbruzzese902

Hi 👋

With @Deepzima and @ettoreciarcia we discovered that by default all system indexes in OpenSearch (in the form .opendistro*) have by default the replicas set at 1.

This causes all our single-node OpenSearch deploy to be in the yellow state.

We fixed the issue using the following strategy:

  • deleted the unassigned shards ( in our case they were .opendistro-ism-config and .opendistro-job-scheduler-lock
  • apply the following patch as suggested here and after that launch manually the ism-policy job
curl -H 'Content-Type: application/json' -X PUT \
    -d '{
  "priority": 0,
  "index_patterns": [
    ".*"
  ],
  "template": {
  "settings": {
    "index": {
      "auto_expand_replicas": "0-1"
    }
  }
  }
}' \
  http://<opensearch_url>/_index_template/auto_expand_replicas

Probably this should be set together with our index patterns using the cronjob or - better - from the OpenSearch configuration file, if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions