Skip to content

[FEATURE] Manage CCR follower indices #726

@laszloszurok

Description

@laszloszurok

Hi!

I would like to ask if it's possible to properly manage CCR follower indices with ISM. Right now my usecase is the following:

I created different policies for the leader and follower indices.

In the policy for the followers there is only a "default" state and a transition to a "delete" state after 3 days. The deletion fails, because CCR makes the followers readonly. From OpenSearch Dashboards index management UI:

{
    "cause": "index [follower-000001] blocked by: [FORBIDDEN/1000/index read-only(cross-cluster-replication)];",
    "message": "Failed to delete index [follower-000001]"
}

(The leader is deleted already.)

Is there a way to resolve this with ISM?

Here is the current policy for the followers:

{
    "policy": {
        "description": "ism policy",
        "default_state": "default",
        "states": [
            {
                "name": "default",
                "actions": [],
                "transitions": [
                    {
                        "state_name": "delete",
                        "conditions": {
                            "min_index_age": "3d"
                        }
                    }
                ]
            },
            {
                "name": "delete",
                "actions": [
                    {
                        "retry": {
                            "count": 1000,
                            "backoff": "constant",
                            "delay": "10m"
                        },
                        "delete": {}
                    }
                ]

            }
        ],
        "ism_template": {
            "index_patterns": ["follower-*"],
            "priority": 1
        }
    }
}

I saw that there is an 'unfollow' action in elasticsearch ILM for this usecase. Is this functionality planned to be implemented in opensearch?

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions