How to set policy using rollover and hot-warm state?

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch 2.7.0

Describe the issue:
I want to apply like this :arrow_down:
image

I want to …

  • applying rollover in hot state
  • applying trasition from hot to warm node

so I set policy like this. but Policy managed indices FAILED

{
    "id": "test-policy"
    "policy": {
        "policy_id": "test-policy",
        "default_state": "hot_state",
        "states": [
            {
                "name": "hot_state",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "rollover": {
                            "min_primary_shard_size": "30gb"
                        }
                    }
                ],
                "transitions": [
                    {
                        "state_name": "warm_state",
                        "conditions": {
                            "min_index_age": "45d"
                        }
                    }
                ]
            },
            {
                "name": "warm_state",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        }
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": [
            {
                "index_patterns": [
                    "log*
                ],
                "priority": 0
            }
        ]
    }
}

HOW TO SET POLICY???

The policy seems good, you can use explain API: GET _plugins/_ism/explain/{index} to get the detail of the failure.