Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.4.1
Describe the issue: My intention is to create a ISM policy that will shrink and index and continue it’s life in policy, but after the shrink action new renamed index is going back to the start of the policy (hot phase).
Configuration:
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"rollover": {
"min_doc_count": 5,
"min_index_age": "20m",
"min_primary_shard_size": "200mb"
}
}
],
"transitions": [
{
"state_name": "cold",
"conditions": {
"min_index_age": "10m"
}
}
]
},
{
"name": "cold",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"allocation": {
"require": {
"data": "cold"
},
"include": {},
"exclude": {},
"wait_for": false
}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"shrink": {
"num_new_shards": 1,
"target_index_name_template": {
"source": "{{ctx.index}}_shrunken",
"lang": "mustache"
},
"force_unsafe": false
}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "40m"
}
}
]
},
{
"name": "delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
]
Relevant Logs or Screenshots: