Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
- 2.1
Describe the issue:
The ISM policy for daily rotation and log deletion via cron succeeds on the rollover for data stream, but completely ignores the step to delete the old index.
After all the steps explain API shows that everything has passed successfully, but the old index is in Closed status, but it has not been deleted.
Configuration:
{
"id": "rw_rollover_delete",
"seqNo": 3551056,
"primaryTerm": 12,
"policy": {
"policy_id": "rw_rollover_delete",
"description": "Daily cron rotation",
"last_updated_time": 1691062620000,
"schema_version": 16,
"error_notification": null,
"default_state": "init",
"states": [
{
"name": "init",
"actions": [
{
"timeout": "20m",
"retry": {
"count": 10,
"backoff": "exponential",
"delay": "5m"
},
"read_write": {}
}
],
"transitions": [
{
"state_name": "rollover",
"conditions": {
"cron": {
"cron": {
"expression": "0 0 * * *",
"timezone": "Europe/Sofia"
}
}
}
}
]
},
{
"name": "rollover",
"actions": [
{
"timeout": "1h",
"retry": {
"count": 10,
"backoff": "exponential",
"delay": "10m"
},
"rollover": {
"min_doc_count": 1
}
}
],
"transitions": []
},
{
"name": "delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
".ds-some-pattern"
],
"priority": 1,
"last_updated_time": 169106262000
},
{
"index_patterns": [
"some-pattern"
],
"priority": 1,
"last_updated_time": 169106262000
}
]
}
}