# Using ISM and CCR together

**URL:** <https://forum.opensearch.org/t/using-ism-and-ccr-together/13544>\
**Category:** Index Management\
**Tags:** troubleshoot\
**Created:** [March 24, 2023, 9:50am UTC](https://forum.opensearch.org/t/using-ism-and-ccr-together/13544 "2023-03-24T09:50:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![szurokl](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@szurokl](https://forum.opensearch.org/u/szurokl)\
**Post date:** [March 24, 2023, 9:50am UTC](https://forum.opensearch.org/t/using-ism-and-ccr-together/13544/1 "2023-03-24T09:50:16Z")

</div>

OpenSearch version: 2.4

Hi!

I use ISM policies to execute rollover operations on indices after their sizes reach a given limit. I also use CCR to replicate data between two clusters.

The leader indices get deleted after 3 days after they roll over. When this happens I would like to automatically delete their follower indices as well.

To achive this I created a separate ISM policy for the follower indices:

```auto
{
    "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
        }
    }
}

```

This policy keeps trying to delete the follower, but it can’t. I get the following error:

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

```

The index cannot be deleted because of CCR. The delete operation is blocked for the follower even after the leader gets deleted.

Is there a way to get rid of follower indices with ISM after their leader does not exist anymore?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [May 23, 2023, 9:50am UTC](https://forum.opensearch.org/t/using-ism-and-ccr-together/13544/2 "2023-05-23T09:50:39Z")

</div>

Closed on May 23, 2023, 9:50am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
