opensearch-project / index-management

🗃 Automate periodic data operations, such as deleting indices at a certain age or performing a rollover at a certain size
https://opensearch.org/docs/latest/im-plugin/index/
Apache License 2.0
52 stars 107 forks source link

Addition of Optional Parameter - allow_Red_cluster to bypass ISM to run on a Red Opensearch Cluster #1189

Open skumarp7 opened 3 weeks ago

skumarp7 commented 3 weeks ago

Issue #, if available:

https://github.com/opensearch-project/index-management/issues/1127

Description of changes:

This PR involves the provision for ISM to run on a red opensearch cluster.

Behaviour before:

ISM on a Green/Yellow Opensearch Cluster:

ISM

ISM on a Red Opensearch Cluster:

ISM-Red

Behaviour Post the Changes:

ISM on a Green/Yellow Opensearch Cluster:

ISM-GY-WITH PARAM


ISM on a Red Opensearch Cluster with the optional parameter:

ISM - 1

CheckList:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

skumarp7 commented 3 weeks ago

Hi ,

Request feedback from the maintainers :)

skumarp7 commented 1 week ago

Hi All,

I was trying to write test for the above feature and facing issues to simulate a red cluster. I tried to bring down the data node to make the cluster go read but since the integTest clusters are immutable, that was not possible.

Is there any other approach that i can make use of to simulate the red cluster ?

Hailong-am commented 1 week ago

Hi All,

I was trying to write test for the above feature and facing issues to simulate a red cluster. I tried to bring down the data node to make the cluster go read but since the integTest clusters are immutable, that was not possible.

Is there any other approach that i can make use of to simulate the red cluster ?

you can specify allocation policy for a index, An example

PUT test
{
  "settings": {
    "index.routing.allocation.require.size": "big"
  }
}

it will create index test and allocate shards on node with attribute size is big. As we don't have such node, the primary shards will not able to allocate, that will cause cluster health is red.